---
title: "Get YouTube channel insights"
method: GET
path: "/v1/analytics/youtube/channel-insights"
tags: ["Analytics"]
---

# Get YouTube channel insights

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

## Query parameters

- `accountId` string, required
- `metrics` string
- `since` string, date
- `until` string, date
- `metricType` 'time_series' | 'total_value'

## Response `200`

Channel insights data

- InstagramAccountInsightsResponse — Shared account-insights response envelope used by every platform-level analytics endpoint (/v1/analytics/{facebook|instagram|youtube|linkedin|tiktok}/*). The name is historical - the shape was first shipped for Instagram and every new platform endpoint reuses it for response-shape consistency. The platform field echoes back which platform served the response.
  - `success` boolean
  - `accountId` string — The Zernio SocialAccount ID
  - `platform` 'facebook' | 'instagram' | 'youtube' | 'linkedin' | 'tiktok' — Platform that served this response.
  - `dateRange` object
    - `since` string, date
    - `until` string, date
  - `metricType` '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" (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.
  - `unavailableMetrics` object[] — Requested metrics that could not be served. Present only when at least one metric is unavailable, and absent otherwise. Each listed metric is OMITTED from "metrics" rather than reported as 0, which is how an unavailable metric is distinguished from a genuine zero. The request itself still succeeds with HTTP 200.
    - `metric` string — The requested metric name.
    - `reason` 'not_enrolled' | 'permission_missing' | 'unsupported_metric' | 'no_data' | 'unreadable_value' | 'mixed_currency' | 'upstream_error' — "not_enrolled": the account is not enrolled in the program behind this metric. "permission_missing": the connected user lacks access to this metric. "unsupported_metric": the platform does not accept this metric name on the API version Zernio uses. "no_data": the platform returned no bucket for this metric over the requested range. "unreadable_value": the platform returned a value shape Zernio cannot read, so no total is reported. "mixed_currency": readable values disagree on currency or unit within the range. "upstream_error": any other platform failure. "no_data" is the common case in practice. The others are defensive: "not_enrolled" and "unsupported_metric" in particular have not been observed on live Facebook traffic, since a non-enrolled Page returns zeros rather than an error and metric names are validated before any platform call.
    - `message` string — Platform-provided explanation when available (access tokens redacted), otherwise Zernio copy.
  - `dataDelay` string

## Other responses

- `400` — Bad request (invalid accountId / metrics / metricType / date range, or account is not a YouTube account)
- `401` — Unauthorized
- `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

---

[API](https://skmtc.net/zernio/apis/zernio-api.md) · [All operations](https://skmtc.net/zernio/apis/zernio-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/zernio/zernio-api/revisions/15e893e69e8c/schema)
