Get a YouTube Analytics report
analytics_get_youtube_reportA YouTube Analytics report for the user's own channel: views, watch time, retention, subscribers and engagement, by video, day, traffic source, country, device, audience or content type, over a date range. Numbers only the channel owner sees.
Use when: "how did my channel do last month", "which of my videos got the most watch time", "where does my YouTube traffic come from", "how much of my video do people watch", Shorts against long videos, subscribers gained by video, an audience's age, gender and country. Not for: a channel the user does not own, use youtube_get_videos and youtube_get_video for public counts. Website traffic, use analytics_get_report. Returns: List. rows[]: one object per row keyed by YouTube's names, dimensions as strings and metrics as numbers; with the video dimension each row also carries video_title. channel_id, column_types (STRING, INTEGER or FLOAT). averageViewDuration is seconds, averageViewPercentage and viewerPercentage are 0 to 100, audienceWatchRatio is a share of the starting audience. YouTube gives no row total, so meta.cursor appears whenever a page is full. Combinations YouTube accepts: top videos are dimensions ["video"] with a metric sort (at most 200 rows a page). Retention is dimensions ["elapsedVideoTimeRatio"], metrics audienceWatchRatio and relativeRetentionPerformance, and a filter on exactly one video. Traffic source detail needs a filter on one insightTrafficSourceType and at most 25 rows. Audience is ageGroup and/or gender with viewerPercentage alone. Other pairs YouTube rejects come back as InvalidTarget with its message. Cost: 0 credits. Cached 1 hour. Example: {"metrics": ["views", "estimatedMinutesWatched", "averageViewPercentage", "subscribersGained"], "dimensions": ["video"], "start_date": "2026-10-01", "end_date": "2026-10-31", "sort": {"field": "estimatedMinutesWatched"}, "limit": 10}
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "analytics_get_youtube_report"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | Default: day or month oldest first, otherwise the first metric highest first. A video breakdown must be sorted by a metric. | |
| limit | No | Max rows. Default 100, cap 1000. | |
| cursor | No | From meta.cursor of the previous page. | |
| channel | No | A channel_id from analytics_list_youtube_channels. Optional when one channel is connected. | |
| filters | No | Equality filters: a row matches when the dimension equals any of its values; every filter applies. For example video, country, creatorContentType, insightTrafficSourceType. | |
| metrics | No | YouTube Analytics metric names: views, engagedViews, estimatedMinutesWatched, averageViewDuration (seconds), averageViewPercentage, subscribersGained, subscribersLost, likes, comments, shares, videosAddedToPlaylists; with elapsedVideoTimeRatio, audienceWatchRatio and relativeRetentionPerformance; with ageGroup or gender, viewerPercentage. | |
| end_date | No | Default three days ago; YouTube's latest days fill in late. | |
| dimensions | No | YouTube Analytics dimension names: day, month, video, country, deviceType, operatingSystem, insightTrafficSourceType, insightTrafficSourceDetail, subscribedStatus, creatorContentType (SHORTS, VIDEO_ON_DEMAND, LIVE_STREAM), ageGroup, gender, elapsedVideoTimeRatio (retention, with one video filter). None gives one total row. | |
| start_date | No | Default 27 days before end_date. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| meta | Yes | ||
| rows | No | ||
| error | No | ||
| hints | Yes | ||
| channel_id | No | ||
| column_types | No | Each column's type as YouTube gives it: STRING, INTEGER or FLOAT. |