# YouTube — Video search

Search YouTube for videos matching a query HTML version: https://www.socialrouter.io/services/youtube/video.search

## Call it

```
POST https://api.socialrouter.io/v1/extract/youtube/video.search
Authorization: Bearer <your API key>
Content-Type: application/json

{ "queries": ["machine learning tutorial"] }
```

The response shape does not depend on which offer ran; `served_by` names the one that did.

## Input

- `Free-text search query, as you would type it in the YouTube search bar`. Example: `machine learning tutorial`

## Options

- `sortingOrder` (string) — Result ordering, as the YouTube UI names it (e.g. relevance, date, views).
- `videoType` (string) — Restrict to a video type (e.g. video, movie).
- `lengthFilter` (string) — Video length filter (e.g. under4, between420, over20).
- `isHD` (boolean) — Only HD videos.
- `hasSubtitles` (boolean) — Only videos with subtitles.
- `hasCC` (boolean) — Only Creative Commons videos.
- `is3D` (boolean) — Only 3D videos.
- `isLive` (boolean) — Only live streams.
- `is4K` (boolean) — Only 4K videos.
- `is360` (boolean) — Only 360° videos.
- `hasLocation` (boolean) — Only geotagged videos.
- `isHDR` (boolean) — Only HDR videos.
- `isVR180` (boolean) — Only VR180 videos.
- `dateFilter` (string) — Upload date filter (e.g. hour, today, week, month, year).

## Offers, in failover order

1. `apify/streamers` — $0.0055 per record, up to 50 inputs per call

## See also

- Catalogue as JSON: https://api.socialrouter.io/v1/services
- OpenAPI 3.1 spec: https://api.socialrouter.io/v1/openapi.json
- Agent overview: https://www.socialrouter.io/llms.txt
- Sitemap: https://www.socialrouter.io/sitemap.xml
- Docs: https://docs.socialrouter.io
