YouTube
youtubeRead public YouTube data with Desearch. Set action and that action's arguments. search (query; optional type, upload_date, sort_by, duration, cursor): videos, Shorts, live streams, channels, and playlists that match a keyword; each result has a type. video (id): one video or Short by ID or URL, with its channel, counts, chapters, and caption languages. transcript (video_id; optional language): its captions as plain text and timestamped segments; a video without captions returns 404. comments (video_id; optional order, cursor): its top-level comments. channel (handle): one channel by handle or channel ID. channel_videos (handle; optional sort, cursor): the channel's videos. A video id from search or channel_videos can be passed to video, transcript, or comments. video, transcript, and channel return the item itself. List actions return { results, next_cursor, next }. For the next page, call again with the same action and target and cursor set to next_cursor, unchanged; next_cursor is null on the last page. A cursor lasts 24 hours.
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": {
"action": "<action>"
},
"name": "youtube"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | video: YouTube video or Short ID, or its full URL, example: 'dQw4w9WgXcQ'. | |
| sort | No | channel_videos: video order (API default latest). | |
| type | No | search: only this kind of result. Omit for mixed results. | |
| order | No | comments: comment order. | |
| query | No | search: keyword or phrase, example: 'bittensor'. Use intitle:"..." for stricter title matching. | |
| action | Yes | What to read: 'search', 'video', 'transcript', 'comments', 'channel', or 'channel_videos'. | |
| cursor | No | next_cursor from the previous page of the same action and target, sent back unchanged. Omit it for the first page. | |
| handle | No | channel, channel_videos: channel handle (with or without @) or channel ID (UC...), example: '@MrBeast'. | |
| sort_by | No | search: result order. | |
| duration | No | search: video length. Applies to videos, not Shorts. | |
| language | No | transcript: caption language code, example: 'en' or 'es'. Omit for YouTube's default track. | |
| video_id | No | transcript, comments: YouTube video or Short ID, or its full URL. | |
| upload_date | No | search: only videos uploaded in this window. |