# Youtube Autocomplete Keyword Scraper (`real-estate-api/youtube-autocomplete-keyword-scraper`) Actor

This Actor collects public search autocomplete suggestions from YouTube based on seed keywords. It extracts keyword suggestions, seed terms, language settings, and regional variants to support keyword research, YouTube SEO, content ideation, and trend analysis.

- **URL**: https://apify.com/real-estate-api/youtube-autocomplete-keyword-scraper.md
- **Developed by:** [real-estate-api](https://apify.com/real-estate-api) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
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 Autocomplete Keyword Scraper — YouTube Search Keyword Suggestions

![YouTube Autocomplete Keyword Scraper cover](https://images.bigibyte.com/cdn-cgi/image/width=1260,height=540,fit=cover,format=webp/apify-actors-covers/youtube-autocomplete-keyword-scraper-cover.png)

### Overview

YouTube Autocomplete Keyword Scraper collects keyword suggestions from YouTube search autocomplete based on user-provided seed keywords.

Enter one or more keywords, choose a collection mode, and specify the maximum number of results. The actor returns structured keyword data that can help with YouTube SEO, content planning, keyword discovery, and audience research.

### Features

- **Keyword suggestions:** Collect autocomplete suggestions for multiple seed keywords.
- **Alphabet expansion:** Discover additional keyword variations using letters and numbers.
- **Custom result limit:** Control the maximum number of collected suggestions.
- **Language selection:** Specify the language preference for keyword suggestions.
- **Keyword analysis:** Retrieve keyword length, word count, search intent, and keyword classification.
- **Question discovery:** Identify question-based keyword suggestions and their question types.
- **Structured dataset:** Receive detailed keyword records with their seed keywords, positions, and search information.
- **Multiple export formats:** Export collected results in JSON, CSV, Excel, and other supported dataset formats.

### Collection Modes

| Mode | Description |
|---|---|
| `suggest` | Collect YouTube autocomplete suggestions for the provided seed keywords. |
| Alphabet expansion | Extend keyword discovery by querying seed keywords with letters A–Z and numbers 0–9. |

Alphabet expansion helps discover additional long-tail keyword variations around each seed keyword.

### Input Parameters

| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `mode` | String | Yes | `suggest` | Selects the keyword collection mode. |
| `keywords` | Array | Yes | None | List of seed keywords used to collect autocomplete suggestions. |
| `maxItems` | Integer | No | `50` | Maximum number of keyword suggestions to collect. |
| `requestDelaySecs` | Number | No | `1` | Delay in seconds between collection requests. |
| `hl` | String | No | `en` | Language preference for autocomplete suggestions. |

### Example Input

```json
{
    "mode": "suggest",
    "keywords": [
        "python"
    ],
    "maxItems": 50,
    "requestDelaySecs": 1,
    "hl": "en"
}
```

### What Data Does This Actor Extract?

The actor returns structured keyword records with keyword details, search characteristics, query information, and collection timestamps.

| Field | Description |
|---|---|
| `alphabet_suffix` | Alphabetical or numerical suffix used to expand the original seed keyword. |
| `contains_seed` | Indicates whether the suggested keyword contains the original seed keyword. |
| `first_word` | First word of the suggested keyword phrase. |
| `keyword_length` | Character length of the suggested keyword. |
| `keyword_type` | Classification of the suggested keyword. |
| `language` | Language associated with the keyword. |
| `last_word` | Last word of the suggested keyword phrase. |
| `position` | Position of the suggestion in the returned results, starting from 1. |
| `query_type` | Classification of the query used to discover the keyword. |
| `query_used` | Actual search query used to generate the suggestion. |
| `question_keyword` | Indicates whether the keyword is question-based. |
| `question_type` | Classification of the question when the keyword is question-based. |
| `scraped_at` | Date and time when the keyword was collected. |
| `search_intent` | Search intent classification associated with the keyword. |
| `seed` | Original keyword provided for the suggestion search. |
| `suggestion` | Keyword phrase suggested by YouTube autocomplete. |
| `word_count` | Number of words in the suggested keyword phrase. |

### Example Output

```json
{
    "alphabet_suffix": "a",
    "contains_seed": true,
    "first_word": "python",
    "keyword_length": 19,
    "keyword_type": "long_tail",
    "language": "en",
    "last_word": "beginners",
    "position": 1,
    "query_type": "alphabet_expansion",
    "query_used": "python a",
    "question_keyword": false,
    "question_type": null,
    "scraped_at": "2026-10-26T00:00:00+00:00",
    "search_intent": "informational",
    "seed": "python",
    "suggestion": "python course beginners",
    "word_count": 3
}
```

### Use Cases

- **YouTube SEO:** Discover autocomplete keyword ideas for optimizing video titles and descriptions.
- **Long-tail keyword research:** Find additional search phrase variations using alphabet expansion.
- **Content planning:** Identify keyword ideas related to a topic before creating videos.
- **Audience research:** Explore phrases people may use when searching for specific topics.
- **Question keyword research:** Discover question-based keywords for tutorials, educational videos, and FAQs.
- **Search intent analysis:** Organize keyword ideas according to their search intent.
- **Keyword discovery:** Build structured collections of related YouTube search suggestions.
- **Scheduled research:** Refresh keyword datasets regularly using Apify schedules.

### Working with Your Dataset

Once the actor finishes running, you can access the collected keyword records in the Apify dataset.

Export your results in supported formats, including:

- JSON
- CSV
- Excel

You can use these records for keyword analysis, spreadsheet-based research, SEO planning, content strategy, and further data processing.

### FAQ

**What information does this actor collect?**

It collects YouTube autocomplete suggestions along with keyword characteristics, search intent, question classification, query information, and collection timestamps.

**Can I search using multiple keywords?**

Yes. You can provide multiple seed keywords in the `keywords` input field.

**What is alphabet expansion?**

Alphabet expansion extends keyword discovery by combining seed keywords with letters A–Z and numbers 0–9 to find additional suggestions.

**Can I control the number of results?**

Yes. Use `maxItems` to specify the maximum number of suggestions to collect.

**Can I collect suggestions in different languages?**

You can specify a language preference using the `hl` input parameter.

**Does the actor provide keyword analysis?**

Yes. The output includes keyword length, word count, keyword classification, search intent, and question-related information.

**What export formats are available?**

You can export your dataset in JSON, CSV, Excel, and other supported Apify dataset formats.

**Can I run keyword research automatically?**

Yes. You can configure Apify schedules to run the actor periodically and refresh your keyword dataset.

### Disclaimer

This actor is an independent tool and is not officially affiliated with, endorsed by, sponsored by, or associated with YouTube or its owners. It collects publicly available keyword suggestions. Users are responsible for ensuring that their use of the collected information complies with applicable laws and relevant terms.

### Is Web Scraping Legal?

Collecting information that is already public is generally legal. There is no single law that bans all forms of web scraping. The limits are the usual ones: do not break into accounts, do not take private or confidential data, and be careful with personal data and copyrighted works. A site's terms can also restrict how you access it. Facts such as a public name, price, or rating are not the same as republishing someone's article or photo.

This actor collects information from public pages. It does not log in and it does not bypass access controls.

For a longer explanation, see Apify's article [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/).

# Actor input Schema

## `mode` (type: `string`):

What to scrape.

## `keywords` (type: `array`):

Seed keywords.

## `expandAlphabet` (type: `boolean`):

Also query seed plus a through z (and 0-9 in expand mode).

## `hl` (type: `string`):

Language code passed as hl.

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

Stop after this many successful rows. Hard max is 1000.

## `requestDelaySecs` (type: `number`):

Seconds to wait between requests.

## `userAgent` (type: `string`):

User-Agent header sent with each request.

## `timeoutSecs` (type: `integer`):

Overall run budget in seconds.

## `requestTimeoutSecs` (type: `integer`):

Per-request timeout in seconds.

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

Optional proxy. Leave off unless you need it.

## Actor input object example

```json
{
  "mode": "suggest",
  "keywords": [
    "python"
  ],
  "expandAlphabet": false,
  "hl": "en",
  "maxItems": 100,
  "requestDelaySecs": 1,
  "userAgent": "ActorResearch/1.0",
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

Dataset rows in the overview table.

## `dataset` (type: `string`):

Full dataset for this run.

## `items` (type: `string`):

Dataset items as JSON.

# 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 = {
    "keywords": [
        "python"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("real-estate-api/youtube-autocomplete-keyword-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 = { "keywords": ["python"] }

# Run the Actor and wait for it to finish
run = client.actor("real-estate-api/youtube-autocomplete-keyword-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 '{
  "keywords": [
    "python"
  ]
}' |
apify call real-estate-api/youtube-autocomplete-keyword-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,real-estate-api/youtube-autocomplete-keyword-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/6amCnxn3W6iO2VgoU/builds/Bn2dRKZ9u8VjOpQiq/openapi.json
