Endpoint
GET/analytics/originals
APIs that can be used to work with State programmatically
This API method returns original URLs sorted by click count in descending order.
Authorization required.
All parameters are optional. By default, it returns clicks from the last 30 days, with results paginated.
| Parameter | Description |
|---|---|
| link_id | Exact match |
| period | today, yesterday, week, lastweek, month, lastmonth, year, all, or a custom range, period=YYYY-MM-DD,YYYY-MM-DD, i.e. period=2025-10-01,2025-10-13 |
| domain_id | filter by domain id. You can get a list of available domains from Domains API |
| folder_id | filter by folder id. You can get IDs from Folders API |
| tag_id | filter by tag id. You can get IDs from Tags API |
| search | Case-insensitive string to match anywhere in the URL, or short link |
| country | Two-letter uppercase country code |
| city | City name in English (exact match) |
| region | Region name in English (exact match) |
| continent | Continent name in English (exact match) |
| browser | Browser name |
| os | Operating system |
| device | Device type |
| page | the page number for pagination, default 0 |
| limit | the number of items per page. default 25. available values: 10,25,50,75,100 |
Available values for country, city, region, continent, browser, os, and device can be retrieved via a dedicated API.
curl https://state.sk/api/analytics/originals \
-H 'x-api-key: state_xxxxxxxxxx'
The response returns paginated original URLs sorted by click count. Each item contains:
Note: The response may include multiple items with the same link_id and short_url if different variants were clicked.
{
"items": [
{
"link_id": "c2d1727e-d175-4a6d-b0de-d97dff0e1bbc",
"short_url": "https://state.sk/12121212",
"url": "https://github.com/whitetown",
"clicks": 26,
"favicon": "https://github.githubassets.com/favicons/favicon.svg"
},
{
"link_id": "c16e9602-c9c2-493b-b431-50ddf3cfcbf7",
"short_url": "https://state.sk/PSMLii",
"url": "https://www.pistonsoft.com/",
"clicks": 10,
"favicon": "https://www.pistonsoft.com/favicon.ico"
},
{
"link_id": "e4f46260-9c60-41ed-8c62-67b4f44f4434",
"short_url": "https://state.sk/whitetown3",
"url": "https://localize.to/privacy.html",
"clicks": 9,
"favicon": "https://localize.to/assets/img/favicon.ico"
},
{
"link_id": "d0d4520e-4ef3-488f-9336-8834b5c1894e",
"short_url": "https://state.sk/password",
"url": "https://state.sk/info/fireworks",
"clicks": 2,
"favicon": "https://state.sk/favicon.ico"
},
{
"link_id": "d1ca3230-bfcb-48ac-9c27-8ebd3f325927",
"short_url": "https://state.sk/vSy7Rcdv",
"url": "https://mediavibes.app/",
"clicks": 2,
"favicon": "https://mediavibes.app/favicon.ico"
}
],
"total": 5,
"limit": 25,
"offset": 0
}