Top Videos by Views
youtube_top_videosGet the top-performing videos on your YouTube channel ranked by views, with titles, for a specified date range.
Instructions
Return the top-performing videos on the authenticated channel ranked by views, enriched with video titles fetched from the YouTube Data API.
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.maxResults(optional): Number of top videos to return (1–50, default 10).response_format(optional):"markdown"(default) or"json".
Returns (JSON shape):
{
"columns": ["video", "title", "views", "estimatedMinutesWatched", "averageViewDuration",
"averageViewPercentage", "subscribersGained", "likes"],
"rows": [["VIDEO_ID", "Video Title", 5000, 12000, 144, 55.3, 80, 200], ...]
}Examples:
"What are my top 5 videos this month?" →
maxResults: 5with appropriate dates."Best performing videos over the past 90 days" →
startDate90 days ago.
Errors:
403: insufficient scope — re-run
npm run auth.400: invalid date range.
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. | |
| maxResults | No | Number of top videos to return (1–50). Defaults to 10. | |
| response_format | No | Output format: "markdown" (default) for a human-readable table, "json" for the structured payload. | markdown |