Docs menu

Click export API

Download every click on your links, with country, device, referrer and UTM fields, as CSV or JSON lines.

Every click on a short link is recorded with where it came from and what it was opened on. This endpoint streams those rows to you. It is part of the paid plans, and only clicks your plan still keeps are included. See the plan table on the (https://siz.la/docs/errors) page for how long that is.

The export is streamed, so a large account does not have to fit in memory on either side. Read it line by line.

Export clicks

GET/api/clicks

Stream the raw clicks on one link or on the whole account, as JSON lines or CSV. Only clicks your plan still keeps are included.

Needs: API key. Needs Pro and the plans above it.

Parameters

NameInTypeDescription
formatQuerystringJSON lines (one object a line) or CSV. One of jsonl, csv. Default jsonl.
linkQueryintegerOnly the clicks on this link id. Leave it out for the whole account.
fromQuerystringThe first day to include, as YYYY-MM-DD.
toQuerystringThe last day to include, as YYYY-MM-DD.

Example request

Shell
curl "https://siz.la/api/clicks?format=jsonl&link=1042&from=2026-11-01" \
  -H "Authorization: Bearer $SIZLA_API_KEY"
JavaScript
const response = await fetch("https://siz.la/api/clicks?format=jsonl&link=1042&from=2026-11-01", {
  headers: {
    Authorization: `Bearer ${process.env.SIZLA_API_KEY}`,
  },
});
const data = await response.text();
console.log(data);
Python
import os
import requests

response = requests.get(
    "https://siz.la/api/clicks",
    headers={"Authorization": f"Bearer {os.environ['SIZLA_API_KEY']}"},
    params={
        "format": "jsonl",
        "link": 1042,
        "from": "2026-11-01",
    },
)
print(response.text)
PHP
$ch = curl_init('https://siz.la/api/clicks?format=jsonl&link=1042&from=2026-11-01');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer '.getenv('SIZLA_API_KEY'),
    ],
]);
$data = curl_exec($ch);

Example answer, status 200

JSON
{"id":90211,"clicked_at":"2026-11-14T09:41:07+00:00","link_id":1042,"code":"lunch-menu","country":"US","city":"Austin","language":"en","referrer_host":"t.co","referrer":"https://t.co/","ai_assistant":null,"browser":"Chrome","os":"iOS","device":"mobile","is_unique":true,"is_bot":false,"is_qr":false,"utm_source":null,"utm_medium":null,"utm_campaign":null,"click_id":"3f9a6c1e5b7d40a28c91e0d4","visitor_hash":"a1b2c3d4"}

Errors specific to this call

  • 400: The format is not csv or jsonl.
  • 404: The link is not one of yours.

Notes

  • Every row has the same fields. is_bot clicks are included so you can filter them yourself; the totals in the app leave them out.

Columns

Every row carries these fields, in this order:

  • id
  • clicked_at
  • link_id
  • code
  • country
  • city
  • language
  • referrer_host
  • referrer
  • ai_assistant
  • browser
  • os
  • device
  • is_unique
  • is_bot
  • is_qr
  • utm_source
  • utm_medium
  • utm_campaign
  • click_id
  • visitor_hash

clicked_at is in UTC. is_unique is true for a visitor's first click on a link. is_qr is true when the click came from scanning the link's QR code. click_id is the value to send back when you record a conversion.