Skip to content

Docs

GET /v1/search

GET/v1/search

Search YouTube videos or channels. Returns 20 results per page with next-page pagination tokens. Cost: 1 credit per successful page request.

Parameters

ParameterInTypeDescription
qquerystring (required)Search query string.
typequeryvideo | channelType of entity to search. Default: video.
pagequeryintegerPage number for pagination. Default: 1.
glquerystringISO 3166-1 alpha-2 country code (default US).
hlquerystringLanguage code hint (default en).
GET/v1/search
1curl "https://api.ytapi.dev/v1/search?q=cloudflare+workers&type=video&page=1" \
2  -H "Authorization: Bearer yta_YOUR_KEY"
200 OK
1{
2  "query": "cloudflare workers",
3  "type": "video",
4  "next_page": 2,
5  "items": [
6    {
7      "video_id": "b73BI9eUkjM",
8      "title": "Cloudflare Workers Explained",
9      "author": "Tech Academy",
10      "channel_id": "UCxxxx",
11      "length_seconds": 642,
12      "view_count": 185000,
13      "published_at": "2026-01-15T12:00:00Z",
14      "thumbnails": [
15        { "url": "https://i.ytimg.com/vi/b73BI9eUkjM/hqdefault.jpg", "width": 480, "height": 360 }
16      ]
17    }
18  ]
19}