YouTube API endpoint
Search YouTube
Returns normalized YouTube search results using YouTube's InnerTube search API. Pass `continuation_token` from a previous response to retrieve the next page. Use `q` as the primary query parameter; `search_query` is accepted as an alias.
GETapiKey3 credits/requestyoutube.searchResponseDoc
/youtube/searchParameters
| Name | In | Type | Required | Enum | Example | Description |
|---|---|---|---|---|---|---|
| q | query | string | No | gpt | Search query | |
| search_query | query | string | No | gpt | Alias for q | |
| continuation_token | query | string | No | Pagination token returned by a previous request | ||
| type | query | string | No | video, channel, playlist, movie | Filter by type | |
| sort_by | query | string | No | relevance, upload_date, view_count, rating | Sort results | |
| upload_date | query | string | No | last_hour, today, this_week, this_month, this_year | Filter by upload date | |
| duration | query | string | No | short, medium, long | Filter by duration | |
| features | query | string | No | hd,subtitles | Comma-separated feature filters | |
| params | query | string | No | Raw protobuf-encoded search filter (base64) | ||
| x-api-key | header | string | Yes | API key required |
Authentication
Send your scraping API key in the x-api-key header. Use the console API Keys page to rotate or select the active key.
Billing
Endpoint usage is metered in credits. The plan prices, included credits, limits, and overage rates below match the active backend billing configuration.
- Credit cost
- 3 credits/request
- Charged response
- Successful 2xx responses
| Plan | Price | Included credits | Daily cap | Rate limit | Overage |
|---|---|---|---|---|---|
| Free | $0/mo | 2,000 | 500 daily credits | 5/min | No overage |
| Starter | $9/mo | 20,000 | 5,000 daily credits | 15/min | $0.75/1,000 overage credits when enabled |
| Growth | $29/mo | 100,000 | 25,000 daily credits | 45/min | $0.45/1,000 overage credits when enabled |
| Pro | $79/mo | 400,000 | No daily cap | 120/min | $0.30/1,000 overage credits |
| Business | $199/mo | 1,200,000 | No daily cap | 300/min | $0.20/1,000 overage credits |
| Enterprise | $499/mo | 5,000,000 | No daily cap | 1,000/min | $0.12/1,000 overage credits |
Failure responses
| Status | Description | Schema |
|---|---|---|
| 400 | Missing or invalid parameters | #/definitions/app.Response |
| 429 | Rate limit exceeded | #/definitions/app.Response |
| 500 | Internal server error | #/definitions/app.Response |
Example response
{
"code": 200,
"msg": "OK",
"data": {
"query": "gpt",
"estimated_results": 9895225,
"items": [
{
"type": "video",
"position": 1,
"title": "ChatGPT Explained",
"url": "https://www.youtube.com/watch?v=abc123xyz89",
"thumbnail": "https://i.ytimg.com/vi/abc123xyz89/hq720.jpg",
"video_id": "abc123xyz89",
"channel_title": "OpenAI",
"channel_id": "UCXZCJLdBC09xxGZ6gcdrc6A",
"duration": "12:34",
"duration_seconds": 754,
"published_text": "2 days ago",
"view_count": "123,456 views",
"short_view_count": "123K views",
"description_snippet": "A concise walkthrough of GPT features.",
"channel_thumbnail": "https://yt3.ggpht.com/channel-thumb",
"is_verified": true,
"badges": [
"HD",
"CC"
]
},
{
"type": "channel",
"position": 2,
"title": "OpenAI",
"url": "https://www.youtube.com/@OpenAI",
"thumbnail": "https://yt3.ggpht.com/channel-avatar",
"channel_id": "UCXZCJLdBC09xxGZ6gcdrc6A",
"handle": "@OpenAI",
"subscriber_count": "1.93M subscribers",
"description_snippet": "OpenAI's mission is to ensure AGI benefits all of humanity.",
"is_verified": true
},
{
"type": "playlist",
"position": 3,
"title": "Python Language Full Course (2026)",
"url": "https://www.youtube.com/playlist?list=PL1234567890abcdef",
"thumbnail": "https://i.ytimg.com/vi/pl123/hqdefault.jpg",
"playlist_id": "PL1234567890abcdef",
"channel_title": "Shradha Khapra",
"channel_id": "UC1XBh-m27kkgwLAwu_SRJBg",
"video_count": "9 lessons"
}
],
"continuation_token": "NEXT_TOKEN"
}
}Request schema
No body schema
Response schema
#/definitions/youtube.searchResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | youtube.SearchResponse | No | ||||
| data.continuation_token | string | No | NEXT_TOKEN | |||
| data.estimated_results | integer | No | 9895225 | |||
| data.items | array | No | ||||
| data.items[].badges | array | No | HD,CC | |||
| data.items[].channel_id | string | No | UCXZCJLdBC09xxGZ6gcdrc6A | |||
| data.items[].channel_thumbnail | string | No | https://yt3.ggpht.com/example=s68-c-k-c0x00ffffff-no-rj | |||
| data.items[].channel_title | string | No | OpenAI | |||
| data.items[].description_snippet | string | No | A concise walkthrough of GPT features. | |||
| data.items[].duration | string | No | 12:34 | |||
| data.items[].duration_seconds | integer | No | 754 | |||
| data.items[].handle | string | No | @OpenAI | |||
| data.items[].is_live | boolean | No | ||||
| data.items[].is_short | boolean | No | ||||
| data.items[].is_verified | boolean | No | ||||
| data.items[].playlist_id | string | No | PL1234567890abcdef | |||
| data.items[].position | integer | No | 1 | |||
| data.items[].published_text | string | No | 2 days ago | |||
| data.items[].short_view_count | string | No | 123K views | |||
| data.items[].subscriber_count | string | No | 1.93M subscribers | |||
| data.items[].thumbnail | string | No | https://i.ytimg.com/vi/abc123/hq720.jpg | |||
| data.items[].title | string | No | ChatGPT Explained | |||
| data.items[].type | string | No | video | |||
| data.items[].url | string | No | https://www.youtube.com/watch?v=abc123 | |||
| data.items[].video_count | string | No | 9 lessons | |||
| data.items[].video_id | string | No | abc123xyz89 | |||
| data.items[].view_count | string | No | 123,456 views | |||
| data.query | string | No | gpt | |||
| msg | string | No | OK |
Example request
curl -X GET "https://api.crawlora.net/api/v1/youtube/search?q=gpt&search_query=gpt&features=hd%2Csubtitles" -H "x-api-key: <api-key>"
TypeScript fetch
const url = new URL("https://api.crawlora.net/api/v1/youtube/search");
url.searchParams.set("q", "gpt");
url.searchParams.set("search_query", "gpt");
url.searchParams.set("features", "hd,subtitles");
const headers = new Headers();
headers.set("x-api-key", "<api-key>");
const response = await fetch(url, {
method: "GET",
headers,
});
const payload = await response.json();