Channel and video analytics
get_analyticsRetrieve YouTube channel or video analytics reports, including views, watch time, traffic sources, demographics, retention, and custom metrics for a chosen date range.
Instructions
YouTube Analytics for the channel or one video. Reports: overview (views, watch time, average view duration, subscribers gained/lost, likes, comments, shares), daily (trend by day), top_videos (best performers with titles), traffic_sources, search_terms (YouTube search queries), geography, devices, demographics (age/gender), retention (audience retention curve, needs video_id), subscribed_status, or custom (your own metrics/dimensions). Defaults to the last 28 days. Data lags about 2 days.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | ||
| report | No | overview | |
| channel | No | Which connected channel: channel ID (UC...), @handle or name. Omit to use the default channel. | |
| filters | No | custom only: e.g. country==IN;video==abc. | |
| metrics | No | custom only: comma-separated metrics, e.g. views,likes,cardClickRate. | |
| end_date | No | YYYY-MM-DD; default today. | |
| video_id | No | Limit the report to one video. | |
| dimensions | No | custom only: e.g. day,country. | |
| start_date | No | YYYY-MM-DD; default 28 days before end_date. | |
| max_results | No |