Link Stats
GEThttps://www.viso.li/api/link/:slug/stats
Returns click history for a short link you own. Each invocation can include location, referrer, device, and network details, depending on your plan.
Without dates, the range is the last 7 days through today (start of day, server time).
Send Authorization: Bearer sk_api_your_api_key on every request. See authentication.
Path parameters
| Field | Type | Description |
|---|---|---|
slug | string | Required. Public slug of the shortened link. |
Query parameters
| Field | Type | Description |
|---|---|---|
startDate | string | ISO 8601 start of the range. Defaults to 7 days ago. |
endDate | string | ISO 8601 end of the range. Defaults to today. |
Example request
This reads January 2025 clicks for one slug.
1curl "https://www.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
Returns 200 OK. Field detail on each invocation depends on your subscription.
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}
Response fields
| Field | Type | Description |
|---|---|---|
slug | string | Required. The requested short-link slug. |
stats.invocations | object[] | Required. One row per click in the date range. |
stats.invocations[].date | string | Required. ISO 8601 time of the click. |
stats.invocations[].continent | string | null | Required. Continent code, when the plan includes location. |
stats.invocations[].country | string | null | Required. Country, when the plan includes location. |
stats.invocations[].region | string | null | Required. Region, on PRO and ENTERPRISE. |
stats.invocations[].city | string | null | Required. City, on PRO and ENTERPRISE. |
stats.invocations[].referer | string | null | Required. Referring host, on PRO and ENTERPRISE. |
stats.invocations[].asn.asn | string | null | Required. Autonomous system number. |
stats.invocations[].asn.name | string | null | Required. Network name. |
stats.invocations[].asn.domain | string | null | Required. Network domain. |
stats.invocations[].asn.type | string | null | Required. Network type. Populated on ENTERPRISE. |
stats.invocations[].browser | string | null | Required. Browser name. |
stats.invocations[].os | string | null | Required. Operating system. |
stats.invocations[].deviceModel | string | null | Required. Device model, on paid plans. |
stats.invocations[].deviceType | string | null | Required. Device type, on paid plans. |
stats.startDate | string | Required. ISO 8601 start of the resolved range. |
stats.endDate | string | Required. ISO 8601 end of the resolved range. |
Errors
| Status | Error | Description |
|---|---|---|
| 400 | Bad Request | startDate or endDate is not a valid ISO 8601 datetime, or endDate is before startDate. |
| 401 | Unauthorized | Missing, malformed, or invalid Bearer token. |
| 404 | Not Found | The slug does not exist or does not belong to you. |
| 429 | Too Many Requests | More than 10 requests per minute and 50 requests per day. Some responses include a Retry-After header. |
| 500 | Internal Server Error | Unexpected server error. Retry the request. |