Analytics
Which analytics metrics YouTube returns and the YouTube-only analytics endpoints.
Call GET /v1/analytics?platform=youtube (Analytics API).
| Metric | Available |
|---|---|
| Likes | |
| Comments | |
| Shares | (through Daily views only) |
| Views |
const { data: analytics } = await zernio.analytics.getAnalytics({
query: { platform: 'youtube', fromDate: '2026-08-01', toDate: '2026-08-31' }
});
console.log(analytics.posts);Response (200), one entry per post:
{
"posts": [
{
"_id": "65f1c0a9e2b5af0012ab34cd",
"platform": "youtube",
"status": "published",
"publishedAt": "2026-08-14T10:00:05Z",
"platformPostUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"analytics": {
"likes": 342,
"comments": 28,
"shares": 0,
"views": 15420
}
}
]
}Four YouTube-only endpoints go deeper:
- Daily views: per-day views, watch time, subscriber changes and per-day likes, comments and shares for one video. Data has a 2 to 3 day delay.
- Channel insights: channel-level views, watch time, average view duration and subscribers gained and lost, without looping through every video. Impressions and impressions click-through rate (the thumbnail metrics in YouTube Studio) are not exposed by YouTube's Analytics API v2 for any principal type; the only way to get those is a manual Studio CSV export.
- Demographics: audience by age, gender and country, for the channel or one video. Age and gender values are viewer percentages (0 to 100), country values are view counts. Based on signed-in viewers only, with a 2 to 3 day delay.
- Video retention: the audience retention curve of one video, up to 100 points over the whole date range.
Was this page helpful?