Get channel analytics
get_channel_analyticsRetrieve watch time, average view duration, retention, traffic sources, and subscriber changes for a connected YouTube channel via OAuth, with date-range and metric filters.
Instructions
Watch time, average view duration, retention percentage, traffic sources and subscriber change for a connected channel. There is no API-key path to this data: it needs OAuth on the channel that owns it, and it exists for no one else's channel. Data lags roughly two days behind real time.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"start_date": "<start_date>",
"end_date": "<end_date>"
},
"name": "get_channel_analytics"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | e.g. `-views` for descending | |
| account | No | Which connected channel to act on (name or @handle). Required when more than one is connected: without it the call fails and lists the choices rather than picking one. | |
| filters | No | e.g. `video==VIDEO_ID` or `country==US` | |
| metrics | No | Comma-separated. Default: views,estimatedMinutesWatched,averageViewDuration,averageViewPercentage,subscribersGained,subscribersLost | |
| end_date | Yes | YYYY-MM-DD | |
| dimensions | No | e.g. `day`, `video`, `country`, `insightTrafficSourceType` | |
| start_date | Yes | YYYY-MM-DD | |
| max_results | No |