Get YouTube demographics
Returns audience demographic insights for a YouTube channel, broken down by age, gender, and/or country. Pass videoId to get the audience profile of a single video instead of the whole channel. 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. YouTube suppresses demographics for videos with too few signed-in views, so low-traffic videos can return empty breakdowns. Requires the Analytics add-on.
Authorization
bearerAuth API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
In: header
Query Parameters
The Zernio SocialAccount ID for the YouTube account
YouTube video ID. When provided, demographics are scoped to this single video (must belong to the connected channel; otherwise 404 video_not_found).
Comma-separated list of demographic dimensions: age, gender, country. Defaults to all three if omitted.
Start date in YYYY-MM-DD format. Defaults to 90 days ago, or to the video's publish date (lifetime) when videoId is provided.
dateEnd 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).
dateAlias of fromDate, kept for existing callers
dateAlias of toDate, kept for existing callers
dateResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.analytics.getYouTubeDemographics({ query: { accountId: 'account_abc123', },});console.log(data);{ "success": true, "accountId": "64e1a2b3c4d5e6f7a8b9c0d1", "platform": "youtube", "demographics": { "age": [ { "dimension": "25-34", "value": 28.5 }, { "dimension": "18-24", "value": 22.1 } ], "gender": [ { "dimension": "male", "value": 62.3 }, { "dimension": "female", "value": 35.8 } ], "country": [ { "dimension": "US", "value": 12000 }, { "dimension": "GB", "value": 3500 } ] }, "dateRange": { "startDate": "2026-01-01", "endDate": "2026-03-31" }, "note": "Age/gender values are viewer percentages (0-100). Country values are view counts. Data based on signed-in viewers only, with 2-3 day delay."}Get YouTube video retention curve
Returns the audience retention curve for a single YouTube video, plus the video's duration for rendering the curve on a time axis. The curve has up to 100 points (elapsedVideoTimeRatio 0.01-1.0) aggregated over the whole date range; YouTube does not support per-day retention breakdowns. audienceWatchRatio is the absolute share of viewers watching at that point in the video and can exceed 1 (rewinds and looping, common on Shorts). relativeRetentionPerformance compares against videos of similar length (0 = worst, 0.5 = median, 1 = best). YouTube returns an empty curve for videos with very few views or before analytics processing completes (2-3 day delay). Requires yt-analytics.readonly scope (re-authorization may be needed).
Get LinkedIn aggregate stats
Returns aggregate analytics across all posts for a LinkedIn personal account. Only includes posts published through Zernio (LinkedIn API limitation). Org accounts should use /v1/analytics instead. Requires r_member_postAnalytics scope. Saves (POST_SAVE) and sends (POST_SEND) are available for personal accounts; organization pages always return 0 for these two metrics because LinkedIn does not expose them on the organization analytics endpoint.