Statistics
Views and clicks over the period you choose, for one element, for a tag's elements or for the whole environment, with their breakdown by source, country and device.
- GET
/v1/links/{id}/statsClicks on a short link - GET
/v1/pages/{id}/statsViews of a page - GET
/v1/statsEnvironment statistics - GET
/v1/tags/{id}/statsTag statistics
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_totalthe previous period's andchange_pctthe change in percentall_time_total— the total since creationdaily— the daily series; with?days=0it is replaced bymonthly, one entry per month (month,count)referrers— the source: a domain name,directorunknowncountries— the two-letter country code, orunknowndevices—desktop,mobile,tablet,console,tvorunknown
curl "https://api.tinylink.fr/v1/links/promo/stats?days=7" \
-H "Authorization: Bearer tl_your_token"
const response = await fetch('https://api.tinylink.fr/v1/links/promo/stats?days=7', {
headers: { Authorization: 'Bearer tl_your_token' },
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/links/promo/stats?days=7');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer tl_your_token'],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
'https://api.tinylink.fr/v1/links/promo/stats?days=7',
headers={'Authorization': 'Bearer tl_your_token'},
)
data = response.json()
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
}
]
} No token in the request
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Unknown or revoked token
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} The owner's plan does not include the API
{
"error": {
"code": "plan_required",
"message": "The TinyLink API is included in the Pro and Business plans. Upgrade the plan of this environment's owner to use it."
}
} The token does not carry the Read scope
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"read\" scope.",
"details": {
"required_scope": "read"
}
}
} No short link with this id or slug in the environment
{
"error": {
"code": "not_found",
"message": "Link not found in this environment."
}
} Period not offered
{
"error": {
"code": "validation_failed",
"message": "The \"days\" parameter must be one of: 1, 7, 30, 90, 0 (all time).",
"details": {
"field": "days"
}
}
} More than 120 requests within the minute
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} 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"
const response = await fetch('https://api.tinylink.fr/v1/pages/my-page/stats?days=7', {
headers: { Authorization: 'Bearer tl_your_token' },
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/pages/my-page/stats?days=7');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer tl_your_token'],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
'https://api.tinylink.fr/v1/pages/my-page/stats?days=7',
headers={'Authorization': 'Bearer tl_your_token'},
)
data = response.json()
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
}
]
} No token in the request
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Unknown or revoked token
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} The owner's plan does not include the API
{
"error": {
"code": "plan_required",
"message": "The TinyLink API is included in the Pro and Business plans. Upgrade the plan of this environment's owner to use it."
}
} The token does not carry the Read scope
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"read\" scope.",
"details": {
"required_scope": "read"
}
}
} No page with this id or slug in the environment
{
"error": {
"code": "not_found",
"message": "Page not found in this environment."
}
} Period not offered
{
"error": {
"code": "validation_failed",
"message": "The \"days\" parameter must be one of: 1, 7, 30, 90, 0 (all time).",
"details": {
"field": "days"
}
}
} More than 120 requests within the minute
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Environment statistics
GET/v1/stats
The figures for the token's whole environment, as on the dashboard. ?days= is 1, 7, 30 (default), 90, or 0 for all time; ?limit= (1 to 100, default 10) sets the length of the rankings. Read scope.
page_views— page views;page_link_clicks— clicks on the links of those pages;short_link_clicks— short link clicks. Each one hastotal,previous_total,change_pctandall_time_total, as in an element's statisticsclick_through_rate— the share of page views followed by a click, in percent (value), and the previous period's (previous_value);nullwithout viewsdaily— one entry per day with the three counters; with?days=0it is replaced bymonthly, one entry per monthreferrers,countries,devices— the source, country and device of page views and short link clicks, in the same format as for an elementtop_pages— the most viewed pages over the period, with their views and the clicks on their links;top_links— the most clicked short links
curl "https://api.tinylink.fr/v1/stats?days=7&limit=1" \
-H "Authorization: Bearer tl_your_token"
const response = await fetch('https://api.tinylink.fr/v1/stats?days=7&limit=1', {
headers: { Authorization: 'Bearer tl_your_token' },
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/stats?days=7&limit=1');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer tl_your_token'],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
'https://api.tinylink.fr/v1/stats?days=7&limit=1',
headers={'Authorization': 'Bearer tl_your_token'},
)
data = response.json()
Possible responses
{
"days": 7,
"from": "2026-09-29",
"to": "2026-10-05",
"page_views": {
"total": 104,
"previous_total": 88,
"change_pct": 18.2,
"all_time_total": 1240
},
"page_link_clicks": {
"total": 42,
"previous_total": 40,
"change_pct": 5.0,
"all_time_total": 517
},
"short_link_clicks": {
"total": 50,
"previous_total": 62,
"change_pct": -19.4,
"all_time_total": 688
},
"click_through_rate": {
"value": 40.4,
"previous_value": 45.5
},
"daily": [
{
"date": "2026-09-29",
"page_views": 12,
"page_link_clicks": 5,
"short_link_clicks": 8
},
{
"date": "2026-09-30",
"page_views": 18,
"page_link_clicks": 7,
"short_link_clicks": 6
},
{
"date": "2026-10-01",
"page_views": 9,
"page_link_clicks": 3,
"short_link_clicks": 11
},
{
"date": "2026-10-02",
"page_views": 15,
"page_link_clicks": 6,
"short_link_clicks": 4
},
{
"date": "2026-10-03",
"page_views": 22,
"page_link_clicks": 9,
"short_link_clicks": 7
},
{
"date": "2026-10-04",
"page_views": 17,
"page_link_clicks": 8,
"short_link_clicks": 9
},
{
"date": "2026-10-05",
"page_views": 11,
"page_link_clicks": 4,
"short_link_clicks": 5
}
],
"referrers": [
{
"source": "instagram.com",
"count": 71
},
{
"source": "direct",
"count": 58
},
{
"source": "t.co",
"count": 17
},
{
"source": "QR Code",
"count": 8
}
],
"countries": [
{
"country": "FR",
"count": 118
},
{
"country": "BE",
"count": 21
},
{
"country": "CA",
"count": 9
},
{
"country": "unknown",
"count": 6
}
],
"devices": [
{
"device": "mobile",
"count": 109
},
{
"device": "desktop",
"count": 41
},
{
"device": "tablet",
"count": 4
}
],
"top_pages": [
{
"id": "P6ac4011ea1b2c",
"name": "My page",
"url": "https://tnylnk.fr/my-page",
"views": 104,
"link_clicks": 42
}
],
"top_links": [
{
"id": "6ac401093831b",
"url": "https://tnlnk.fr/promo",
"target_url": "https://example.com/promo",
"clicks": 50
}
]
} No token in the request
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Unknown or revoked token
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} The owner's plan does not include the API
{
"error": {
"code": "plan_required",
"message": "The TinyLink API is included in the Pro and Business plans. Upgrade the plan of this environment's owner to use it."
}
} The token does not carry the Read scope
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"read\" scope.",
"details": {
"required_scope": "read"
}
}
} Period not offered
{
"error": {
"code": "validation_failed",
"message": "The \"days\" parameter must be one of: 1, 7, 30, 90, 0 (all time).",
"details": {
"field": "days"
}
}
} Ranking length outside 1 to 100
{
"error": {
"code": "validation_failed",
"message": "The \"limit\" parameter must be between 1 and 100.",
"details": {
"field": "limit"
}
}
} More than 120 requests within the minute
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Tag statistics
GET/v1/tags/{id}/stats
The same figures, limited to the pages and short links that carry the tag, with the same parameters. On top comes tag, the tag itself. With ?limit=100, top_pages and top_links give the figures of each of the tag's elements (at most 100 of each type). Read scope.
curl "https://api.tinylink.fr/v1/tags/46/stats?days=7&limit=1" \
-H "Authorization: Bearer tl_your_token"
const response = await fetch('https://api.tinylink.fr/v1/tags/46/stats?days=7&limit=1', {
headers: { Authorization: 'Bearer tl_your_token' },
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/tags/46/stats?days=7&limit=1');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer tl_your_token'],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
'https://api.tinylink.fr/v1/tags/46/stats?days=7&limit=1',
headers={'Authorization': 'Bearer tl_your_token'},
)
data = response.json()
Possible responses
{
"tag": {
"id": 46,
"name": "Campaign",
"color": "#1E90FF",
"elements_count": 2,
"created_at": "2026-10-05T21:56:57+02:00"
},
"days": 7,
"from": "2026-09-29",
"to": "2026-10-05",
"page_views": {
"total": 104,
"previous_total": 88,
"change_pct": 18.2,
"all_time_total": 1240
},
"page_link_clicks": {
"total": 42,
"previous_total": 40,
"change_pct": 5.0,
"all_time_total": 517
},
"short_link_clicks": {
"total": 50,
"previous_total": 62,
"change_pct": -19.4,
"all_time_total": 688
},
"click_through_rate": {
"value": 40.4,
"previous_value": 45.5
},
"daily": [
{
"date": "2026-09-29",
"page_views": 12,
"page_link_clicks": 5,
"short_link_clicks": 8
},
{
"date": "2026-09-30",
"page_views": 18,
"page_link_clicks": 7,
"short_link_clicks": 6
},
{
"date": "2026-10-01",
"page_views": 9,
"page_link_clicks": 3,
"short_link_clicks": 11
},
{
"date": "2026-10-02",
"page_views": 15,
"page_link_clicks": 6,
"short_link_clicks": 4
},
{
"date": "2026-10-03",
"page_views": 22,
"page_link_clicks": 9,
"short_link_clicks": 7
},
{
"date": "2026-10-04",
"page_views": 17,
"page_link_clicks": 8,
"short_link_clicks": 9
},
{
"date": "2026-10-05",
"page_views": 11,
"page_link_clicks": 4,
"short_link_clicks": 5
}
],
"referrers": [
{
"source": "instagram.com",
"count": 71
},
{
"source": "direct",
"count": 58
},
{
"source": "t.co",
"count": 17
},
{
"source": "QR Code",
"count": 8
}
],
"countries": [
{
"country": "FR",
"count": 118
},
{
"country": "BE",
"count": 21
},
{
"country": "CA",
"count": 9
},
{
"country": "unknown",
"count": 6
}
],
"devices": [
{
"device": "mobile",
"count": 109
},
{
"device": "desktop",
"count": 41
},
{
"device": "tablet",
"count": 4
}
],
"top_pages": [
{
"id": "P6ac4011ea1b2c",
"name": "My page",
"url": "https://tnylnk.fr/my-page",
"views": 104,
"link_clicks": 42
}
],
"top_links": [
{
"id": "6ac401093831b",
"url": "https://tnlnk.fr/promo",
"target_url": "https://example.com/promo",
"clicks": 50
}
]
} No token in the request
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Unknown or revoked token
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} The owner's plan does not include the API
{
"error": {
"code": "plan_required",
"message": "The TinyLink API is included in the Pro and Business plans. Upgrade the plan of this environment's owner to use it."
}
} The token does not carry the Read scope
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"read\" scope.",
"details": {
"required_scope": "read"
}
}
} No tag with this id in the environment
{
"error": {
"code": "not_found",
"message": "Tag not found in this environment."
}
} Period not offered
{
"error": {
"code": "validation_failed",
"message": "The \"days\" parameter must be one of: 1, 7, 30, 90, 0 (all time).",
"details": {
"field": "days"
}
}
} Ranking length outside 1 to 100
{
"error": {
"code": "validation_failed",
"message": "The \"limit\" parameter must be between 1 and 100.",
"details": {
"field": "limit"
}
}
} More than 120 requests within the minute
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
}