# YouTube Search suggestions API (youtube.search_suggest)

- Canonical page: [https://everyinfra.com/en/youtube-api/search_suggest](https://everyinfra.com/en/youtube-api/search_suggest?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "youtube", "action": "search_suggest", "params": {...}}
- Price: $0.000556 per call ($0.56 per 1,000 requests); failed calls and empty results are not charged
- Returns: list
- Mode: sync; add "mode": "async" for slow tasks

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=youtube&action=search_suggest

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| keyword | not declared | yes | not declared | What you type into the search box, such as `minecraft`, up to 200 characters. |
| country | not declared | no | not declared | Market of the suggestions, as a two-letter country code such as `US` or `JP`; `US` when left out. A value that is not recognized returns 422 and is not charged. |
| language | not declared | no | not declared | Language of the suggestions, as a language code such as `en`, `ja` or `zh-CN`; `en` when left out. A value that is not recognized returns 422 and is not charged. |
| limit | integer (1–) | no | not declared | The most rows to return in this call, an integer of 1 or more. The default applies when you leave it out, and a call can return fewer rows. |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| rank | platform-native meaning |
| keyword | One suggested search term. |
| platform | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "youtube",
  "action": "search_suggest",
  "params": {
    "keyword": "minecraft"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "youtube",
        "action": "search_suggest",
        "params": {
            "keyword": "minecraft",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-11-21T07:24:23Z. `results` and `count` are real with personal information (names, handles, avatars, profile links, contact details) removed; the list keeps the first 2 of 14. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "youtube",
  "action": "search_suggest",
  "results": [
    {
      "rank": 1,
      "keyword": "minecraft",
      "platform": "youtube"
    },
    {
      "rank": 2,
      "keyword": "minecraft music",
      "platform": "youtube"
    }
  ],
  "count": 14,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=youtube
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
