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. 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, or its ending. |
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. |
Example request
curl -s "https://snip.link/v1/links/spring-menu/stats?days=30" \ -H "Authorization: Bearer $SNIP_KEY"
Example response
{
"link": {
"id": "lnk_7f0c2a2b4bb04a8b",
"code": "spring-menu",
"short_url": "https://snip.link/spring-menu"
},
"days_requested": 30,
"max_days": 30,
"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
}
]
}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. |
Errors
| Status | Meaning |
|---|---|
| 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). |