Get analytics for a single VOD, channel, or folder.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Get analytics for one VOD, live channel, or folder.
GET /v2/analytics/{resource_type}/{id}/{data_set}
A successful call returns 200 and a JSON array. An unknown id, a mismatched resource_type, or a period with no data returns 200 with [] (not 404).
On the dashboard, Plays maps to API hits, and Impressions maps to API visitors.
For VOD and channel,{id}is a UUID (for example28cfe183-675c-4aa5-95d6-3cf5260d92c6). Folder ids are numeric strings (for example1259852) - get them from Create Folder / List Folders, or fromfolders[].idon Lookup Video. See also Folders and Analytics.
Folders
For resource_type=folder, totals are the sum of analytics for VOD (and other assets) that belong to that folder (bytes, hits, and visitors match the sum of the members over the same date range).
bytespercontent / visitorspercontent for a folder return a single aggregate row (not a per-video breakdown).
To obtain {folderId}: create or list folders (GET /v2/folder), or read folders[].id from a VOD lookup. Prefer folders over folder_ids on the VOD response - folder_ids is often null even when the asset is in a folder.
Path parameters
| Name | Type | Description |
|---|---|---|
resource_type | string | Required. One of: vod, channel, folder. |
id | string | Required. Content id (UUID for VOD/channel; numeric string for folder - from create/list folder or folders[].id on a VOD). |
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 or YYYY-MM-DD HH:MM:SS (optional Z) 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. Other shapes may return 200 with an unexpected window (they are not consistently rejected as 400). - With date-only
enddateand daily buckets, that calendar day is not included. To include plays on dayD, either setenddatetoD+1, or pass a datetime on dayD(for example2026-08-21T23:59:59). - Example:
startdate=2026-08-01&enddate=2026-08-21can omit 21 Aug;enddate=2026-08-22orenddate=2026-08-21T23:59:59includes it.
Bucket granularity
For *perperiod datasets the API returns time buckets based on the requested range:
| Range | Buckets |
|---|---|
| Up to about 6 days | Hourly (datetime includes a non-midnight time) |
| About 7-31 days | Daily (datetime ends with 00:00:00) |
| Longer multi-month ranges | Monthly (first day of each month) |
bytesperperiod and visitorsperperiod may use different thresholds for the same dates (for example a 7-day window can be daily for bytes and hourly for visitors). Use the datetime values in the response to see which bucket size you received.
Data sets
data_set | Typical row fields |
|---|---|
visitorsperperiod | datetime, hits, visitors |
visitorspercontent | For VOD: file, hits, visitors (file may be a title/filename). For folder: one aggregate row. |
visitorspercountry | country_name, hits, visitors |
bytesperperiod | datetime, bytes |
bytespercontent | bytes, and often file for VOD. For folder: one aggregate row. |
Examples
Monthly visitors for one VOD (6-month style window):
curl -X GET "https://developer.dacast.com/v2/analytics/vod/{id}/visitorsperperiod?startdate=2026-02-21&enddate=2026-08-22" \
-H "X-Api-Key: insertYourApiKeyHere" \
-H "X-Format: default"[
{
"datetime": "2026-05-01 00:00:00",
"hits": 5,
"visitors": 11
},
{
"datetime": "2026-06-01 00:00:00",
"hits": 23,
"visitors": 51
},
{
"datetime": "2026-07-01 00:00:00",
"hits": 42,
"visitors": 58
},
{
"datetime": "2026-08-01 00:00:00",
"hits": 34,
"visitors": 34
}
]Folder usage (sum of members):
curl -X GET "https://developer.dacast.com/v2/analytics/folder/{folderId}/bytesperperiod?startdate=2026-02-21&enddate=2026-08-22" \
-H "X-Api-Key: insertYourApiKeyHere" \
-H "X-Format: default"Daily visitors for August, inclusive of the 21st via enddate the next day:
curl -X GET "https://developer.dacast.com/v2/analytics/vod/{id}/visitorsperperiod?startdate=2026-08-01&enddate=2026-08-22" \
-H "X-Api-Key: insertYourApiKeyHere" \
-H "X-Format: default"Same inclusive end using a datetime on the last day:
curl -X GET "https://developer.dacast.com/v2/analytics/vod/{id}/visitorsperperiod?startdate=2026-08-01&enddate=2026-08-21T23:59:59" \
-H "X-Api-Key: insertYourApiKeyHere" \
-H "X-Format: default"See also Content Group Data for account-wide aggregates without {id}.
