Viso.li

Get Link Statistics

Retrieves invocation statistics for a specific link.

Endpoint: GET /api/link/[slug]/stats

URL Parameters

  • slug (string, required): The unique slug for the shortened link.

Query Parameters

  • startDate (string, optional): An ISO 8601 date string for the start of the date range. Defaults to 7 days ago.
  • endDate (string, optional): An ISO 8601 date string for the end of the date range. Defaults to the current date.

Example Request

1curl "https://viso.li/api/link/your-link-slug/stats?startDate=2025-01-01T00:00:00.000Z&endDate=2025-01-31T23:59:59.000Z" \
2-H "Authorization: Bearer sk_api_your_api_key"

Success Response

A successful request will return a 200 OK status code and a JSON object containing the link statistics. The level of detail depends on your subscription plan.

response.json
1{
2 "slug": "your-link-slug",
3 "stats": {
4 "invocations": [
5 {
6 "date": "2025-09-24T14:20:00.000Z",
7 "continent": "NA",
8 "country": "United States",
9 "region": "CA",
10 "city": "San Francisco",
11 "referer": "google.com",
12 "asn": {
13 "asn": "15169",
14 "name": "Google LLC",
15 "domain": "google.com",
16 "type": "COM"
17 },
18 "browser": "Chrome",
19 "os": "macOS",
20 "deviceModel": "MacBook Pro",
21 "deviceType": "desktop"
22 }
23 ],
24 "startDate": "2025-09-01T00:00:00.000Z",
25 "endDate": "2025-09-30T23:59:59.000Z"
26 }
27}