Traffic Sources Analytics
youtube_traffic_sourcesRetrieve traffic source breakdown for YouTube channel videos, showing views and watch time by source like search, suggested videos, or external sites.
Instructions
Show how viewers find the channel's videos, broken down by traffic source type (e.g. YouTube search, suggested videos, external, direct, playlists, etc.).
Args:
startDate(optional): Inclusive start date inYYYY-MM-DDformat. Defaults to 28 days ago.endDate(optional): Inclusive end date inYYYY-MM-DDformat. Defaults to today.response_format(optional):"markdown"(default) or"json".
Returns (JSON shape):
{
"columns": ["insightTrafficSourceType", "views", "estimatedMinutesWatched"],
"rows": [["YT_SEARCH", 5000, 12000], ["SUGGESTED_VIDEO", 3000, 8000], ...]
}Examples:
"Where do my viewers come from?" → call with no arguments.
"Traffic sources for the last 7 days" → pass matching
startDate/endDate.
Errors:
403: insufficient scope — re-run
npm run auth.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| startDate | No | Inclusive start date in YYYY-MM-DD format. Defaults to 28 days ago. | |
| endDate | No | Inclusive end date in YYYY-MM-DD format. Defaults to today. | |
| response_format | No | Output format: "markdown" (default) for a human-readable table, "json" for the structured payload. | markdown |