Analytics API
Views, watch time, unique viewers and bytes delivered, counted at delivery.
Needs the analytics:read scope.
The app's analytics
GET /v1/analytics
Totals, the same number of whole buckets just before (previous), a zero-filled series (hourly for 24h, daily otherwise; the last bucket is partial), storage bytes currently held (storage), and the top 10 live videos by views (top_assets). unique_viewers counts distinct vid claims in tokens (by hour for 24h, by UTC day otherwise, excluding poster fetches) and is null when no view carried one.
Authentication: An API key with analytics:read.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
range | query | "24h", "7d", "30d", "90d" | yes |
Response 200
Totals and series
{
"totals": {
"views": 1840,
"watch_seconds": 302400,
"unique_viewers": 412,
"bytes_delivered": 98123456789
},
"previous": {
"views": 1502,
"watch_seconds": 251000,
"unique_viewers": null,
"bytes_delivered": 80211000000
},
"series": [
{
"t": "2026-11-17T00:00:00Z",
"views": 260,
"watch_seconds": 43100,
"bytes_delivered": 14000000000
}
],
"top_assets": [
{
"asset_id": "ast_01jhsze3w2mhtbzr5qv1w5xy68",
"title": "Lesson 42: Sorting",
"views": 310,
"watch_seconds": 61000,
"bytes_delivered": 17000000000
}
],
"storage": {
"source_bytes": 524288000,
"media_bytes": 2147483648,
"total_bytes": 2671771648
},
"collecting": {
"builtin": true,
"edge": "not_used"
}
}Errors
| Status | Code |
|---|---|
| 400 | invalid_request |
| 401 | unauthorized |
| 403 | insufficient_scope |
| 429 | rate_limited |
One asset's analytics
GET /v1/analytics/assets/{id}
The same for one video, without top_assets. A deleted video keeps its history.
Authentication: An API key with analytics:read.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | Asset ID (ast_…). |
range | query | "24h", "7d", "30d", "90d" | yes |
Response 200
Totals and series, without top_assets
{
"totals": {
"views": 1840,
"watch_seconds": 302400,
"unique_viewers": 412,
"bytes_delivered": 98123456789
},
"previous": {
"views": 1502,
"watch_seconds": 251000,
"unique_viewers": null,
"bytes_delivered": 80211000000
},
"series": [
{
"t": "2026-11-17T00:00:00Z",
"views": 260,
"watch_seconds": 43100,
"bytes_delivered": 14000000000
}
],
"storage": {
"source_bytes": 52428800,
"media_bytes": 214748364,
"total_bytes": 267177164
},
"collecting": {
"builtin": true,
"edge": "not_used"
}
}Errors
| Status | Code |
|---|---|
| 400 | invalid_request |
| 401 | unauthorized |
| 403 | insufficient_scope |
| 404 | not_found |
| 429 | rate_limited |