Account-wide analytics aggregates by resource type and dataset.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Get account-wide analytics aggregates (no single content id in the path).
GET /v2/analytics/{resource_type}/{data_set}
A successful call returns 200 and a JSON array. Bandwidth fields such as bytes are returned as raw byte counts.
For a single VOD, channel, or folder, use Individual Content Data (folder totals are the sum of member assets).
Path parameters
| Name | Type | Description |
|---|---|---|
resource_type | string | Required. One of: vod, channel, folder. Plural forms return 400 Invalid content type. |
data_set | string | Required. One of: bytesperperiod, bytespercontent, visitorsperperiod, visitorspercontent, visitorspercountry. |
Query parameters
| Name | Type | Description |
|---|---|---|
startdate | string | Start of the range. Preferred form: YYYY-MM-DD. Datetime values such as YYYY-MM-DDTHH:MM:SS are also accepted. |
enddate | string | End of the range. Same formats as startdate. |
timezone-offset | integer | Minutes relative to UTC (default 0). |
Date and time behavior
- Prefer
YYYY-MM-DD. Invalid or unusual formats may still return 200 with an unexpected window. - With date-only values, period boundaries can disagree with inclusive UI date pickers (extra or missing edge days). Passing a datetime on
enddate(for example…T23:59:59) changes which calendar days appear — inspectdatetimein the response. - Omitting dates is allowed; the API still returns data (often a short recent window).
resource_type on this endpoint
resource_type on this endpointresource_type is required in the path. For bytesperperiod, bytespercontent, visitorsperperiod, and visitorspercountry, responses use the same account-wide totals for vod, channel, and folder.
visitorspercontent is different: it returns a list of assets, and the row field name depends on resource_type:
resource_type=vod→ each row has"file"(title or id), plushitsandvisitorsresource_type=channel→ each row has"channel"(id), plushitsandvisitors
Bucket granularity
For *perperiod datasets the API returns time buckets based on the requested range:
| Range | Buckets |
|---|---|
| Up to about 6 days | Hourly |
| About 7-31 days | Daily |
| Longer multi-month ranges | Monthly |
bytesperperiod and visitorsperperiod may use different thresholds for the same dates. Use the datetime values in the response to see which bucket size you received.
Data sets
data_set | What you get |
|---|---|
bytesperperiod | Bandwidth over time: bytes, datetime |
bytespercontent | One row with total bytes for the range (not a per-asset list) |
visitorsperperiod | datetime, hits, visitors |
visitorspercontent | Per-asset rows: file when resource_type=vod, or channel when resource_type=channel, plus hits / visitors |
visitorspercountry | country_name, hits, visitors |
Examples
Bytes per period
curl -X GET "https://developer.dacast.com/v2/analytics/vod/bytesperperiod?startdate=2026-08-01&enddate=2026-08-07" \
-H "X-Api-Key: insertYourApiKeyHere" \
-H "X-Format: default"[
{
"bytes": 2028780233,
"datetime": "2026-08-01 00:00:00"
},
{
"bytes": 1973438647,
"datetime": "2026-08-02 00:00:00"
},
{
"bytes": 1991626506,
"datetime": "2026-08-03 00:00:00"
}
]Bytes per content
curl -X GET "https://developer.dacast.com/v2/analytics/vod/bytespercontent?startdate=2026-08-01&enddate=2026-08-07" \
-H "X-Api-Key: insertYourApiKeyHere" \
-H "X-Format: default"[
{
"bytes": 15939033676
}
]Visitors per period
curl -X GET "https://developer.dacast.com/v2/analytics/vod/visitorsperperiod?startdate=2026-08-01&enddate=2026-08-07" \
-H "X-Api-Key: insertYourApiKeyHere" \
-H "X-Format: default"[
{
"datetime": "2026-08-01 03:00:00",
"hits": 3,
"visitors": 3
},
{
"datetime": "2026-08-01 11:00:00",
"hits": 2,
"visitors": 2
},
{
"datetime": "2026-08-02 03:00:00",
"hits": 6,
"visitors": 3
}
]Visitors per country
curl -X GET "https://developer.dacast.com/v2/analytics/vod/visitorspercountry?startdate=2026-08-01&enddate=2026-08-07" \
-H "X-Api-Key: insertYourApiKeyHere" \
-H "X-Format: default"[
{
"country_name": "France",
"hits": 68,
"visitors": 53
},
{
"country_name": "Portugal",
"hits": 7,
"visitors": 7
}
]Visitors per content (VOD)
curl -X GET "https://developer.dacast.com/v2/analytics/vod/visitorspercontent?startdate=2026-08-01&enddate=2026-08-07" \
-H "X-Api-Key: insertYourApiKeyHere" \
-H "X-Format: default"[
{
"file": "Episode 1",
"hits": 2,
"visitors": 1
},
{
"file": "Episode 2",
"hits": 1,
"visitors": 0
}
]Visitors per content (channel)
curl -X GET "https://developer.dacast.com/v2/analytics/channel/visitorspercontent?startdate=2026-08-01&enddate=2026-08-07" \
-H "X-Api-Key: insertYourApiKeyHere" \
-H "X-Format: default"[
{
"channel": "live-61812c52-191f-483e-8e49-3027ed84fea6",
"hits": 1,
"visitors": 0
},
{
"channel": "live-e3239795-6657-41bc-ac35-88cfa205c854",
"hits": 1,
"visitors": 1
}
]