searchVideos
Find YouTube videos by query with filters for duration, recency, channel, and region to get relevant results with metadata.
Instructions
Searches for videos based on a query string. Returns a list of videos matching the search criteria, including titles, descriptions, and metadata. Use this when you need to find videos related to specific topics or keywords.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
channelId | No | Restrict search to specific channel ID | |
maxResults | No | Maximum number of results to return (1-500, default: 10) | |
order | No | Sort order for results (default: relevance) | |
query | Yes | Search query string to find videos | |
recency | No | Filter by recency. Possible values: 'any', 'pastHour', 'pastDay', 'pastWeek', 'pastMonth', 'pastQuarter', 'pastYear'. | |
regionCode | No | 2-letter country code to restrict results | |
type | No | Type of content to search for (default: video) | |
videoDuration | No | Filter by video duration. 'any' (default): no duration filter. 'short': videos less than 4 minutes. 'medium': videos 4 to 20 minutes. 'long': videos longer than 20 minutes. |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"channelId": {
"description": "Restrict search to specific channel ID",
"type": "string"
},
"maxResults": {
"default": 10,
"description": "Maximum number of results to return (1-500, default: 10)",
"maximum": 500,
"minimum": 1,
"type": "number"
},
"order": {
"description": "Sort order for results (default: relevance)",
"enum": [
"relevance",
"date",
"viewCount"
],
"type": "string"
},
"query": {
"description": "Search query string to find videos",
"minLength": 1,
"type": "string"
},
"recency": {
"description": "Filter by recency. Possible values: 'any', 'pastHour', 'pastDay', 'pastWeek', 'pastMonth', 'pastQuarter', 'pastYear'.",
"enum": [
"any",
"pastHour",
"pastDay",
"pastWeek",
"pastMonth",
"pastQuarter",
"pastYear"
],
"type": "string"
},
"regionCode": {
"description": "2-letter country code to restrict results",
"maxLength": 2,
"minLength": 2,
"type": "string"
},
"type": {
"description": "Type of content to search for (default: video)",
"enum": [
"video",
"channel"
],
"type": "string"
},
"videoDuration": {
"description": "Filter by video duration. 'any' (default): no duration filter. 'short': videos less than 4 minutes. 'medium': videos 4 to 20 minutes. 'long': videos longer than 20 minutes.",
"enum": [
"any",
"short",
"medium",
"long"
],
"type": "string"
}
},
"required": [
"query"
],
"type": "object"
}