Get link analytics summary
GET
/api/v1/links/{code}/analytics/summary
const url = 'https://example.com/api/v1/links/example/analytics/summary?from=2026-02-01T00%3A00%3A00Z&to=2026-02-27T23%3A59%3A59Z&granularity=hour&limit=20&limit_countries=20&limit_cities=20&compare=prev_period';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/api/v1/links/example/analytics/summary?from=2026-02-01T00%3A00%3A00Z&to=2026-02-27T23%3A59%3A59Z&granularity=hour&limit=20&limit_countries=20&limit_cities=20&compare=prev_period' \ --header 'Authorization: Bearer <token>'Authorizations
Заголовок раздела «Authorizations»Parameters
Заголовок раздела «Parameters»Path Parameters
Заголовок раздела «Path Parameters»code
required
string
Short code or custom alias
Query Parameters
Заголовок раздела «Query Parameters»from
string
Example
2026-02-01T00:00:00ZStart date (ISO 8601). Default: 30 days ago
to
string
Example
2026-02-27T23:59:59ZEnd date (ISO 8601). Default: now
granularity
string
limit
number
limit_countries
number
Limit for countries (geo endpoint)
limit_cities
number
Limit for cities (geo endpoint)
countries
Array<string>
Filter by ISO 3166-1 alpha-2 country codes (comma-separated)
compare
string
Compare with a previous period
Responses
Заголовок раздела «Responses»Media typeapplication/json
object
linkId
required
string
shortCode
required
string
customAlias
object
totalClicks
required
number
uniqueClicks
required
number
clicksToday
required
number
clicksThisWeek
required
number
clicksThisMonth
required
number
topCountry
object
code
required
string
name
required
string
clicks
required
number
topReferrer
object
domain
required
string
clicks
required
number
topDevice
object
topBrowser
object
createdAt
required
string
lastClickAt
object
botClicks
required
number
botPercentage
required
number
comparison
object
from
required
string
to
required
string
totalClicks
required
number
uniqueClicks
required
number
totalClicksDelta
required
number
totalClicksChangePercent
required
object
Example generated
{ "linkId": "example", "shortCode": "example", "customAlias": {}, "totalClicks": 1, "uniqueClicks": 1, "clicksToday": 1, "clicksThisWeek": 1, "clicksThisMonth": 1, "topCountry": { "code": "example", "name": "example", "clicks": 1 }, "topReferrer": { "domain": "example", "clicks": 1 }, "topDevice": {}, "topBrowser": {}, "createdAt": "example", "lastClickAt": {}, "botClicks": 1, "botPercentage": 1, "comparison": { "from": "example", "to": "example", "totalClicks": 1, "uniqueClicks": 1, "totalClicksDelta": 1, "totalClicksChangePercent": {} }}Forbidden — not the owner
Link not found