LinkStacked
🔌API & integrations 4 min read

Analytics API reference

The Analytics API lets you programmatically fetch views, clicks, CTR, and breakdown data for use in your own dashboards, reports, or integrations.

Overview endpoint

shell
GET /v1/analytics/overview?period=30d
Authorization: Bearer ls_live_YOUR_KEY

Supported period values: 7d, 30d, 90d, 365d, or a custom range using start and end query params (ISO 8601 dates).

Per-link analytics

shell
GET /v1/analytics/links/:id?period=30d

Referrer breakdown

shell
GET /v1/analytics/referrers?period=30d

Geographic breakdown

shell
GET /v1/analytics/geo?period=30d&granularity=country

Analytics API responses are cached for 10 minutes. Making the same request multiple times within 10 minutes returns the same cached response.

Was this article helpful?

More in API & integrations

View all

Still need help?

Our support team is available Monday – Friday, 9am – 6pm EST.