Top Links
Returns the top links in the authenticated workspace ranked by scan count. Use this to identify your highest-performing QR codes and short links.
GET
/v1/analytics/top-links analytics:read Parameters
Query parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
limit | integer | No | 20 | Number of links to return (1–100). |
Request examples
curl "https://xqr.co/api/v1/analytics/top-links?limit=10" \ -H "Authorization: Bearer YOUR_API_KEY"const params = new URLSearchParams({ limit: "10" });
const res = await fetch( `https://xqr.co/api/v1/analytics/top-links?${params}`, { headers: { Authorization: "Bearer YOUR_API_KEY", }, });
const { data, meta } = await res.json();import httpx
res = httpx.get( "https://xqr.co/api/v1/analytics/top-links", headers={"Authorization": "Bearer YOUR_API_KEY"}, params={"limit": 10},)
top_links = res.json()["data"]Response
200 OK
{ "data": [ { "id": "lnk_abc123", "short_code": "spring-sale", "destination_url": "https://shop.example.com/spring", "scan_count": 4521, "created_at": "2026-02-01T08:00:00Z" }, { "id": "lnk_def456", "short_code": "menu-pdf", "destination_url": "https://restaurant.example.com/menu.pdf", "scan_count": 3187, "created_at": "2026-01-15T12:30:00Z" }, { "id": "lnk_ghi789", "short_code": "event-rsvp", "destination_url": "https://events.example.com/rsvp", "scan_count": 2894, "created_at": "2026-03-01T09:00:00Z" } ], "meta": { "request_id": "req_p7q8r9", "rate_limit": { "remaining": 89, "reset_at": "2026-03-21T12:01:00Z" } }}Was this page helpful?
Thanks for your feedback!