search_youtube
Search YouTube videos by query and return up to 50 results with title, channel, views, duration, and URL; filter by upload date or duration and sort by relevance, date, views, or rating.
Instructions
Search YouTube videos by query. Returns up to 50 results with title, channel, views, duration, and URL. Supports filtering by uploadDate (today/week/month/year) and videoDuration (short/medium/long), and sorting by relevance, date, viewCount, or rating. Served by the provider selected with YT_PROVIDER; with the default innertube provider some options are approximated and reported in warnings.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query string | |
| sortBy | No | Sort order: 'relevance' (default), 'date', 'viewCount' (most popular), or 'rating'. With the default innertube provider, 'date' keeps relevance order and 'rating' sorts by popularity, each with a warning; the api provider applies all four exactly. | relevance |
| maxResults | No | Maximum number of results to return (1-50) | |
| uploadDate | No | Filter by upload date: 'any', 'hour', 'today', 'week', 'month', 'year'. With the innertube provider, 'hour' is applied as 'today' with a warning. | any |
| videoDuration | No | Filter by duration: 'any', 'short', 'medium', 'long'. innertube: <3min, 3-20min, >20min. api: <4min, 4-20min, >20min | any |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| sortBy | Yes | ||
| results | Yes | ||
| warnings | No | Requested options that YouTube search could not apply exactly | |
| uploadDate | Yes | ||
| resultCount | Yes | ||
| videoDuration | Yes |