Get YouTube video retention curve
Returns the audience retention curve for a single YouTube video, plus the video's duration for rendering the curve on a time axis. Requires yt-analytics.readonly scope (re-authorization may be needed).
Authentication
API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
Query parameters
The YouTube video ID (e.g., "dQw4w9WgXcQ")
The Zernio account ID for the YouTube account
Start date (YYYY-MM-DD). Defaults to the video's publish date (lifetime curve).
End date (YYYY-MM-DD). Defaults to 3 days ago, the newest fully finalized day (YouTube finalizes analytics with a ~3-day delay). An explicit toDate is honored up to today: days inside the delay window are provisional and may still be revised by YouTube (see provisionalSince in the response).
Alias of fromDate, kept for existing callers
Alias of toDate, kept for existing callers
Responses
Success· the request worked
Errors· the request failed
How it behaves
The curve
- Up to 100 points (elapsedVideoTimeRatio 0.01-1.0), aggregated over the whole date range. YouTube does not support per-day retention breakdowns.
- audienceWatchRatio: the absolute share of viewers watching at that point in the video. It can exceed 1 (rewinds and looping, common on Shorts).
- relativeRetentionPerformance: compares against videos of similar length (0 = worst, 0.5 = median, 1 = best).
- Zernio returns exactly the buckets YouTube reports for the requested range and fills none in. A curve that ends before 1.0, or skips a position, means YouTube returned no row there for that range.
- The range ends at toDate (default 3 days ago), so recent views are included only with a later toDate.
Empty curves
YouTube returns an empty curve for videos with very few views or before analytics processing completes (2-3 day delay).
startedWatching and stoppedWatching
YouTube does not return segment-level data for every video. Zernio then fetches the curve without it: segmentMetricsAvailable is false and both fields are 0 placeholders in every point. When it is true, a 0 is the value YouTube reported.
Get YouTube daily views
Returns daily view counts for a YouTube video including views, watch time, and subscriber changes. Requires yt-analytics.readonly scope (re-authorization may be needed). - YouTube finalizes analytics with a ~3-day delay. By default only finalized days are returned; an explicit endDate can reach into the delay window (see the endDate parameter). - Max 90 days, defaults to last 30 days.
Get YouTube demographics
Returns audience demographic insights for a YouTube channel, broken down by age, gender, and/or country. Pass videoId to get the audience profile of a single video instead of the whole channel. - Age and gender values are viewer percentages (0-100). - Country values are view counts. Data is based on signed-in viewers only, with a 2-3 day delay. YouTube suppresses demographics for videos with too few signed-in views, so low-traffic videos can return empty breakdowns.