# YouTube Suggestions

Get search autocomplete suggestions from YouTube.

- **Documentation:** [https://scrappa.co/docs/youtube-api/youtube_suggestions](https://scrappa.co/docs/youtube-api/youtube_suggestions)
- **API group:** YouTube API
- **Endpoint:** `GET https://scrappa.co/api/youtube/suggestions`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | string | Yes | Search query |
| `hl` | string | No | Language code (e.g., en). |
| `gl` | string | No | Country code (e.g., US). |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/youtube/suggestions?query=how+to"
```

## Example response

```json
{
    "query": "how to",
    "locale": {
        "hl": "en",
        "gl": "US"
    },
    "suggestions": [
        "how to cook",
        "how to code",
        "how to draw",
        "how to make slime",
        "how to play guitar"
    ]
}
```

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
