Traffic sources
get_traffic_sourcesRetrieve views and watch time by traffic source—search, suggested, browse, Shorts feed, external—and drill into top search terms, referring videos, or websites for a source.
Instructions
How viewers find the content: views and watch time by traffic source (search, suggested, browse, Shorts feed, external, ...) or, with source_type, the top search terms / referring videos / websites for that source.
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": "get_traffic_sources"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum rows. | |
| period | No | Named date range, Studio-style. Rolling ranges end at the latest complete day of data (analytics lag ~2-3 days; dates are US Pacific). Ignored when start_date is set. | last_28_days |
| end_date | No | Custom range end, YYYY-MM-DD (inclusive). Defaults to the latest complete day. | |
| video_id | No | Limit to one video (11-character ID, e.g. 'dQw4w9WgXcQ'). Omit for the whole channel. | |
| start_date | No | Custom range start, YYYY-MM-DD. Overrides `period`. | |
| source_type | No | Drill into one source: YT_SEARCH (search terms), RELATED_VIDEO (suggested-video placements), EXT_URL (websites/apps), YT_CHANNEL, SUBSCRIBER, HASHTAGS, SOUND_PAGE, ADVERTISING, YT_OTHER_PAGE. Omit for the overview. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||