Skip to content

Link Stats

Returns detailed scan statistics for a single link, including breakdowns by country, device type, browser, and daily scan counts.

GET /v1/analytics/links/{link_id}
analytics:read

Parameters

Path parameters

ParameterTypeRequiredDescription
link_idstringYesThe unique identifier of the link.

Request examples

Terminal window
curl https://xqr.co/api/v1/analytics/links/lnk_xyz789/stats \
-H "Authorization: Bearer YOUR_API_KEY"

Response

200 OK
{
"data": {
"link_id": "lnk_xyz789",
"short_code": "abc123",
"total_scans": 1842,
"last_scan_at": "2026-03-21T09:14:32Z",
"countries": [
{ "country": "US", "count": 892 },
{ "country": "DE", "count": 341 },
{ "country": "JP", "count": 215 }
],
"devices": [
{ "device": "mobile", "count": 1204 },
{ "device": "desktop", "count": 510 },
{ "device": "tablet", "count": 128 }
],
"browsers": [
{ "browser": "Chrome", "count": 845 },
{ "browser": "Safari", "count": 622 },
{ "browser": "Firefox", "count": 198 },
{ "browser": "Other", "count": 177 }
],
"daily_scans": [
{ "date": "2026-03-19", "scans": 64 },
{ "date": "2026-03-20", "scans": 71 },
{ "date": "2026-03-21", "scans": 43 }
]
},
"meta": {
"request_id": "req_d4e5f6",
"rate_limit": {
"remaining": 94,
"reset_at": "2026-03-21T12:01:00Z"
}
}
}

Was this page helpful?