curl --request GET \
--url https://video.bunnycdn.com/library/{libraryId}/statistics \
--header 'AccessKey: <api-key>'{
"viewsChart": {},
"watchTimeChart": {},
"countryViewCounts": {},
"countryWatchTime": {},
"engagementScore": 123
}Returns time-series views and watch time, plus country-level aggregates, at the library level or for a specific video. Control the time window with dateFrom/dateTo and the granularity with hourly. Basic safeguards prevent spam and bot inflation by de-duplicating sessions and ignoring obviously invalid events.
curl --request GET \
--url https://video.bunnycdn.com/library/{libraryId}/statistics \
--header 'AccessKey: <api-key>'{
"viewsChart": {},
"watchTimeChart": {},
"countryViewCounts": {},
"countryWatchTime": {},
"engagementScore": 123
}AccessKey based authentication
Optional start of the time range (UTC). If omitted or invalid, the last 30 days are returned.
Optional end of the time range (UTC). If omitted with a valid start, defaults to now; otherwise the last 30 days are returned.
Optional. If true, returns hourly data; otherwise daily (UTC). Default is daily.
Optional video GUID to filter results. When omitted, returns library-level aggregates.
Statistics including time-series views and watch time, country breakdowns, and engagement score when available.
Shows the number of playback starts over time, with each data point representing the count of view starts in the corresponding UTC interval (hourly or daily). It is available at both the library level (aggregated across all videos) and the video level (for a single video). A playback start is counted once per viewer session per video and empty intervals are shown as zero.
Show child attributes
Shows the cumulative time viewers spent watching over time, with each data point representing total watch time in the corresponding UTC interval (hourly or daily). It is available at both the library level (aggregated across all videos) and the video level (for a single video). Rewatches and repeated visits add to the total and empty intervals are shown as zero.
Show child attributes
Shows the total number of playback starts by country for the selected time range. It is available at both the library level (aggregated across all videos) and the video level (for a single video). Each country’s value reflects unique playback starts per viewer session based on IP geolocation at playback start.
Show child attributes
Shows the total watch time by country for the selected time range. It is available at both the library level (aggregated across all videos) and the video level (for a single video). Values reflect cumulative viewing time (rewatches and repeated visits add to the total) based on IP geolocation at playback start.
Show child attributes
Indicates how engaging a specific video is on a 0–100 scale based on viewing duration and viewing patterns; higher values reflect stronger viewer retention. Reported at the video level only and may be unavailable when there isn’t enough viewing data.
Was this page helpful?