Analytics

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, and an explicit endDate can reach into the delay window (see the endDate parameter). Max 90 days, defaults to last 30 days.

get/v1/analytics/youtube/daily-views

Query parameters

videoIdstring required

The YouTube video ID (e.g., "dQw4w9WgXcQ")

accountIdstring required

The Zernio account ID for the YouTube account

fromDatestring date

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

toDatestring date

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), and days YouTube has not processed yet are omitted from dailyViews.

startDatestring date

Alias of fromDate, kept for existing callers

endDatestring date

Alias of toDate, kept for existing callers

Response

Daily views breakdown

successboolean
videoIdstring

The YouTube video ID

durationSecondsinteger nullable

Video length in seconds (from YouTube contentDetails.duration)

provisionalSincestring date

Present only when the range reaches into YouTube's ~3-day processing window: the first date whose numbers are provisional and may still be revised by YouTube.

totalViewsinteger

Sum of views across all days in the range

lastSyncedAtstring date-time nullable

When the data was last synced from YouTube

Example response

{
  "success": true
}

Changes

Changed in 1 of the 56 revisions of this API.4

    • ○

      added the new optional query request parameter fromDate

      new-optional-request-parameter

    • ○

      added the new optional query request parameter toDate

      new-optional-request-parameter

    • ○

      query request parameter endDate was deprecated

      request-parameter-deprecated

    • ○

      query request parameter startDate was deprecated

      request-parameter-deprecated