Search & score YouTube videos
search_videosSearch YouTube by topic, filter out Shorts, live, and low-view videos, then score candidates by popularity and engagement to select playlist content.
Instructions
Search YouTube for a topic, collect 10–100 candidate videos, drop Shorts/live/low-view videos and score each 0–100 (popularity incl. views-per-day, like rate, comment rate, optional recency). Read-only. Costs 100 quota units per 50 candidates (+1 per 50 for statistics). Afterwards, review titles/descriptions for relevance and call preview_playlist.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>"
},
"name": "search_videos"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| order | No | Order YouTube uses to pick candidates. | relevance |
| query | Yes | What to search for, ideally in the target language (e.g. 'Almanca öğrenmek başlangıç'). | |
| language | No | ISO 639-1 code (e.g. 'tr', 'en', 'de'). Biases search and removes videos whose declared language differs. | |
| min_views | No | ||
| like_weight | No | ||
| region_code | No | ISO 3166-1 alpha-2 country (e.g. 'TR'). | |
| safe_search | No | moderate | |
| comment_weight | No | ||
| include_shorts | No | ||
| max_candidates | No | How many search results to collect (50 per 100 units). | |
| recency_weight | No | 0 = ignore upload date (default). 0.2–0.4 favours newer videos. Use when the user wants up-to-date content. | |
| max_per_channel | No | Applied when building the preview. | |
| published_after | No | ISO date, e.g. 2024-01-01. Ignored if published_within_days is set. | |
| published_before | No | ISO date. | |
| popularity_weight | No | ||
| max_duration_minutes | No | ||
| min_duration_minutes | No | e.g. 20 for 'longer than 20 minutes'. | |
| published_within_days | No | Only videos from the last N days (e.g. 365). |