v2

latestOpenAPI 3.1.02026-08-075421692.0 MB
Analytics

Get 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.

get/v1/analytics/youtube/channel-insights

Query parameters

accountIdstring required

The Zernio SocialAccount ID for the YouTube account.

metricsstring

Comma-separated list. Defaults to "views,estimatedMinutesWatched,subscribersGained,subscribersLost".

Live YouTube Analytics v2 metrics:

  • views
  • estimatedMinutesWatched
  • averageViewDuration (ratio - weighted mean computed across days)
  • subscribersGained
  • subscribersLost

Zernio-synthesized from daily follower snapshots (cross-platform parity):

  • followers_gained
  • followers_lost
sincestring date

Start date (YYYY-MM-DD). Defaults to 30 days ago.

untilstring date

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 reflects your requested value.

metricType'time_series' | 'total_value'

"total_value" (default) returns aggregated totals. "time_series" returns per-day values in the "values" array.

Response

Channel insights data

successboolean
accountIdstring

The Zernio SocialAccount ID

platform'facebook' | 'instagram' | 'youtube' | 'linkedin' | 'tiktok'

Platform that served this response.

metricType'time_series' | 'total_value'
breakdownstring

Breakdown dimension used (only present when breakdown was requested)

metricsobject

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" (array of {dimension, value}).

Monetary metrics additionally carry "unit" and "currency". Zernio never rescales money: "total" and every "values[].value" are the platform's raw numbers in the stated unit. Monetary metrics also keep "values" on metricType=total_value, because their "total" is the sum of the daily buckets the platform returned over the range: keep the series so you can reconcile that sum against the platform's own reporting before invoicing on it. A metric that could not be served is absent from this object and listed in "unavailableMetrics" instead, so an unavailable metric is never reported as a zero.

dataDelaystring

Example response

{
  "success": true,
  "dataDelay": "Data may be delayed up to 48 hours"
}