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.
API key authentication - use your Zernio API key as a Bearer token
In: header
Query Parameters
The YouTube video ID (e.g., "dQw4w9WgXcQ")
The Zernio account ID for the YouTube account
Start date (YYYY-MM-DD). Defaults to 30 days ago.
dateEnd date (YYYY-MM-DD). Defaults to 3 days ago (YouTube data latency).
dateResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://zernio.com/api/v1/analytics/youtube/daily-views?videoId=string&accountId=string"{
"success": true,
"videoId": "dQw4w9WgXcQ",
"dateRange": {
"startDate": "2025-01-01",
"endDate": "2025-01-12"
},
"totalViews": 12345,
"dailyViews": [
{
"date": "2025-01-12",
"views": 1234,
"estimatedMinutesWatched": 567.5,
"averageViewDuration": 45.2,
"subscribersGained": 10,
"subscribersLost": 2,
"likes": 89,
"comments": 12,
"shares": 5
},
{
"date": "2025-01-11",
"views": 987,
"estimatedMinutesWatched": 432.1,
"averageViewDuration": 43.8,
"subscribersGained": 8,
"subscribersLost": 1,
"likes": 67,
"comments": 8,
"shares": 3
}
],
"lastSyncedAt": "2025-01-15T12:00:00Z",
"scopeStatus": {
"hasAnalyticsScope": true
}
}{
"error": "videoId is required"
}{
"error": "Unauthorized"
}{
"error": "Analytics add-on required",
"code": "analytics_addon_required"
}{
"error": "Access denied to this account"
}{
"success": false,
"error": "To access daily video analytics, please reconnect your YouTube account to grant the required permissions.",
"code": "youtube_analytics_scope_missing",
"scopeStatus": {
"hasAnalyticsScope": false,
"requiresReauthorization": true,
"reauthorizeUrl": "https://accounts.google.com/o/oauth2/auth?client_id=..."
}
}{
"success": false,
"error": "string"
}Get frequency vs engagement GET
Returns the correlation between posting frequency (posts per week) and engagement rate, broken down by platform. Helps find the optimal posting cadence for each platform. Each row represents a specific (platform, posts_per_week) combination with the average engagement rate observed across all weeks matching that frequency. Requires the Analytics add-on.
Get YouTube demographics GET
Returns audience demographic insights for a YouTube channel, broken down by age, gender, and/or country. Age and gender values are viewer percentages (0-100). Country values are view counts. Data is based on signed-in viewers only, with a 2-3 day delay. Requires the Analytics add-on.