# Google Autocomplete Keyword Scraper (`lugubrious_junco_vex/google-autocomplete-keywords`) Actor

Google and YouTube autocomplete keyword research: expand seed keywords with a-z, 0-9, questions, prepositions, custom prefixes/suffixes and recursive depth. Clean deduplicated suggestions with position and expansion type.

- **URL**: https://apify.com/lugubrious_junco_vex/google-autocomplete-keywords.md
- **Developed by:** [Kokai Milan](https://apify.com/lugubrious_junco_vex) (community)
- **Categories:** SEO tools, Marketing
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.25 / 1,000 keywords

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

## Google Autocomplete Keyword Scraper

Turn a few seed keywords into **hundreds of real search suggestions** from **Google Autocomplete** (and optionally **YouTube** search suggestions). Built for SEO keyword research, content planning, PPC, product research and question mining.

It calls only Google's **public suggestion endpoint** (`suggestqueries.google.com`). No login, no browser, no scraped tokens, so it is fast, cheap and runs in 256 MB.

### What you get

- **Seed expansion modes**
  - `alphabet`: seed + `a`..`z` and `0`..`9` (36 queries)
  - `questions`: `who`, `what`, `why`, `how`, `when`, `where`, `which`, `can`, `is`, `are`, `does` + seed (11 queries)
  - `prepositions`: seed + `for`, `with`, `without`, `near`, `vs`, `versus`, `to`, `like`, `and` (9 queries)
  - **Custom prefixes and suffixes** (e.g. `best ...`, `... review`)
- **Recursion depth 1-3**: query the suggestions themselves to discover suggestions of suggestions.
- **Google and YouTube** suggestions (`sources`), tagged in each row.
- **Any language and country** (`hl` / `gl`), because suggestions differ per market.
- **Deduplicated per seed** (case-insensitive), with a `maxKeywords` cap per seed.
- **Polite and robust**: low concurrency, short delays, exponential backoff on 429/503, warnings instead of crashes on bad input.

Real test results: one seed with `alphabet` + `questions` returned about **450 unique suggestions in a few seconds**; two seeds returned 909 in under 7 seconds.

### Input example

```json
{
  "seedKeywords": ["coffee machine", "running shoes"],
  "language": "en",
  "country": "us",
  "sources": ["google"],
  "expansions": ["alphabet", "questions"],
  "customPrefixes": ["best"],
  "customSuffixes": ["review"],
  "depth": 1,
  "maxKeywords": 1000
}
```

| Field | Description |
|---|---|
| `seedKeywords` | Keywords to expand |
| `language`, `country` | Locale of the suggestions (default `en` / `us`) |
| `sources` | `google`, `youtube` or both |
| `expansions` | `alphabet`, `questions`, `prepositions` (the plain seed is always queried) |
| `customPrefixes`, `customSuffixes` | Your own modifiers |
| `depth` | 1 = seed expansions only; 2-3 also query each discovered suggestion |
| `maxKeywords` | Cap on unique suggestions per seed and source |

### Output sample

One dataset item per unique suggestion:

```json
{
  "seed": "coffee machine",
  "suggestion": "which coffee machine",
  "sourceQuery": "who coffee machine",
  "expansionType": "question",
  "depth": 1,
  "position": 1,
  "source": "google",
  "language": "en",
  "country": "us"
}
```

`position` is the rank (1 = top) of the suggestion in the response to `sourceQuery`. `expansionType` is one of `seed`, `alphabet`, `question`, `preposition`, `prefix`, `suffix`, `recursive`.

### Pricing

**$0.40 per 1,000 keyword suggestions** (pay per event: charged per unique suggestion delivered, no start fee). The $5 monthly credit on Apify's free plan covers roughly 12,000 keywords a month. Use `maxKeywords` or a max cost per run to bound spend; the run stops gracefully at the limit.

### Use cases

- **SEO keyword research** and long-tail discovery
- **Question mining** for FAQ pages, blog topics and People-Also-Ask style content
- **YouTube video topic** research
- **PPC** keyword list building and negative keyword ideas
- **Market comparison**: the same seed across countries and languages

### FAQ

**Does it return search volume?** No. Autocomplete shows what people commonly type, not how often. Combine the list with a volume tool if you need numbers. Suggestion `position` is a rough popularity signal only.

**How does depth work?** Depth 1 queries the seed and its expansions. Depth 2 sends one plain request for every unique suggestion found at depth 1, so requests grow quickly. Combine with `maxKeywords`.

**Why do I get fewer than expected?** Google returns up to about 10 suggestions per request and fewer for niche seeds. Duplicates are removed per seed.

**Are YouTube suggestions supported?** Yes, via the same public endpoint with the YouTube data source (`ds=yt`); verified working.

**Are results personalised?** Requests are anonymous with no cookies, so you get generic suggestions for the chosen language and country.

### Limits

- No search volume, CPC or competition data.
- Google may rate-limit very aggressive use; the Actor backs off automatically but huge recursive runs take longer.
- Suggestions can change over time and vary by location.

# Actor input Schema

## `seedKeywords` (type: `array`):

Keywords to expand, e.g. "coffee machine". Each seed is processed and deduplicated separately.

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

Interface language code (hl), e.g. en, de, fr, es, ja, pt-BR.

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

Two-letter country code (gl), e.g. us, gb, de, fr, in. Suggestions differ by country.

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

Google Search suggestions and/or YouTube search suggestions.

## `expansions` (type: `array`):

alphabet = seed + a..z and 0..9 (36 requests); questions = who/what/why/how/when/where/which/can/is/are/does + seed (11); prepositions = seed + for/with/without/near/vs/versus/to/like/and (9). The plain seed is always queried.

## `customPrefixes` (type: `array`):

Words placed before the seed, e.g. "best" gives "best coffee machine".

## `customSuffixes` (type: `array`):

Words placed after the seed, e.g. "review" or "near me".

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

1 = expand the seed only. 2 = additionally query every suggestion found at depth 1 (suggestions of suggestions), 3 = one more level. Deeper levels send one plain request per suggestion, so cost grows fast; use together with Max keywords.

## `maxKeywords` (type: `integer`):

Stop expanding a seed after this many unique suggestions (per source).

## Actor input object example

```json
{
  "seedKeywords": [
    "coffee machine"
  ],
  "language": "en",
  "country": "us",
  "sources": [
    "google"
  ],
  "expansions": [
    "alphabet",
    "questions"
  ],
  "depth": 1,
  "maxKeywords": 300
}
```

# Actor output Schema

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

Dataset with all scraped items

# 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 = {
    "seedKeywords": [
        "coffee machine"
    ],
    "language": "en",
    "country": "us",
    "sources": [
        "google"
    ],
    "expansions": [
        "alphabet",
        "questions"
    ],
    "maxKeywords": 300
};

// Run the Actor and wait for it to finish
const run = await client.actor("lugubrious_junco_vex/google-autocomplete-keywords").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 = {
    "seedKeywords": ["coffee machine"],
    "language": "en",
    "country": "us",
    "sources": ["google"],
    "expansions": [
        "alphabet",
        "questions",
    ],
    "maxKeywords": 300,
}

# Run the Actor and wait for it to finish
run = client.actor("lugubrious_junco_vex/google-autocomplete-keywords").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 '{
  "seedKeywords": [
    "coffee machine"
  ],
  "language": "en",
  "country": "us",
  "sources": [
    "google"
  ],
  "expansions": [
    "alphabet",
    "questions"
  ],
  "maxKeywords": 300
}' |
apify call lugubrious_junco_vex/google-autocomplete-keywords --silent --output-dataset

```

## MCP server setup

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

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/jay9Hkc2zhn2PJvtt/builds/Z0MbTkeLX5kXz0xVi/openapi.json
