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 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.
beforeinteger, nulloptionalThe next_before of the previous page.
formatjson | csvoptionalcsv streams every row in the range as text/csv (no paging). Default json.

Example request

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

Example response

{
  "clicks": [
    {
      "ts": "2026-10-19T18:41:03.000Z",
      "code": "spring-menu",
      "country": "US",
      "referrer": null,
      "device": "mobile",
      "via_qr": true
    }
  ],
  "next_before": 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_beforeinteger, nullPass as before for the next page. Null on the last page.

Errors

StatusMeaning
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 the guide