# YouTube Search

Search YouTube and get matching videos (title, channel, views, length, publish time) as normalized JSON.

|  |  |
| --- | --- |
| Tool id | `anyapi.youtube-search` |
| Platform | [YouTube](https://www.orcarouter.ai/tools/youtube.md) |
| Capability | [Search posts](https://www.orcarouter.ai/tools/youtube/search-posts.md) |
| Price | $0.00055 per call |
| Health | OK |
| p50 latency | — |
| Success (7 days) | — |
| Runs (30 days) | 24 |
| Idempotent | no |
| Data class | scraped |

## Input

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | string | yes | The YouTube search query. |
| `cursor` | string | no | Continuation token from a previous response for pagination. |
| `sortBy` | string | no | Sort order: "relevance" (default) or "popular" (most-viewed). |
| `uploadDate` | string | no | Filter by upload recency. Omit for any time. |

## Call it

```bash
curl -sS https://api.orcarouter.ai/v1/tools/anyapi.youtube-search/run \
  -H "Authorization: Bearer $ORCAROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":{"query":"<query>"}}'
```

```python
import os, requests

resp = requests.post(
    "https://api.orcarouter.ai/v1/tools/anyapi.youtube-search/run",
    headers={"Authorization": f"Bearer {os.environ['ORCAROUTER_API_KEY']}"},
    json={"input":{"query":"<query>"}},
)
print(resp.json())
```

## Alternatives

| Tool | Source | Price | Health |
| --- | --- | --- | --- |
| [Search YouTube videos by keyword](https://www.orcarouter.ai/tools/youtube/search-posts/x-youtube-web-search-video.md) | — | $0.0011 per call | OK |
| [Search YouTube by keyword with filters](https://www.orcarouter.ai/tools/youtube/search-posts/x-youtube-web-v2-get-general-search.md) | — | $0.0011 per call | OK |
| [Search YouTube Shorts by keyword](https://www.orcarouter.ai/tools/youtube/search-posts/x-youtube-web-v2-get-shorts-search.md) | — | $0.0011 per call | OK |
| [YouTube Shorts Search](https://www.orcarouter.ai/tools/youtube/search-posts/youtube-search-shorts.md) | — | $0.00132 per call | OK |
| [Search YouTube Shorts by keyword](https://www.orcarouter.ai/tools/youtube/search-posts/x-youtube-web-v2-get-shorts-search-v2.md) | — | $0.0022 per call | OK |
| [Search YouTube videos by keyword and filters](https://www.orcarouter.ai/tools/youtube/search-posts/youtube-search-videos.md) | — | $0.0022 per call | OK |
| [Search YouTube by keyword](https://www.orcarouter.ai/tools/youtube/search-posts/x-youtube-search-v1.md) | — | $0.016236 per call | OK |

## FAQ

### How much does YouTube Search cost?

YouTube Search costs $0.00055 per call: 1,000 calls cost $0.55.

### What does a $10 budget buy with YouTube Search?

About 18181 calls at $0.00055 per call.

### What inputs does YouTube Search need?

Required inputs: query.

### How do I call YouTube Search?

Send POST /v1/tools/{id}/run with your OrcaRouter API key and a JSON body {"input": {…}}, where {id} is the tool id POST /v1/tools/discover returns for it.

---

Markdown version of https://www.orcarouter.ai/tools/youtube/search-posts/youtube-search
