Documentation
Link analytics
GET
/v1/links/{link}/statsAnalyticsClicks and QR scans for one link: totals, by UTC day, and the top countries, referring hosts and devices. Optional country, referrer, device and channel filters apply to every total and breakdown. Free shows 30 days; Pro shows 365. hours (clicks by hour of the UTC day) is present on Pro. Also available as the MCP tool get_link_stats.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
link | string, in the path | required | The link's id, ending, domain/ending or full short URL. URL-encode the entire reference in this path segment. Full URLs retain their namespace and never fall back to a same-ending link on another domain. |
days | integer | optional | How many UTC days back, today included. Free shows 30 days; Pro shows 365. A larger value is capped; max_days in the answer says where. Default 30. |
country | string | optional | Exact two-letter country code, or unknown for missing country. |
referrer | string | optional | Exact referring hostname, or direct for no referrer. No URL path. |
device | string | optional | Exact device class: desktop, mobile or tablet. |
channel | string | optional | qr for marked QR scans, link for ordinary link clicks. Omit for both. |
Example request
Terminal
curl "https://snip.link/v1/links/spring-menu/stats?days=30" \
-H "Authorization: Bearer $SNIP_KEY"Example response
Response
{
"link": {
"id": "lnk_7f0c2a2b4bb04a8b",
"code": "spring-menu",
"short_url": "https://go.snip.link/spring-menu"
},
"days_requested": 30,
"max_days": 30,
"filter_options": {
"countries": ["CA", "US"],
"referrers": ["direct", "instagram.com"],
"devices": ["desktop", "mobile"]
},
"total": 412,
"via_qr": 377,
"days": [
{
"day": "2026-10-18",
"clicks": 61,
"scans": 58
},
{
"day": "2026-10-19",
"clicks": 74,
"scans": 70
}
],
"countries": [
{
"key": "US",
"clicks": 390
},
{
"key": "CA",
"clicks": 14
}
],
"referrers": [
{
"key": "direct",
"clicks": 401
},
{
"key": "instagram.com",
"clicks": 11
}
],
"devices": [
{
"key": "mobile",
"clicks": 388
},
{
"key": "desktop",
"clicks": 24
}
],
"operating_systems": [
{
"key": "ios",
"clicks": 251
},
{
"key": "android",
"clicks": 137
},
{
"key": "windows",
"clicks": 24
}
],
"browsers": [
{
"key": "safari",
"clicks": 240
},
{
"key": "chrome",
"clicks": 150
},
{
"key": "instagram",
"clicks": 22
}
]
}Response fields
| Field | Type | Description |
|---|---|---|
link | object | |
link.id | string | |
link.code | string | |
link.short_url | string | |
days_requested | integer | |
max_days | integer | The longest range the plan allows. |
total | integer | Clicks in the range, QR scans included. |
via_qr | integer | How many of them were QR scans. |
days | object[] | One row per UTC day with at least one click, oldest first. |
hours | object[] | Clicks by hour of the UTC day (0 to 23), summed over the range. Plans with time-of-day analytics only. |
countries | object[] | Top ten ISO country codes. |
referrers | object[] | Top ten referring hosts; direct when there was none. |
devices | object[] | mobile, tablet or desktop. |
operating_systems | object[] | ios, android, windows, macos, linux, chromeos or other, read from the user agent at the click (never stored); unknown for clicks before October 2026. |
browsers | object[] | chrome, safari, firefox, edge, samsung, opera, the in-app browsers instagram, facebook and tiktok, or other; unknown for clicks before October 2026. |
filter_options | object | Available exact values in this account or link and time range, before filters. Unknown country is unknown; absent referrer is direct. |
Errors
| Status | Meaning |
|---|---|
| 400 | The body or query is invalid. details names each field. |
| 401 | The API key is missing, malformed or revoked. |
| 404 | No link by that id or ending in this account. |
| 429 | Either the key exceeded its requests-per-second limit (honor Retry-After), or a daily or plan quota is used up (details.reason). |

