Appearance
Get YouTube channel-level insights
Returns channel-scoped aggregate metrics from YouTube Analytics API v2. Saves you from looping /v1/analytics/youtube/daily-views over every video when you only need channel totals.
Response shape matches /v1/analytics/instagram/account-insights so the same client handling works. Requires yt-analytics.readonly scope (412 with reauthorizeUrl if missing). Data has a 2-3 day delay (endDate is clamped accordingly). Max 89 days, defaults to last 30 days. Requires the Analytics add-on.
NOT exposed: impressions (Studio thumbnail impressions) and impressionsClickThroughRate. YouTube Analytics API v2 does not expose these for any principal type, not channel owners, not Partner Program channels, not content owners with CMS access. The only way to get them is Studio CSV export. This is a Google-side limitation.
GET /v1/analytics/youtube/channel-insights
Returns channel-scoped aggregate metrics from YouTube Analytics API v2. Saves you from looping /v1/analytics/youtube/daily-views over every video when you only need channel totals.
Response shape matches /v1/analytics/instagram/account-insights so the same client handling works. Requires yt-analytics.readonly scope (412 with reauthorizeUrl if missing). Data has a 2-3 day delay (endDate is clamped accordingly). Max 89 days, defaults to last 30 days. Requires the Analytics add-on.
NOT exposed: impressions (Studio thumbnail impressions) and impressionsClickThroughRate. YouTube Analytics API v2 does not expose these for any principal type, not channel owners, not Partner Program channels, not content owners with CMS access. The only way to get them is Studio CSV export. This is a Google-side limitation.
Parameters
accountId(query, string) required — The Zernio SocialAccount ID for the YouTube account.metrics(query, string) — Comma-separated list. Defaults to "views,estimatedMinutesWatched,subscribersGained,subscribersLost". Live YouTube Analytics v2 metrics: - views - estimatedMinutesWatched - averageViewDuration (ratio - weighted mean computed across day...since(query, string) — Start date (YYYY-MM-DD). Defaults to 30 days ago.until(query, string) — End date (YYYY-MM-DD). Defaults to today. YouTube Analytics has a 2-3 day delay, so the fetch is internally clamped to 3 days ago; any requested range extending beyond that returns zero values for the tail days. The response's dateRange.until field r...metricType(query, string) — "total_value" (default) returns aggregated totals. "time_series" returns per-day values in the "values" array.
Responses
200 — Channel insights data
success(boolean)accountId(string) — The Zernio SocialAccount IDplatform(string) (enum: facebook, instagram, youtube, linkedin, tiktok) — Platform that served this response.dateRange(object)metricType(string) (enum: time_series, total_value)breakdown(string) — Breakdown dimension used (only present when breakdown was requested)metrics(object) — Object keyed by metric name. For time_series: each metric has "total" (number) and "values" (array of {date, value}). For total_value: each metric has "total" (number) and optionally "breakdowns" (arr...dataDelay(string)
400 — Bad request (invalid accountId / metrics / metricType / date range, or account is not a YouTube account)
401
402 — Analytics access required. Legacy plans need the Analytics add-on; included by default on usage-based plans.
404 — Account not found
412 — Missing YouTube Analytics scope
success(boolean)error(string)code(string)scopeStatus(object)