# YouTube Search Suggestions Scraper (`socialdataapi/youtube-search-suggestions-scraper`) Actor

YouTube Search Suggestions Scraper gets YouTube's own search-box autocomplete suggestions for partial queries, with alphabet, question and preposition expansion for long-tail keyword research and entity-card enrichment. Export JSON, CSV or Excel, or use the API.

- **URL**: https://apify.com/socialdataapi/youtube-search-suggestions-scraper.md
- **Developed by:** [Social Data API](https://apify.com/socialdataapi) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.67 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### YouTube Search Suggestions Scraper — Autocomplete Keyword Ideas for Any Seed Query

YouTube Search Suggestions Scraper reads YouTube's own search-box autocomplete and returns every suggestion it offers for your partial query, as structured JSON — the same keyword ideas a viewer sees while typing, ready for keyword research, video SEO tags or a long-tail keyword pipeline. Turn on alphabet, question-word, preposition, comparison and number expansion and one seed query can turn into hundreds of long-tail suggestions. **No YouTube account or cookies needed.**

***

### What data can I extract with YouTube Search Suggestions Scraper?

Using this YouTube Autocomplete API, you will be able to extract the following data for each suggestion:

| 🔎 Suggestion text | 🌱 Keyword (your query) | 🧭 Seed query (base or expansion) | 🔢 Rank |
|---|---|---|---|
| 🔢 Depth (0 = direct, 1-2 = expansion) | 🔧 Expansion mode | 🏷️ Type and subtypes | 🪪 Entity / channel card |
| 🔤 Word count | 🔗 Search URL | 🌍 Language | 📍 Country |

***

### How to use YouTube Search Suggestions Scraper

Built for video SEO researchers and keyword tool builders who want every autocomplete suggestion for a keyword, without opening YouTube and typing it in by hand.

**Copy to your AI assistant:**

```text
YouTube Search Suggestions Scraper (Apify Actor ID: socialdataapi/youtube-search-suggestions-scraper, https://apify.com/socialdataapi/youtube-search-suggestions-scraper) returns YouTube's own search-box autocomplete suggestions for one or more partial queries, as structured JSON: suggestion text, keyword, seed query, rank, depth, expansion mode, type/subtypes, entity/channel card, word count and search URL. Use it whenever someone needs YouTube keyword-suggestion ideas without a browser - video SEO, keyword research, long-tail keyword discovery. Run it with curl: curl -X POST "https://api.apify.com/v2/actors/socialdataapi~youtube-search-suggestions-scraper/run-sync-get-dataset-items?token=APIFY_TOKEN" -H "Content-Type: application/json" -d '{"query":["lofi"],"maxItems":20}'. Or in Python: ApifyClient("APIFY_TOKEN").actor("socialdataapi/youtube-search-suggestions-scraper").call(run_input={"query": ["lofi"], "maxItems": 20}) then client.dataset(run["defaultDatasetId"]).list_items().items. Inputs: query (array of partial search texts, required), maxItems (integer, suggestions per query, default 20), country (select, default "US"), language (select, default "auto"), expansionModes (multi-select: alphabet/questions/prepositions/comparisons/numbers, default alphabet+questions+prepositions), enrichEntities (boolean, default true), expansionAlphabet (string, advanced), proxyConfiguration (object, optional, default no proxy). Billing: one row_result event per suggestion stored. Full input schema, every enum and default, and the complete output field list: GET https://api.apify.com/v2/actors/socialdataapi~youtube-search-suggestions-scraper/builds/default
```

#### YouTube Search Suggestions Scraper MCP Server: use this Actor from ChatGPT, Claude or Cursor

Point your AI assistant at this actor and it can pull YouTube keyword suggestions on its own, no scraping logic in your prompts.

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=socialdataapi/youtube-search-suggestions-scraper"
```

#### Step by step

1. [Create a free Apify account](https://console.apify.com/sign-up).
2. Open [YouTube Search Suggestions Scraper](https://apify.com/socialdataapi/youtube-search-suggestions-scraper) in the Apify Store.
3. Type one or more partial queries, one per line.
4. Click **Start**.
5. Download or stream your results in JSON, CSV or Excel.

#### How to scale YouTube Search Suggestions Scraper to bulk

Put as many queries as you need into **Search queries**, one per line. Each query returns up to **Max suggestions per query** rows, collected to its own full count (recorded run: 2 queries with a limit of 30 each returned 30/30 — one query never uses up another's rows). Turn on more **Expansion modes** to multiply a direct ~10-14 suggestions per query into hundreds of long-tail ones (recorded run: 1 query, limit 200, alphabet+questions+prepositions expansion → 200/200 unique suggestions in 7.5s). For ongoing tracking, schedule the actor in Apify Console or call it from your own code on a timer.

***

### ✨ Features

YouTube Search Suggestions Scraper reads YouTube's own autocomplete list. It's ideal for video SEO, keyword research and long-tail keyword mining for video titles, tags and descriptions.

It extracts, per suggestion:

- **Suggestion text** – exactly what YouTube's search box would show for that query.
- **Provenance** – the keyword you entered, the exact seed query that produced this row (the keyword itself, or "`keyword` + one letter/word"), its depth (0 = direct, 1-2 = expansion), and which expansion mode produced it (alphabet, questions, prepositions, comparisons or numbers).
- **Rank** – the suggestion's 1-based position in YouTube's own list.
- **Entity / channel cards** – when YouTube shows a knowledge-graph or channel card next to a suggestion (name, description, image, channel id, channel URL).

⚡ Choose which expansion modes to run (alphabet, question words, prepositions, comparisons, numbers), and the country and language YouTube suggests for.

***

### Use cases 💡

- **YouTube creator** — find every keyword variation viewers actually type before they land on your video.
- **Video SEO researcher** — build a tag and title list from YouTube's own suggestion data, not guesses.
- **Keyword tool builder** — turn one seed into a long-tail keyword list with alphabet/question/preposition expansion.
- **Market researcher** — track which suggestions YouTube surfaces for a niche over time.
- **AI agent builder** — feed YouTube's own autocomplete suggestions into a keyword-research tool or agent.

Building an AI agent? [Connect YouTube Search Suggestions Scraper over MCP](#mcp-integration-for-ai-agents) and let it call the actor on its own.

***

### Why choose this actor?

1. **Real suggestions, fast.** A recorded run returned 10 suggestions for one query in 0.7 seconds, and 60 suggestions for 2 queries (30 each) in under 4 seconds.
2. **Five expansion modes, not one.** Alphabet, question words, prepositions, comparisons and numbers — far more ways to turn a seed into long-tail keywords than a plain alphabet crawl.
3. **Every input runs its own full count.** 2 queries with a limit of 30 each returned 30/30 — no shared counter that lets one query use up another's results; a 200-item run on one query returned 200/200 unique suggestions with 0 duplicates.

***

### ⬇️ Input

The actor takes a list of partial YouTube search queries. **Search queries** is the only required field.

| Parameter | Required | Type | Description | Example value |
|---|---|---|---|---|
| query | Yes | array | Partial search text to autocomplete, one per line. Max 100 characters each (YouTube's own limit). | `["lofi"]` |
| maxItems | No | integer | Suggestions to return for each query. Default 20. | `20` |
| country | No | string | ISO country YouTube localizes suggestions for (from the list). Default `US`. | `"US"` |
| language | No | string | UI language YouTube suggests in (from the list). Default `auto` (matches the chosen country). | `"auto"` |
| expansionModes | No | array | Which expansion modes to use past YouTube's 14-per-request cap: alphabet, questions, prepositions, comparisons, numbers. Default alphabet+questions+prepositions. | `["alphabet","questions","prepositions"]` |
| enrichEntities | No | boolean | Re-query each suggestion verbatim to attach its knowledge-graph/channel card when YouTube has one. Default `true`. | `true` |
| expansionAlphabet | No | string | Characters appended during the "alphabet" expansion mode. Default a-z0-9. | `""` |
| proxyConfiguration | No | object | Optional proxy. By default the actor starts without one and switches to a proxy by itself when blocked. | `{"useApifyProxy": false}` |

#### Free plan limits

Users on the Apify free plan can fetch up to 20 suggestions per run (all queries together)
and 200 suggestions per month. When the limit is reached the run finishes successfully with a
status message explaining the limit. Upgrade to any paid Apify plan to remove these limits.

#### Example input

```json
{
  "query": ["lofi", "coffee grinder"],
  "maxItems": 20,
  "country": "US",
  "language": "auto",
  "expansionModes": ["alphabet", "questions", "prepositions"],
  "enrichEntities": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

***

### ⬆️ Output

One row per suggestion, in YouTube's own ranking order within each (sub-)query (`rank`). The Output tab has two views: **Overview** and **Details**. A value YouTube does not provide for a suggestion (e.g. `entity` on most rows) is `null`, never a placeholder.

#### Example output

```json
[
  {
    "id": "lofi|0|lofi",
    "keyword": "lofi",
    "suggestion": "lofi",
    "rank": 0,
    "seedQuery": "lofi",
    "depth": 0,
    "expansionMode": "direct",
    "modifier": null,
    "isVerbatim": true,
    "isExpansion": false,
    "typeCode": 0,
    "type": "query",
    "subtypes": [512, 433, 131],
    "isEntity": false,
    "entity": null,
    "wordCount": 1,
    "searchUrl": "https://www.youtube.com/results?search_query=lofi",
    "engine": "youtube",
    "country": "US",
    "language": "en",
    "scrapedAt": "2026-11-15T19:27:12.144Z"
  }
]
```

***

### How does it work?

The actor reads public YouTube data — the same autocomplete suggestions any visitor's browser gets while typing in YouTube's search box. You give it one or more partial queries; it fetches the suggestions for each and, with expansion modes on, also tries extra letters and words (and verbatim re-queries for entity cards) and merges every newly found suggestion in. It needs no YouTube account and no browser. Requests start on a direct connection; when YouTube refuses one, the actor retries and switches to a proxy by itself, so you never set up proxies. Every suggestion comes back in the same normalized JSON shape on every run, and the actor is maintained and updated when YouTube changes.

***

### How do you integrate YouTube Search Suggestions Scraper into your stack?

It works with what you already use: the REST API from any language, MCP for AI agents, and no-code tools.

#### Using YouTube Search Suggestions Scraper with the Apify API

```python
import requests

resp = requests.post(
    "https://api.apify.com/v2/actors/socialdataapi~youtube-search-suggestions-scraper/run-sync-get-dataset-items",
    params={"token": "APIFY_TOKEN"},
    json={"query": ["lofi"], "maxItems": 20},
)
for item in resp.json():
    print(item["rank"], item["suggestion"])
```

*Works in Go, Ruby, Node.js, cURL — any language that can make an HTTP request.*

#### MCP integration for AI agents

Add the actor to your AI agent with one command:

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=socialdataapi/youtube-search-suggestions-scraper"
```

This registers YouTube Search Suggestions Scraper as a tool your agent can call directly. It works with Claude Code, Cursor and Windsurf, so your agent can pull YouTube keyword suggestions for any seed and reason over them on its own.

#### No-code tools (n8n, Make, LangChain)

**n8n:** use the Apify node ("Run an Actor") with `socialdataapi/youtube-search-suggestions-scraper`, or the HTTP Request node pointed at the run-sync endpoint with your token.

**Make:** add the Apify app's "Run an Actor" module, then "Get Dataset Items" to pass the suggestions to the next step.

**LangChain:** install `langchain-apify` and use `ApifyActorsTool("socialdataapi/youtube-search-suggestions-scraper")` as a tool in your agent.

***

### Is it legal to scrape YouTube data?

Collecting publicly available YouTube suggestion data is generally legal. YouTube Search Suggestions Scraper returns only publicly available data — the same autocomplete suggestions any visitor's browser receives while typing, without logging in. Under GDPR and similar laws, scraping public data is generally permissible, but storing and using it must comply with local data-protection law. Consult legal counsel if your use case involves bulk storage of personal data.

***

### Frequently asked questions

#### What fields does YouTube Search Suggestions Scraper return?

Each suggestion comes with its text, the keyword you entered, the exact seed query and depth that produced it, its rank, expansion mode, type/subtypes, and an entity/channel card when YouTube provides one. See [the data fields section](#what-data-can-i-extract-with-youtube-search-suggestions-scraper).

#### Does YouTube Search Suggestions Scraper require a YouTube account or login?

No. Only public autocomplete data is extracted, and no credentials are needed.

#### How fast does YouTube Search Suggestions Scraper run?

A recorded run returned 10 suggestions for one query in 0.7 seconds, and 60 suggestions for 2 queries (30 each) in under 4 seconds. With alphabet+question+preposition expansion on, one query reached 200 unique suggestions (0 duplicates) in 7.5 seconds.

#### Can I search multiple queries at once?

Yes. Add as many partial queries as you like to **Search queries**; each one returns up to your per-query **Max suggestions per query** limit, and every row carries its own `keyword`.

#### What do the expansion modes do?

Each mode appends extra text to your query past YouTube's 14-suggestions-per-request cap and merges every newly discovered suggestion in: **alphabet** tries `<query> a` through `<query> 9`, **questions** tries words like "how"/"what"/"why", **prepositions** tries "for"/"with"/"near", **comparisons** tries "vs"/"or"/"alternative to", and **numbers** tries "1" through "10" — the same way typing more characters in YouTube's own search box reveals more suggestions.

#### Does YouTube Search Suggestions Scraper work with Claude, ChatGPT, and other AI agent tools?

Yes — YouTube Search Suggestions Scraper is available as an MCP tool. Register it in Claude Code, Cursor or Windsurf with `claude mcp add --transport http apify "https://mcp.apify.com?tools=socialdataapi/youtube-search-suggestions-scraper"`. Any agent that can call an HTTP endpoint can use the REST API directly.

#### Does YouTube Search Suggestions Scraper return data in a format LLMs can use directly?

Yes. It returns typed, normalized JSON with consistent field names. No HTML parsing, no selectors: pass it straight to an LLM, index it into a vector store, or feed it to an agent tool with no transformation step.

#### What happens when YouTube changes its layout or updates its anti-bot system?

The actor is maintained and updated when YouTube changes, and your calls keep returning the same JSON schema with no changes on your end.

#### Can I use YouTube Search Suggestions Scraper without managing proxies or browser infrastructure?

Yes. The actor starts on a direct connection and switches to a proxy by itself when YouTube refuses a request. You send one request and get structured JSON back. No proxy accounts, no headless browser setup, no maintenance.

***

### Your feedback

Found a bug or missing a field? Let us know in the actor's Issues tab. Every report is read, and fixes ship to keep the actor working.

# Actor input Schema

## `query` (type: `array`):

Partial search text to autocomplete, one per line - the same as typing it in YouTube's search box (e.g. 'lofi', 'how to bake'). Each query returns its own suggestions. Max 100 characters each (YouTube's own limit).

## `maxItems` (type: `integer`):

The most suggestions to return for EACH query. YouTube itself returns at most 14 per request; above that the actor expands the query (see 'Expansion modes') to collect more, up to this limit or the real end of what expansion can find. Free plan: up to 20 suggestions per run (all queries together) and 200 per month; paid plans have no limit.

## `country` (type: `string`):

ISO 3166-1 country YouTube localizes suggestions for (gl parameter).

## `language` (type: `string`):

UI language YouTube suggests in (hl parameter). 'Auto' picks the language most used in the chosen country.

## `expansionModes` (type: `array`):

How the actor expands a query past YouTube's 14-suggestions-per-request cap, by appending letters/words and merging every new suggestion found (used only once 'Max suggestions per query' needs more than the direct answer gives).

## `enrichEntities` (type: `boolean`):

Re-query each suggestion verbatim to attach its knowledge-graph/channel card (name, description, image, channel id) when YouTube has one for it. Famous queries only; most suggestions have no card.

## `expansionAlphabet` (type: `string`):

Characters appended during the 'alphabet' expansion mode. Leave empty for a-z0-9; use e.g. a non-Latin alphabet for keyword research in that script.

## `proxyConfiguration` (type: `object`):

Optional. The actor starts without a proxy and switches to a proxy by itself when it is blocked.

## Actor input object example

```json
{
  "query": [
    "lofi"
  ],
  "maxItems": 20,
  "country": "US",
  "language": "auto",
  "expansionModes": [
    "alphabet",
    "questions",
    "prepositions"
  ],
  "enrichEntities": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `details` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "query": [
        "lofi"
    ],
    "maxItems": 20,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("socialdataapi/youtube-search-suggestions-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "query": ["lofi"],
    "maxItems": 20,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("socialdataapi/youtube-search-suggestions-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "query": [
    "lofi"
  ],
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call socialdataapi/youtube-search-suggestions-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,socialdataapi/youtube-search-suggestions-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Ge8WeHzrGnERnSamH/builds/xb0vMzNGUbgvXBsQE/openapi.json
