Statistiche
Le visualizzazioni e i clic nel periodo che preferisci, per un elemento, per gli elementi di un tag o per tutto lo spazio di lavoro, con la loro ripartizione per provenienza, paese e dispositivo.
- GET
/v1/links/{id}/statsClic di un link breve - GET
/v1/pages/{id}/statsVisualizzazioni di una pagina - GET
/v1/statsStatistiche dello spazio di lavoro - GET
/v1/tags/{id}/statsStatistiche di un tag
Clic di un link breve
GET/v1/links/{id}/stats
?days= vale 1, 7, 30 (predefinito), 90, oppure 0 per da sempre. Ambito Lettura.
total— il totale del periodo;previous_totalquello del periodo precedente echange_pctla variazione in percentualeall_time_total— il totale dalla creazionedaily— la serie per giorno; con?days=0, viene sostituita damonthly, una voce per mese (month,count)referrers— la provenienza: un nome di dominio,directounknowncountries— il codice del paese di due lettere, ounknowndevices—desktop,mobile,tablet,console,tvounknown
curl "https://api.tinylink.fr/v1/links/promo/stats?days=7" \
-H "Authorization: Bearer tl_il_tuo_token"
const response = await fetch('https://api.tinylink.fr/v1/links/promo/stats?days=7', {
headers: { Authorization: 'Bearer tl_il_tuo_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_il_tuo_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_il_tuo_token'},
)
data = response.json()
Risposte possibili
{
"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
}
]
} Token assente dalla richiesta
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Token sconosciuto o revocato
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} Il piano del proprietario non include l'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."
}
} Il token non ha l'ambito Lettura
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"read\" scope.",
"details": {
"required_scope": "read"
}
}
} Nessun link breve con questo identificativo o questo slug nello spazio di lavoro
{
"error": {
"code": "not_found",
"message": "Link not found in this environment."
}
} Periodo non previsto
{
"error": {
"code": "validation_failed",
"message": "The \"days\" parameter must be one of: 1, 7, 30, 90, 0 (all time).",
"details": {
"field": "days"
}
}
} Più di 120 richieste nel minuto
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Visualizzazioni di una pagina
GET/v1/pages/{id}/stats
Stessi parametri e stessi campi, con metric a views. Si aggiunge links: i clic di ciascuno dei link della pagina nel periodo. Ambito Lettura.
curl "https://api.tinylink.fr/v1/pages/ma-page/stats?days=7" \
-H "Authorization: Bearer tl_il_tuo_token"
const response = await fetch('https://api.tinylink.fr/v1/pages/ma-page/stats?days=7', {
headers: { Authorization: 'Bearer tl_il_tuo_token' },
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/pages/ma-page/stats?days=7');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer tl_il_tuo_token'],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
'https://api.tinylink.fr/v1/pages/ma-page/stats?days=7',
headers={'Authorization': 'Bearer tl_il_tuo_token'},
)
data = response.json()
Risposte possibili
{
"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": "Mon site",
"clicks": 19
},
{
"id": "L6ac4011ee9fab",
"title": "Contact",
"clicks": 4
}
]
} Token assente dalla richiesta
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Token sconosciuto o revocato
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} Il piano del proprietario non include l'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."
}
} Il token non ha l'ambito Lettura
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"read\" scope.",
"details": {
"required_scope": "read"
}
}
} Nessuna pagina con questo identificativo o questo slug nello spazio di lavoro
{
"error": {
"code": "not_found",
"message": "Page not found in this environment."
}
} Periodo non previsto
{
"error": {
"code": "validation_failed",
"message": "The \"days\" parameter must be one of: 1, 7, 30, 90, 0 (all time).",
"details": {
"field": "days"
}
}
} Più di 120 richieste nel minuto
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Statistiche dello spazio di lavoro
GET/v1/stats
I numeri di tutto lo spazio di lavoro del token, come nella dashboard. ?days= vale 1, 7, 30 (predefinito), 90, oppure 0 per da sempre; ?limit= (da 1 a 100, 10 predefinito) fissa la lunghezza delle classifiche. Ambito Lettura.
page_views— le visualizzazioni delle pagine;page_link_clicks— i clic sui link di queste pagine;short_link_clicks— i clic dei link brevi. Ognuno portatotal,previous_total,change_pcteall_time_total, come le statistiche di un elementoclick_through_rate— la quota di visualizzazioni di pagine seguite da un clic, in percentuale (value), e quella del periodo precedente (previous_value);nullsenza visualizzazionidaily— una voce per giorno con i tre contatori; con?days=0, viene sostituita damonthly, una voce per mesereferrers,countries,devices— la provenienza, il paese e il dispositivo delle visualizzazioni di pagine e dei clic dei link brevi, nello stesso formato di un elementotop_pages— le pagine più viste nel periodo, con le loro visualizzazioni e i clic sui loro link;top_links— i link brevi più cliccati
curl "https://api.tinylink.fr/v1/stats?days=7&limit=1" \
-H "Authorization: Bearer tl_il_tuo_token"
const response = await fetch('https://api.tinylink.fr/v1/stats?days=7&limit=1', {
headers: { Authorization: 'Bearer tl_il_tuo_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_il_tuo_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_il_tuo_token'},
)
data = response.json()
Risposte possibili
{
"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": "La mia pagina",
"url": "https://tnylnk.fr/la-mia-pagina",
"views": 104,
"link_clicks": 42
}
],
"top_links": [
{
"id": "6ac401093831b",
"url": "https://tnlnk.fr/promo",
"target_url": "https://esempio.it/promo",
"clicks": 50
}
]
} Token assente dalla richiesta
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Token sconosciuto o revocato
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} Il piano del proprietario non include l'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."
}
} Il token non ha l'ambito Lettura
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"read\" scope.",
"details": {
"required_scope": "read"
}
}
} Periodo non previsto
{
"error": {
"code": "validation_failed",
"message": "The \"days\" parameter must be one of: 1, 7, 30, 90, 0 (all time).",
"details": {
"field": "days"
}
}
} Lunghezza della classifica fuori da 1 a 100
{
"error": {
"code": "validation_failed",
"message": "The \"limit\" parameter must be between 1 and 100.",
"details": {
"field": "limit"
}
}
} Più di 120 richieste nel minuto
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Statistiche di un tag
GET/v1/tags/{id}/stats
Gli stessi numeri, limitati alle pagine e ai link brevi che portano il tag, con gli stessi parametri. Si aggiunge tag, il tag stesso. Con ?limit=100, top_pages e top_links danno i numeri di ciascuno degli elementi del tag (100 al massimo per tipo). Ambito Lettura.
curl "https://api.tinylink.fr/v1/tags/46/stats?days=7&limit=1" \
-H "Authorization: Bearer tl_il_tuo_token"
const response = await fetch('https://api.tinylink.fr/v1/tags/46/stats?days=7&limit=1', {
headers: { Authorization: 'Bearer tl_il_tuo_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_il_tuo_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_il_tuo_token'},
)
data = response.json()
Risposte possibili
{
"tag": {
"id": 46,
"name": "Campagna",
"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": "La mia pagina",
"url": "https://tnylnk.fr/la-mia-pagina",
"views": 104,
"link_clicks": 42
}
],
"top_links": [
{
"id": "6ac401093831b",
"url": "https://tnlnk.fr/promo",
"target_url": "https://esempio.it/promo",
"clicks": 50
}
]
} Token assente dalla richiesta
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Token sconosciuto o revocato
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} Il piano del proprietario non include l'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."
}
} Il token non ha l'ambito Lettura
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"read\" scope.",
"details": {
"required_scope": "read"
}
}
} Nessun tag con questo identificativo nello spazio di lavoro
{
"error": {
"code": "not_found",
"message": "Tag not found in this environment."
}
} Periodo non previsto
{
"error": {
"code": "validation_failed",
"message": "The \"days\" parameter must be one of: 1, 7, 30, 90, 0 (all time).",
"details": {
"field": "days"
}
}
} Lunghezza della classifica fuori da 1 a 100
{
"error": {
"code": "validation_failed",
"message": "The \"limit\" parameter must be between 1 and 100.",
"details": {
"field": "limit"
}
}
} Più di 120 richieste nel minuto
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
}