# YouTube Search Suggestions Scraper REST API | Scrapier (https://scrapier.io/scrapers/youtube/search-suggestions/api/)

> Call the YouTube Search Suggestions Scraper REST API from cURL, Python or Node.js. One GET, one header, typed JSON. 10 credits per page. Failed calls are free.

Last updated: 2026-11-25

**GET**/api/v2/youtube-search-suggestions/

## YouTube Search Suggestions Scraper _API_

Last updated: 9 Nov 2026 · REST · JSON

Quick answer

Send `GET https://proxy.scrapier.io/api/v2/youtube-search-suggestions/?queries=lofi` with your key in the `X-API-Key` header. You get the page of suggestions back as JSON. 10 credits per page of suggestions; failed calls are free.

- 10 credits per page of suggestions
- Failed calls free
- 3 parallel requests per key

[Get a free API key →](https://app.scrapier.io/sign-up)[Jump to the playground](#playground)

Copy for your AI agent

API

## Call the YouTube Search Suggestions Scraper API

Use the YouTube Search Suggestions Scraper API from your own apps, scripts or agents. You need a Scrapier account and the API key from your dashboard. Pick a language.

search-suggestions.py

import requests\# Replace YOUR\_API\_KEY with the key from your Scrapier dashboardAPI\_KEY = "YOUR\_API\_KEY"params = {    "queries": "lofi",    "country": "US",    "enrich\_entities": "true",}r = requests.get(    "https://proxy.scrapier.io/api/v2/youtube-search-suggestions/",    headers={"X-API-Key": API\_KEY},    params=params,    timeout=210,)r.raise\_for\_status()\# The result sits under data.suggestionsresult = r.json()\["data"\]\["suggestions"\]print(result)

### YouTube Search Suggestions Scraper API in Python

Plain `requests` is all you need — no SDK. Every response is typed JSON.

Install

**$** pip install requests

Other ways to call it

Playground

## YouTube Search Suggestions Scraper API Interactive Playground

Edit the request, watch the code update, then run it. Without a key it shows the catalog sample and bills nothing. With your key it makes a real call from your browser; the key goes only to proxy.scrapier.io and is never stored.

ReadyLatency **—**Credits billed: **0**

Request ready`GET /api/v2/youtube-search-suggestions/?queries=lofi`

Press **Run request** to send it. Without a key you get the catalog sample.

Sending request…

**Error**

Failed calls are not billed.

[Import in Postman](https://docs.scrapier.io/integrations/openapi.md)[OpenAPI spec](https://proxy.scrapier.io/api/v2/openapi.json)

The sample is the same for every input: it shows the response shape, not the account you typed.

### Example response, catalog sample from 9 Nov 2026

{
  "success": true,
  "data": {
    "queries": "lofi",
    "page": 1,
    "page\_size": 14,
    "suggestions": \[
      {
        "text": "lofi girl",
        "position": 3,
        "seed\_query": "lofi",
        "seed\_position": 2,
        "depth": 0,
        "type\_code": 0,
        "type": "query",
        "subtypes": \[
          512,
          433
        \],
        "is\_verbatim": false,
        "is\_expansion": false,
        "is\_entity": false,
        "entity": null,
        "word\_count": 2,
        "search\_url": "https://www.youtube.com/results?search\_query=lofi+girl",
        "keyword": "lofi",
        "country": "US",
        "language": "en",
        "scraped\_at": "2026-09-17T06:46:43.251Z"
      }
    \],
    "next\_cursor": "eyJoIjoiYWJjMTIzIiwiaSI6ImxvZmkiLCJsayI6eyJjb3VudHJ5IjoiVVMifSwicCI6Mn0"
  }
}

Data

## Data You Can Extract

YouTube Search Suggestions Scraper extracts the suggestions YouTube autocompletes for a query, one page per call: suggestion text, its position, the seed query it came from, depth, type, word count, a search URL and, when enabled, entity cards. Every field below comes from the catalog sample response, as typed JSON.

Suggestion

4 fields in the response.

- text
- position
- word\_count
- search\_url

Origin and type

6 fields in the response.

- seed\_query
- seed\_position
- depth
- type\_code
- type
- subtypes

Flags and entity

4 fields in the response.

- is\_verbatim
- is\_expansion
- is\_entity
- entity

Input and timestamp

4 fields in the response.

- keyword
- country
- language
- scraped\_at

Response envelope and paging

5 fields in the response.

- success
- data.queries
- data.page
- data.page\_size
- data.next\_cursor

Schema

## Response Schema Reference

Every field in the sample response. Field names stay the same on every call.

| Field | Type | Example | Description |
| --- | --- | --- | --- |
| `suggestions.text` | string | `"lofi girl"` | The suggestion text |
| `suggestions.position` | integer | `3` | Position of the suggestion |
| `suggestions.word_count` | integer | `2` | Number of words in the suggestion |
| `suggestions.search_url` | string | `"https://www.youtube.com/results?search_quer…"` | YouTube search results URL for the suggestion |
| `suggestions.seed_query` | string | `"lofi"` | The query this suggestion came from |
| `suggestions.seed_position` | integer | `2` | Position of the seed in its list |
| `suggestions.depth` | integer | `0` | Expansion depth; 0 for direct suggestions |
| `suggestions.type_code` | integer | `0` | Numeric type code |
| `suggestions.type` | string | `"query"` | Suggestion type, such as query |
| `suggestions.subtypes` | array | `2 items` | List of numeric subtype codes |
| `suggestions.is_verbatim` | boolean | `false` | true when the suggestion repeats the query |
| `suggestions.is_expansion` | boolean | `false` | true when it came from expansion |
| `suggestions.is_entity` | boolean | `false` | true when the suggestion is an entity |
| `suggestions.entity` | null | `null` | Entity card when enrich\_entities is on; null otherwise |
| `suggestions.keyword` | string | `"lofi"` | The term you searched |
| `suggestions.country` | string | `"US"` | Country (gl) used |
| `suggestions.language` | string | `"en"` | Language (hl) used |
| `suggestions.scraped_at` | string | `"2026-09-17T06:46:43.251Z"` | When Scrapier read the page (ISO 8601, UTC) |
| `success` | boolean | `true` | true on every 200 response |
| `data.queries` | string | `"lofi"` | Your search term, echoed back |
| `data.page` | integer | `1` | Page number of this response |
| `data.page_size` | integer | `14` | Suggestions per page |
| `data.next_cursor` | string | `"eyJoIjoiYWJjMTIzIiwiaSI6ImxvZmkiLCJsayI6eyJ…"` | Pass back as cursor for the next page; null on the last page |

Parameters

## Request Parameters Reference

| Name | Type | Required | Default | Description | Example |
| --- | --- | --- | --- | --- | --- |
| `queries` | string | Yes | — | A search term, up to 100 characters. One per call. Required on the first call; ignored when `cursor` is supplied. Aliases: `query`, `q`, `keyword` | `lofi` |
| `cursor` | string | No | — | Pass back `data.next_cursor` from the previous response to get the next page; `null` means the last page | — |
| `country` | string | No | `US` | ISO 3166-1 alpha-2 country code (gl), default `US`. Locked in the cursor | `US` |
| `language` | string | No | — | UI language (hl), such as `en` or `pt-BR`. Blank picks it from the country. Locked in the cursor | — |
| `enrich_entities` | boolean | No | `true` | `true` (default) attaches entity and channel cards to suggestions. Locked in the cursor | `true` |
| `expansion_alphabet` | string | No | — | Characters appended during expansion. Blank uses a-z and 0-9. Locked in the cursor | — |
| `use_proxy` | boolean | No | `true` | Route through Scrapier's residential proxy pool. Leave as is | `true` |
| `raw_data` | boolean | No | `false` | Return YouTube's raw upstream payload under `raw_responses` instead of the formatted items | `true` |

One term per call: to look up ten terms, make ten calls and page each with `cursor`. Booleans are the strings `true` or `false`.

### Pagination in the YouTube Search Suggestions Scraper API

The YouTube Search Suggestions Scraper API returns results in pages. Pass `data.next_cursor` back as `cursor` to get the next page; when it is `null` there are no more. Each successful call, first page or later, costs 10 credits.

Access

## Access Without YouTube Login

The YouTube Search Suggestions Scraper API needs no YouTube account, no login and no session cookies. You send your Scrapier key in the `X-API-Key` header and get JSON back. It reads public data only: what any visitor sees without logging in.

Performance

## Speed, Cost and Concurrency

| Metric | Value | Source |
| --- | --- | --- |
| Cost of a successful call | 10 credits | Scrapier catalog |
| Cost of a failed call | 0 credits | Any non-2xx response |
| Parallel requests per key | 3 | Above that: `429` with `Retry-After` |
| Recommended client timeout | 210 seconds | Scrapier docs, every endpoint |

### Latency of the YouTube Search Suggestions Scraper API

Scrapier does not publish a latency or success-rate figure for this endpoint. Each call reads YouTube at call time, so response time depends on YouTube and on the size of the result. Set a client timeout of 210 seconds, as the docs recommend for every endpoint.

Limits

## Limits of the Endpoint

Honest constraints of the YouTube Search Suggestions Scraper API.

- Public data only.
- A failed call, for example a missing or unavailable page of suggestions, returns a non-2xx status and costs 0 credits.
- Data is read live at call time.
- 3 parallel requests per key; above that the API answers `429` with `Retry-After`.
- Large results come in pages; pass `data.next_cursor` back as `cursor`.
- Fields YouTube does not show are not returned.

Compare

## Scrapier vs the Official YouTube API

For videos, comments and channels, the official YouTube Data API may fit better; for autocomplete suggestions there is no documented official option to compare against.

| Feature | Scrapier page of suggestions scraper | Official YouTube API |
| --- | --- | --- |
| Access needed | One Scrapier API key | No suggestions resource is documented in the YouTube Data API |
| Which data | Autocomplete suggestions by term, country and language | Not available through the official API |
| Fields returned | 18 fields per suggestion: text, position, type, URL and entity | Not applicable |
| Setup | Sign up, copy a key, send a request | Not applicable |
| Cost | 10 credits per page, from $1.20 per 1,000 pages | Not applicable |

Errors

## Errors and Retry Handling

| Status | Meaning | Billed | Fix |
| --- | --- | --- | --- |
| 200 | Page of suggestions data returned in `data.suggestions` | Yes | — |
| 400 | Bad or missing input | No | Check `queries`: one value per call |
| 401 | `X-API-Key` header missing | No | Add the header |
| 402 | Out of credits (body has `balance`) | No | Top up; retrying will not help |
| 403 | Invalid or revoked API key | No | Check the key in your dashboard |
| 429 | Throttled | No | Wait `Retry-After` seconds, then retry |
| 5xx | Upstream failure or timeout | No | Retry with backoff; set a 210 s client timeout |

From the [error reference](https://docs.scrapier.io/errors/). Any non-2xx response costs 0 credits.

### Retry logic for the YouTube Search Suggestions Scraper API

retry.py

import time, requests

def get\_search\_suggestions(value, key, tries=5):
    for attempt in range(tries):
        r = requests.get(
            "https://proxy.scrapier.io/api/v2/youtube-search-suggestions/",
            headers={"X-API-Key": key},
            params={"queries": value},
            timeout=210,
        )
        if r.status\_code == 429:
            time.sleep(int(r.headers.get("Retry-After", 2 \*\* attempt)))
        elif r.status\_code >= 500:
            time.sleep(2 \*\* attempt)
        else:
            r.raise\_for\_status()
            return r.json()
    raise RuntimeError("gave up after retries")

Pricing

## Pricing and Rate Limits

| Plan | Monthly price | Pages Of Suggestions included | Cost per 1,000 |
| --- | --- | --- | --- |
| Hobby | $29 | 15,000 | $1.93 |
| Pro | $79 | 50,000 | $1.58 |
| Scale | $299 | 250,000 | $1.20 |

[See all plans →](https://scrapier.io/pricing/)

### Billing rules for the YouTube Search Suggestions Scraper API

The YouTube Search Suggestions Scraper API bills 10 credits per successful page of suggestions. Failed calls, meaning any non-2xx status, cost 0 credits. Every plan allows 3 parallel requests per key. The free tier lets you try it before you pay.

Bulk

## Bulk Lookups and CSV

`queries` takes one value per call. For a list, loop and run up to 3 requests in parallel per key, then flatten each row into one CSV line.

bulk.py

import csv, requests
from concurrent.futures import ThreadPoolExecutor

values = \["lofi"\]  \# your list

def fetch(value):
    r = requests.get(
        "https://proxy.scrapier.io/api/v2/youtube-search-suggestions/",
        headers={"X-API-Key": "YOUR\_API\_KEY"},
        params={"queries": value},
        timeout=210,
    )
    r.raise\_for\_status()
    out = r.json()\["data"\]\["suggestions"\]
    return out if isinstance(out, list) else \[out\]

\# 3 parallel requests per key is the limit
with ThreadPoolExecutor(max\_workers=3) as pool:
    rows = \[row for part in pool.map(fetch, values) for row in part\]

cols = \["text", "position", "keyword", "type", "word\_count", "search\_url"\]
with open("out.csv", "w", newline="") as f:
    w = csv.DictWriter(f, fieldnames=cols, extrasaction="ignore")
    w.writeheader()
    w.writerows(rows)

### CSV export from the YouTube Search Suggestions Scraper API

out.csvcatalog sample · 1 row

text,position,keyword,type,word\_count,search\_url
lofi girl,3,lofi,query,2,https://www.youtube.com/results?search\_query=lofi+girl

Agents

## AI Agent Access via MCP

### MCP for the YouTube Search Suggestions Scraper API

The same endpoint is available to AI agents through the Scrapier MCP server at `https://mcp.scrapier.io/mcp`. One command registers it in Claude Code: `claude mcp add -t http scrapier https://mcp.scrapier.io/mcp --header "X-API-Key: YOUR_API_KEY"`. The agent finds the endpoint with `search_endpoints` and calls it with `run_scrape` and the endpoint id `youtube-search-suggestions`. It takes the same `queries` input and costs the same 10 credits per page of suggestions. Setup for every client is on the [YouTube Search Suggestions Scraper MCP page](https://scrapier.io/scrapers/youtube/search-suggestions/mcp/).

Integrations

## Integration Paths by Role

No-code

### n8n and Make

1. Add an HTTP Request step
2. GET the endpoint with your `X-API-Key` header
3. Map the `data.suggestions` fields to your columns

Developers

### Loop and paginate

for value in values: rows += get(value) while cur := page\["data"\]\["next\_cursor"\]: page = get(cursor=cur)

AI agents

### MCP tool in your agent

Call `run_scrape` with endpoint `youtube-search-suggestions` from Claude, Cursor or Windsurf. Setup is on the [MCP page](https://scrapier.io/scrapers/youtube/search-suggestions/mcp/).

Analysts

### CSV and flattened JSON

Flatten each row into one CSV line, one column per field, ready for Sheets, Excel or a BI tool.

Legal

## Legal and Compliance Notes

Scraping publicly available YouTube data is generally lawful in many countries, but the answer depends on what you collect, where you are and how you use it. In the US, hiQ Labs v. LinkedIn is the case most often cited on public-data scraping. Scrapier returns only data any visitor can see without logging in. Under GDPR and similar laws, collecting public data can be permissible, but how you store and use personal data, such as names or comment text, must still comply with local data-protection rules, and YouTube's terms apply. Consult legal counsel if your use case involves bulk storage of personal data. This is not legal advice; see our [Terms of Use](https://scrapier.io/terms/).

FAQ

## Frequently Asked Questions

### Is there a YouTube page of suggestions API?

Yes. Scrapier's YouTube Search Suggestions Scraper API returns any public page of suggestions as JSON with one GET request and an X-API-Key header. No YouTube app or login.

### How do I call it from Python?

Use \<code>requests.get\</code> on \<code>https://proxy.scrapier.io/api/v2/youtube-search-suggestions/\</code> with \<code>params={'queries': 'lofi'}\</code> and \<code>headers={"X-API-Key": KEY}\</code>. Read \<code>r.json()\["data"\]\["suggestions"\]\</code>.

### What happens when a call fails?

Any non-200 response is free. Retry 429 and 5xx with backoff; the API already retries upstream failures.

### How much does it cost?

10 credits per successful call — about $1.58 per 1,000 pages of suggestions on the Pro plan. Failed calls are free.

### Is there an OpenAPI spec?

Yes. It needs no key and covers every Scrapier endpoint.

Related

## Related YouTube APIs

### Search API

Videos, Shorts and streams that match a keyword, with filters, channel data and optional subtitles.

[### Hashtag Videos API

Videos and Shorts under a hashtag, with channel, views and publish date.](https://scrapier.io/scrapers/youtube/hashtag-videos/)[### Trending API

Trending charts by country: music, trailers, gaming and more, with chart position and views.](https://scrapier.io/scrapers/youtube/trending/)[### All YouTube APIs

All 17 YouTube endpoints.](https://scrapier.io/scrapers/youtube/)

## Fetch public YouTube pages of suggestions as typed JSON in one request

10 credits per page of suggestions · failed calls free

[Get a free API key →](https://app.scrapier.io/sign-up)

---
Canonical page: https://scrapier.io/scrapers/youtube/search-suggestions/api/
Site index for AI agents: https://scrapier.io/llms.txt
