Skip to content

Documentation

Export every click

GET/v1/clicksAnalytics

Every click and scan across the account in the range, newest first, with the link's ending on each row. Needs the Pro plan (Free answers 403 forbidden with details.upgrade). A CSV carries the newest 50,000 rows of the range; narrow days or add filters for the rest.

Parameters

ParameterTypeRequiredDescription
daysintegeroptionalHow 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.
countrystringoptionalExact two-letter country code, or unknown for missing country.
referrerstringoptionalExact referring hostname, or direct for no referrer. No URL path.
devicestringoptionalExact device class: desktop, mobile or tablet.
channelstringoptionalqr for marked QR scans, link for ordinary link clicks. Omit for both.
cursorstringoptionalThe next_cursor from the preceding JSON page. Keep the same filters and days. Do not combine with before.
beforeinteger, nulloptionalLegacy exclusive timestamp. Prefer cursor for lossless pagination when timestamps tie.
formatjson | csvoptionalcsv streams every row in the range as text/csv (no paging). Default json.

Example request

Terminal
curl "https://snip.link/v1/clicks?days=30" \
  -H "Authorization: Bearer $SNIP_KEY"

Example response

Response
{
  "clicks": [
    {
      "ts": "2026-10-19T18:41:03.000Z",
      "code": "spring-menu",
      "country": "US",
      "referrer": null,
      "device": "mobile",
      "via_qr": true,
      "os": "ios",
      "browser": "safari"
    }
  ],
  "next_before": null,
  "next_cursor": null
}

With format=csv the answer is text/csv, one row per click, sent as a file download:

Response fields

FieldTypeDescription
clicksClickRow[]Newest first, up to 5,000 per page.
next_cursorstring, nullPass as cursor for the next page. Preserves clicks with identical timestamps. Null on the last page.
next_beforeinteger, nullLegacy exclusive timestamp cursor. Use next_cursor instead to preserve timestamp ties.

Errors

StatusMeaning
400The body or query is invalid. details names each field.
401The API key is missing, malformed or revoked.
403The plan does not include this. details.upgrade names the plan that does.
429Either the key exceeded its requests-per-second limit (honor Retry-After), or a daily or plan quota is used up (details.reason).

Back to getting started