API · YouTube
GET /youtube/search/suggestions
YouTube search autocomplete suggestions.
| Request | GET /v1/youtube/search/suggestions |
| Operation id | youtube.search.suggestions |
| Cost | 1 credit, refunded if the call fails |
| Auth | API key: Authorization: Bearer <key> or x-api-key. |
YouTube search autocomplete suggestions.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
q | string | yes | The partial query. Example: how to make. |
region | string | no | ISO 3166-1 alpha-2 country: the results a visitor there sees. Example: US. |
language | string | no | ISO 639-1 language code (en, es, pt-BR). Example: en. |
Responses
| Status | Meaning | Schema |
|---|---|---|
200 | The suggestions. | YouTubeSuggestions |
400 | Invalid input. Nothing was charged. | Error |
401 | Missing or invalid API key. | Error |
402 | Not enough credits, a spend cap was reached, or payment is required. | Error |
403 | The target is private, or the account is suspended. | Error |
404 | The video, channel, playlist or post does not exist, was removed, or has nothing there. | Error |
429 | Too many requests. Wait for Retry-After seconds. | Error |
503 | YouTube is temporarily unavailable. Retryable; nothing was charged. | Error |
YouTubeSuggestions fields
| Field | Type | Description |
|---|---|---|
kind | "youtube#suggestions" | |
query | string | |
suggestions | string[] |
Errors use one shape everywhere; see Errors for every code and what to do.