# Youtube Autocomplete Actor (`solid-scraper/youtube-autocomplete-actor`) Actor

🎬 Unlock the power of YouTube Autocomplete—discover trending keywords, boost video visibility, and rank faster with smart search suggestions. 🚀 Perfect for creators, marketers, and SEO teams to find what viewers type every day!

- **URL**: https://apify.com/solid-scraper/youtube-autocomplete-actor.md
- **Developed by:** [SolidScraper](https://apify.com/solid-scraper) (community)
- **Categories:** SEO tools, Lead generation, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

### Youtube Autocomplete Scraper 🔍

**Youtube Autocomplete Scraper** automatically fetches autocomplete suggestions for your chosen search query, helping you discover keyword ideas and search suggestions at scale. If you’re into **YouTube autocomplete scraper** workflows, **YouTube search suggestions extraction**, or building a **YouTube autocomplete keyword scraper** dataset for SEO and marketing planning, this actor is designed for you. Whether you’re a marketer, researcher, or data enthusiast, you can use this **Youtube Autocomplete Scraper** to generate structured suggestions quickly—saving you hours of manual work.

***

### Why choose Youtube Autocomplete Scraper?

| Feature | Benefit |
|---|---|
| ✅ **All-in-one autocomplete scraping** | Collects suggestions for your original query and optional prefix/suffix variants in one run |
| ✅ **Reliable, resilient fetching** | Includes error handling for request failures and parsing issues to keep runs stable |
| ✅ **Success-focused structured output** | Produces a consistent JSON structure with your query and numbered suggestions |
| ✅ **Configurable language + country targeting** | Lets you set the **Language** and **Country** used for suggestion results |
| ✅ **Scales with batch-style expansion** | Generates additional queries when **Use Prefix** and/or **Use Suffix** are enabled |
| ✅ **Automation-friendly dataset delivery** | Pushes results to the default dataset for easy export to JSON/CSV downstream |

***

### Key features

- 🔎 **Autocomplete suggestions extraction:** Retrieves suggestion phrases for your provided query
- 🌍 **Language-aware scraping:** Uses your selected **Language** setting to shape results
- 🇺🇸 **Country-aware suggestions:** Uses your selected **Country** setting for regionalized outputs
- 🧠 **Prefix and suffix expansion:** When enabled, it runs additional queries using alphabetic prefixes and suffixes to widen coverage (useful for **YouTube keyword suggestions tool** workflows)
- 📊 **Structured dataset records:** Saves each query’s results with fields named `suggestion_01`, `suggestion_02`, etc.
- 💾 **Dataset-ready output:** Uses Apify’s dataset output pattern so you can export and analyze quickly
- 🛡️ **Basic resilience via fallbacks:** Returns empty suggestions when requests fail or responses can’t be parsed, while continuing the job

***

### Input

Provide input via an `input.json` file. Example structure:

```json
{
  "query": "apple watch",
  "language": "English",
  "country": "United States",
  "use_prefix": false,
  "use_suffix": false
}
```

#### Input Fields

| Field | Required | Description |
|---|---|---|
| `query` | ✅ | The search term to get autocomplete suggestions for. |
| `language` | ❌ | Select your language (used to tailor the suggestions). Defaults to `English`. |
| `country` | ❌ | Select your country (used to tailor the suggestions). Defaults to `United States`. |
| `use_prefix` | ❌ | Whether to add alphabetic prefixes to the query (e.g., variations that begin with different letters). Defaults to `false`. |
| `use_suffix` | ❌ | Whether to add alphabetic suffixes to the query (e.g., variations that end with different letters). Defaults to `false`. |

***

### Output

The actor saves your scraped autocomplete results as JSON records in the default dataset.

Example output:

```json
[
  {
    "query": "apple watch",
    "suggestion_01": "apple watch series 9",
    "suggestion_02": "apple watch deals",
    "suggestion_03": "apple watch bands",
    "suggestion_04": "apple watch price",
    "suggestion_05": "apple watch charger"
  }
]
```

#### Output Fields

| Field | Type | Description |
|---|---|---|
| `query` | string | The query used to fetch suggestions (original and/or generated variant) |
| `suggestion_01` | string | First autocomplete suggestion for the given `query` |
| `suggestion_02` | string | Second autocomplete suggestion for the given `query` |
| `suggestion_03` | string | Third autocomplete suggestion for the given `query` |
| `suggestion_04` | string | Fourth autocomplete suggestion for the given `query` |
| `suggestion_05` | string | Fifth autocomplete suggestion for the given `query` |
| `suggestion_06` | string | Sixth autocomplete suggestion for the given `query` (if present in the returned list) |
| `suggestion_07` | string | Seventh autocomplete suggestion for the given `query` (if present in the returned list) |
| `suggestion_08` | string | Eighth autocomplete suggestion for the given `query` (if present in the returned list) |
| `suggestion_09` | string | Ninth autocomplete suggestion for the given `query` (if present in the returned list) |
| `suggestion_10` | string | Tenth autocomplete suggestion for the given `query` (if present in the returned list) |

> Note: The code constructs suggestion keys using `suggestion_` followed by a zero-padded index (e.g., `suggestion_01`). The exact number of suggestion fields per record depends on the number of suggestions returned and the internal result slicing.

***

### How to use Youtube Autocomplete Scraper (via Apify Console)

1. **Open Apify Console**\
   Log in at https://console.apify.com and open the **Actors** section.

2. **Find the actor**\
   Search for **Youtube Autocomplete Scraper** and open its actor page.

3. **Go to the INPUT tab**\
   Configure the input fields using the form or paste an `input.json` structure.

4. **Set your query**\
   Enter your target `query` (required). This is the base keyword you want to scrape autocomplete suggestions for.

5. **Choose Language and Country**\
   Update `language` and `country` to match where your audience is located.\
   These settings help you create a **YouTube autocomplete keyword scraper** style output that’s more relevant to your research.

6. **Decide whether to use Prefix/Suffix expansion**\
   Enable `use_prefix` to expand queries with alphabetic prefixes, enable `use_suffix` to expand queries with alphabetic suffixes.\
   This is handy when you want wider coverage for **scrape YouTube autocomplete suggestions** or **YouTube related searches scraper**-like research patterns.

7. **Run the actor**\
   Click **Run**. Watch the logs for suggestion counts. If requests fail or responses can’t be parsed, the actor returns empty suggestions for that particular query and continues.

8. **Open the dataset and export**\
   After the run completes, open the default dataset in the **OUTPUT** section and export the JSON data (and convert to CSV if you use your own export workflow).

No coding required — get accurate results in minutes. 🚀

***

### Advanced features & SEO optimization

- 🚀 **Engineered for Youtube Autocomplete Scraper keyword discovery:** Great for **YouTube autocomplete scraper tool** workflows where you need suggestion lists you can feed into keyword research
- 🌐 **YouTube autocomplete data scraper targeting:** Use `language` and `country` to generate results aligned with your audience region, improving the usefulness of **YouTube search suggestions extraction**
- 🔁 **Wide coverage with prefix/suffix query expansion:** Turn on `use_prefix` and/or `use_suffix` to broaden suggestion coverage using alphabetic variants
- 🧾 **Clean, structured suggestion keys:** Output records are consistently labeled as `suggestion_01`, `suggestion_02`, etc., making it easy to analyze in spreadsheets or BI pipelines
- 📌 **Built for dataset workflows:** Results are pushed to the default dataset, so you can integrate this **YouTube autocomplete scraping software** into your automation chain

***

### Best use cases

- 📈 **SEO researchers expanding keyword lists:** Use **Youtube Autocomplete Scraper** to build a structured pool of autocomplete ideas for content planning
- 🧠 **Marketers validating audience intent:** Compare suggestion phrasing across `language`/`country` settings to sharpen messaging and targeting
- 🔍 **YouTube keyword research autocomplete:** Generate many query variations quickly to support ideation and keyword clustering
- 🗂️ **Data analysts building suggestion corpora:** Import the dataset JSON and analyze frequency, overlaps, and topical groupings
- 🧬 **Content strategists mapping related topics:** Use prefix/suffix expansion to uncover adjacent themes and long-tail angles
- 🛠️ **Developer workflows for research pipelines:** Automate repeated suggestion pulls for dashboards or ongoing keyword monitoring

***

### Technical specifications

- **Supported Input Formats**
  - ✅ JSON input matching the provided schema (`query`, `language`, `country`, `use_prefix`, `use_suffix`)
- **Proxy Support**
  - ✅ Built-in proxy support for reliable scraping
- **Retry Mechanism**
  - ✅ Includes retries and fallbacks for resilience at a high level
- **Dataset Structure**
  - ✅ JSON records containing `query` and `suggestion_XX` fields
- **Rate Limits & Performance**
  - ✅ Designed to process the original query and optional prefix/suffix variants in one run
- **Limitations**
  - ❌ If requests fail or responses can’t be parsed for a query, suggestions for that query may be empty

***

### FAQ

#### ✅ What does Youtube Autocomplete Scraper return?

It returns JSON records in your dataset, where each record includes the `query` used and autocomplete suggestions labeled as `suggestion_01`, `suggestion_02`, and so on (depending on how many suggestions are returned).

#### ✅ Do I need to provide a query every time?

Yes—`query` is required. You can also adjust `language`, `country`, `use_prefix`, and `use_suffix` to control how suggestions are generated.

#### ✅ Can I scrape suggestions for different languages and countries?

Yes. Set `language` and `country` to tailor suggestion results for your audience. This is useful for YouTube autocomplete keyword scraper workflows.

#### ✅ What are `use_prefix` and `use_suffix`?

`use_prefix` adds alphabetic prefixes to your base query, and `use_suffix` adds alphabetic suffixes. Turning them on expands the set of queries, helping you scrape YouTube autocomplete suggestions more broadly.

#### ❌ Does it require any authentication or login?

No login details are part of the input schema. The actor is intended for scraping publicly available autocomplete suggestions.

#### 💻 Can I use this in a Python or automation pipeline?

Yes. The actor outputs structured JSON into the Apify dataset, which you can export and load into your pipeline. The API/pipeline approach is compatible with typical data workflows.

#### 📦 Can I export the results to CSV?

The actor saves JSON to the default dataset. From there, you can export and convert to CSV in your downstream workflow.

#### ⚖️ Is it compliant to use this data for marketing or research?

Use the output responsibly and make sure your use complies with applicable laws and platform rules. This tool is based on publicly available data, but compliance is ultimately your responsibility.

***

### Support & feature requests

Want to improve your Youtube Autocomplete Scraper workflow? We’d love feedback. 💡

- 💡 **Feature Requests:** Examples include adding more output controls, better result slicing, or exporting directly to additional formats like CSV from the actor side.
- 📧 **Contact:** Email us at <dataforleads@gmail.com>

Your feedback helps shape the roadmap for this YouTube autocomplete keyword scraper actor.

***

*In short: the **Youtube Autocomplete Scraper** is a practical, SEO-friendly way to turn YouTube autocomplete keyword research into structured datasets—at scale.*

# Actor input Schema

## `query` (type: `string`):

The search term to get suggestions for.

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

Select your language

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

Select your country

## `use_prefix` (type: `boolean`):

Whether to add alphabetic prefixes to the query.

## `use_suffix` (type: `boolean`):

Whether to add alphabetic suffixes to the query.

## Actor input object example

```json
{
  "query": "apple watch",
  "language": "English",
  "country": "United States",
  "use_prefix": false,
  "use_suffix": false
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("solid-scraper/youtube-autocomplete-actor").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("solid-scraper/youtube-autocomplete-actor").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 '{}' |
apify call solid-scraper/youtube-autocomplete-actor --silent --output-dataset

```

## MCP server setup

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

```

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/faWUegc6LBexfgV8z/builds/SuRC7V0J9XtWl8SxD/openapi.json
