# Google Autocomplete Scraper: Keyword Ideas, YouTube & Shopping (`ksvan/google-autocomplete-scraper`) Actor

Bulk long-tail keyword ideas from Google Autocomplete: A-Z and question expansion, recursive depth, Google web, YouTube, Shopping, Images and News suggestions, any country and language. Fast HTTP, no browser.

- **URL**: https://apify.com/ksvan/google-autocomplete-scraper.md
- **Developed by:** [K.S. Van](https://apify.com/ksvan) (community)
- **Categories:** SEO tools, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.10 / 1,000 suggestions

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## Google Autocomplete Scraper: Keyword Ideas from Google, YouTube & Shopping

Turn one keyword into hundreds of real long-tail search phrases. This Actor reads the suggestions Google shows while people type, from **Google web search, YouTube, Google Shopping, Google Images and Google News**, and expands every seed with **A-Z, question and modifier variations**. Any country, any language, in bulk.

It calls Google's suggestion service over plain HTTP (no browser), so it is fast and cheap: a typical seed with A-Z and question expansion finishes in a few seconds and returns 300-500 unique suggestions.

### What you get

| Feature | Details |
|---|---|
| Bulk seeds | As many keywords as you like in one run |
| 5 sources | Google web, **YouTube**, **Google Shopping**, Images, News |
| A-Z expansion | `keyword a` ... `keyword z` |
| Question expansion | `how keyword`, `what keyword`, `why keyword` ... |
| Modifier expansion | `keyword for`, `keyword with`, `keyword vs`, `keyword near` ... |
| 0-9 expansion | `keyword 1` ... `keyword 9` |
| Depth | Get suggestions for every suggestion (depth 1-2) for really big lists |
| Relevance score | Google's own relevance number for each suggestion |
| Deduplication | Each suggestion appears once per seed and source |
| Filters | Max suggestions per seed; only suggestions that contain the seed |
| Any market | Country (`gl`) and language (`hl`) codes |

### Use cases

- **SEO keyword research**: long-tail phrases and questions for articles and FAQ sections.
- **YouTube SEO**: what people type into YouTube search, for titles, tags and video ideas.
- **E-commerce and Amazon/Etsy sellers**: Google Shopping suggestions show buyer-intent phrases.
- **Book and product niches**: see how people describe a niche in their own words.
- **AI agents and automations**: run it from n8n, Make, Zapier or the Apify MCP server.

Pair it with our **Google Trends Scraper** (`ksvan/google-trends-scraper`) to check which of the found phrases are rising.

### Input example

```json
{
  "keywords": ["cozy mystery", "air fryer"],
  "sources": ["web", "youtube"],
  "country": "us",
  "language": "en",
  "expandAlphabet": true,
  "expandQuestions": true,
  "depth": 0
}
```

### Output example

```json
{
  "keyword": "cozy mystery",
  "source": "web",
  "suggestion": "cozy mystery conventions",
  "depth": 0,
  "query": "cozy mystery c",
  "expansion": "alphabet",
  "position": 1,
  "relevance": 1000,
  "suggestionType": "QUERY",
  "wordCount": 3,
  "containsKeyword": true,
  "country": "us",
  "language": "en"
}
```

### Pricing

Pay per result: you are charged for each unique suggestion saved to the dataset. Use **Max suggestions per keyword** or the run's maximum cost setting to control spend; the Actor stops cleanly when the limit is reached.

### Tips

- Question expansion often returns loosely related ideas. Turn on **Only suggestions containing the keyword** for a tight list.
- Depth 1 multiplies the output (every suggestion is queried again). Start with depth 0.
- Suggestions differ by country and language; run separate seeds per market for clean data.

### FAQ

**Is this legal?** The Actor collects only the public, anonymous suggestions that Google shows to everyone in its search boxes. No personal data is collected. Check your own use case and local laws.

**Something broke or you need a feature?** Open an issue on the Actor page.

# Actor input Schema

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

Seed keywords, one per line. Each seed is expanded and returns its own set of suggestions.

## `sources` (type: `array`):

Which Google search box to read suggestions from.

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

Two-letter country code, e.g. us, gb, de, pl.

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

Language code, e.g. en, de, pl, es.

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

Also query 'keyword a', 'keyword b' ... 'keyword z' (26 extra queries per seed).

## `expandQuestions` (type: `boolean`):

Also query 'how keyword', 'what keyword', 'why keyword' ... (13 extra queries).

## `expandPrepositions` (type: `boolean`):

Also query 'keyword for', 'keyword with', 'keyword vs', 'keyword near' ... (10 extra queries).

## `expandNumbers` (type: `boolean`):

Also query 'keyword 0' ... 'keyword 9' (10 extra queries).

## `depth` (type: `integer`):

0 = suggestions for the seed and its expansions. 1 = also get suggestions for every suggestion found (much larger output). Max 2.

## `maxSuggestionsPerKeyword` (type: `integer`):

Stop after this many unique suggestions per seed and source. 0 = no limit.

## `onlyContainingKeyword` (type: `boolean`):

Drop suggestions that do not contain every word of the seed (question expansion often returns loosely related ideas).

## `maxConcurrency` (type: `integer`):

Parallel requests.

## `maxRetries` (type: `integer`):

Attempts per request, each on a fresh proxy IP.

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

Apify Proxy is used by default; the Actor switches to residential IPs automatically if Google starts blocking.

## Actor input object example

```json
{
  "keywords": [
    "cozy mystery",
    "air fryer"
  ],
  "sources": [
    "web"
  ],
  "country": "us",
  "language": "en",
  "expandAlphabet": true,
  "expandQuestions": true,
  "expandPrepositions": false,
  "expandNumbers": false,
  "depth": 0,
  "maxSuggestionsPerKeyword": 0,
  "onlyContainingKeyword": false,
  "maxConcurrency": 10,
  "maxRetries": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

One record per unique suggestion.

# 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": [
        "cozy mystery",
        "air fryer"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("ksvan/google-autocomplete-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": [
        "cozy mystery",
        "air fryer",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("ksvan/google-autocomplete-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": [
    "cozy mystery",
    "air fryer"
  ]
}' |
apify call ksvan/google-autocomplete-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ksvan/google-autocomplete-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/zX6HTpe60PoMLohAg/builds/v8ZVDFKjdw5ZI3eBM/openapi.json
