youtube_analytics_query
Query YouTube Analytics reports with any metrics, dimensions, filters, and sort options. Retrieve data for any date range, including live stream audience, and output as CSV or JSON.
Instructions
Unrestricted YouTube Analytics reports.query — any metrics/dimensions/filters/sort the API accepts. This API has no "since published" window, so a date range covering a live stream returns its live audience by construction.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ids | No | defaults to channel==MINE | |
| raw | No | return the response verbatim instead of named rows | |
| sort | No | ||
| format | No | ||
| account | No | alias or channel id; defaults to the configured default, or the only account | |
| endDate | No | defaults to today | |
| filters | No | e.g. video==ID or insightTrafficSourceType==YT_SEARCH | |
| metrics | Yes | comma-separated, e.g. views,estimatedMinutesWatched,averageViewDuration | |
| currency | No | ||
| startDate | Yes | ||
| dimensions | No | e.g. day, video, insightTrafficSourceType, ageGroup,gender | |
| maxResults | No | ||
| outputPath | No | write the full result here instead of returning it inline; strongly preferred for anything large. Extension picks the format unless format is given. | |
| startIndex | No | ||
| includeHistoricalChannelData | No |