YouTube API endpoint
Returns YouTube search-box autocomplete completions for a query prefix, in YouTube's own ranking order. `hl` and `gl` localize the list; they default to `en` and `US`.
/youtube/suggestMCP tool: youtube_suggest
Returns YouTube search-box autocomplete completions for a query prefix, in YouTube's own ranking order. The list reflects what people search on YouTube and differs from the Google web suggestions for the same prefix.
Query parameters:
q: required. Search query prefix. Example: openai.count: optional. Suggestions to return. Defaults to 10, clamped to 1..20.hl: optional. YouTube interface language such as en, de, or pt-BR. Defaults to en.gl: optional. Two-letter YouTube region code. Defaults to US.Notable response behavior:
suggestions array, not an error.hl or gl returns 400; YouTube silently ignores a well-formed code it does not support.ds=yt suggest host, so a block on one host does not fail the call.| Field | Filled in, of 14 checked | Values in the sample |
|---|---|---|
| position | 14 | 1 to 14, median 7 |
| query | 14 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| q | string | Yes | Search query prefix | openai | |
| count | integer | No | 10 | Suggestions to return; defaults to 10, clamped to 1..20 Minimum: 1. Maximum: 20. | 10 |
| hl | string | No | en | YouTube interface language, such as en, de, or pt-BR; defaults to en | en |
| gl | string | No | US | Two-letter YouTube region code; defaults to US | US |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/youtube/suggest?q=openai&count=10" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"query": "openai",
"suggestions": [
{
"position": 1,
"query": "openai"
},
{
"position": 2,
"query": "openai dev day"
},
{
"position": 3,
"query": "openai sora"
}
]
}
}Request schema
No body schema
Response schema
#/definitions/youtube.suggestResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | suggest.Response | No | ||||
| data.query | string | No | openai | |||
| data.suggestions | array | No | ||||
| data.suggestions[].position | integer | No | 1 | |||
| data.suggestions[].query | string | No | openai api key | |||
| msg | string | No | OK |
| 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 |
| 503 | YouTube upstream request failed | #/definitions/app.Response |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/youtube/suggest?q=openai&count=10" \
-H "x-api-key: $CRAWLORA_API_KEY"