Aller au contenu

Statistics

A page's views and a short link's clicks, over the period you choose, with their breakdown by source, country and device.

Clicks on a short link

GET/v1/links/{id}/stats

?days= is 1, 7, 30 (default), 90, or 0 for all time. Read scope.

  • total — the period total; previous_total the previous period's and change_pct the change in percent
  • all_time_total — the total since creation
  • daily — the daily series; with ?days=0 it is replaced by monthly, one entry per month (month, count)
  • referrers — the source: a domain name, direct or unknown
  • countries — the two-letter country code, or unknown
  • devices — desktop, mobile, tablet, console, tv or unknown
curl "https://api.tinylink.fr/v1/links/promo/stats?days=7" \
  -H "Authorization: Bearer tl_your_token"

Possible responses

{
  "metric": "clicks",
  "days": 7,
  "from": "2026-09-29",
  "to": "2026-10-05",
  "total": 42,
  "previous_total": 35,
  "change_pct": 20.0,
  "all_time_total": 318,
  "daily": [
    {
      "date": "2026-09-29",
      "count": 4
    },
    {
      "date": "2026-09-30",
      "count": 9
    },
    {
      "date": "2026-10-01",
      "count": 6
    },
    {
      "date": "2026-10-02",
      "count": 3
    },
    {
      "date": "2026-10-03",
      "count": 8
    },
    {
      "date": "2026-10-04",
      "count": 7
    },
    {
      "date": "2026-10-05",
      "count": 5
    }
  ],
  "referrers": [
    {
      "source": "instagram.com",
      "count": 25
    },
    {
      "source": "direct",
      "count": 17
    }
  ],
  "countries": [
    {
      "country": "FR",
      "count": 36
    },
    {
      "country": "BE",
      "count": 6
    }
  ],
  "devices": [
    {
      "device": "mobile",
      "count": 31
    },
    {
      "device": "desktop",
      "count": 11
    }
  ]
}

Views of a page

GET/v1/pages/{id}/stats

Same parameters and same fields, with metric set to views. On top comes links: the clicks on each of the page's links over the period. Read scope.

curl "https://api.tinylink.fr/v1/pages/my-page/stats?days=7" \
  -H "Authorization: Bearer tl_your_token"

Possible responses

{
  "metric": "views",
  "days": 7,
  "from": "2026-09-29",
  "to": "2026-10-05",
  "total": 42,
  "previous_total": 35,
  "change_pct": 20.0,
  "all_time_total": 318,
  "daily": [
    {
      "date": "2026-09-29",
      "count": 4
    },
    {
      "date": "2026-09-30",
      "count": 9
    },
    {
      "date": "2026-10-01",
      "count": 6
    },
    {
      "date": "2026-10-02",
      "count": 3
    },
    {
      "date": "2026-10-03",
      "count": 8
    },
    {
      "date": "2026-10-04",
      "count": 7
    },
    {
      "date": "2026-10-05",
      "count": 5
    }
  ],
  "referrers": [
    {
      "source": "instagram.com",
      "count": 25
    },
    {
      "source": "direct",
      "count": 17
    }
  ],
  "countries": [
    {
      "country": "FR",
      "count": 36
    },
    {
      "country": "BE",
      "count": 6
    }
  ],
  "devices": [
    {
      "device": "mobile",
      "count": 31
    },
    {
      "device": "desktop",
      "count": 11
    }
  ],
  "links": [
    {
      "id": "L6ac4011edb7c6",
      "title": "My website",
      "clicks": 19
    },
    {
      "id": "L6ac4011ee9fab",
      "title": "Contact",
      "clicks": 4
    }
  ]
}

Still stuck?

Write to us from the Support tab of your workspace, we answer within one business day.

Contact support