Skip to content

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). Data has a 2-3 day delay. Max 90 days, defaults to last 30 days.

GET /v1/analytics/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). Data has a 2-3 day delay. Max 90 days, defaults to last 30 days.

Parameters

  • videoId (query, string) required — The YouTube video ID (e.g., "dQw4w9WgXcQ")

  • accountId (query, string) required — The Zernio account ID for the YouTube account

  • startDate (query, string) — Start date (YYYY-MM-DD). Defaults to 30 days ago.

  • endDate (query, string) — End date (YYYY-MM-DD). Defaults to 3 days ago (YouTube data latency).

Responses

200 — Daily views breakdown

  • success (boolean)
  • videoId (string) — The YouTube video ID
  • dateRange (object)
  • totalViews (integer) — Sum of views across all days in the range
  • dailyViews (array)
  • lastSyncedAt (string) — When the data was last synced from YouTube
  • scopeStatus (object)

400 — Bad request (missing or invalid parameters)

  • error (string)

401

402 — Analytics access required. Legacy plans need the Analytics add-on; included by default on usage-based plans.

  • error (string)
  • code (string)

403 — Access denied to this account

  • error (string)

412 — Missing YouTube Analytics scope

  • success (boolean)
  • error (string)
  • code (string)
  • scopeStatus (object)

500 — Internal server error

  • success (boolean)
  • error (string)