# Google Autocomplete Expander — Bulk Keyword Suggestions (`axery/google-autocomplete-keyword-expander`) Actor

Expand one seed keyword into hundreds of real Google Autocomplete suggestions via alphabet-suffix and question-word fan-out. Official public suggest endpoint, no scraping of search results pages.

- **URL**: https://apify.com/axery/google-autocomplete-keyword-expander.md
- **Developed by:** [Axery](https://apify.com/axery) (community)
- **Categories:** Developer tools, Other, Integrations
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.64 / 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?

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

## Google Autocomplete Keyword Expander

Turns one seed keyword into hundreds of real Google Autocomplete suggestions, over plain HTTP — no browser, no login.

### Not a scrape — Google's own public suggest endpoint

Reads `suggestqueries.google.com/complete/search` — the same JSON endpoint Firefox's address bar calls for search suggestions. Unauthenticated, no anti-bot layer encountered, clean JSON response.

### What makes this different

**One seed becomes 150-350+ unique keywords.** Google's endpoint answers only one query at a time; there is no bulk parameter. This Actor implements the standard keyword-harvesting technique on top of it: append every letter a-z and digit 0-9 to your seed (`alphabet` mode), or every question word (`questions` mode), fire all the variant queries concurrently, and deduplicate the combined suggestions into one list — live-tested at **307 unique keywords from the single seed "python tutorial"**.

**Provenance kept, not thrown away.** Each keyword's `found_via` field names which variant query surfaced it, so you can see whether a keyword came from the `...b` branch or a `how ...` question — useful for understanding search intent clusters, not just getting a flat list.

**Locale-aware question words.** `questions` mode uses the right question words for the interface language (`what/why/how` in English, `apa/kenapa/bagaimana` in Indonesian, `que/como/donde` in Spanish) rather than only supporting English.

### Input

| Field | Type | Notes |
|---|---|---|
| `seed` | string | The keyword to expand. |
| `mode` | enum | `alphabet` (36 variants), `questions` (~10 variants), `both`, or `seed_only`. |
| `hl` | string | Interface language, e.g. `en`, `id`, `es`. Also picks the question-word list. |
| `gl` | string | Country code — changes which suggestions surface. |
| `maxItems` | integer | Cap on results; `0` returns everything harvested. |
| `proxyConfiguration` | object | Not needed for normal volumes. |

### Known limits

- **No true "total suggestion count."** Google's suggest endpoint returns up to ~10 suggestions per query; the expansion strategy widens coverage but a seed with genuinely few related searches will still return a short list regardless of mode.
- **Duplicate suggestions across variants are merged, not double-counted** — `found_via` lists every variant that surfaced a given keyword.

### Local development

```bash
pip install -r requirements.txt
python test_local.py "python tutorial" --mode alphabet --out sample_output.json
python test_local.py "belajar python" --hl id --gl id --mode both
```

`sample_output.json` in this folder is real output from a live run, kept so the schema can be reviewed without running anything.

# Actor input Schema

## `seed` (type: `string`):

The keyword or phrase to expand.

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

How to expand the seed. `alphabet` appends each letter/digit (36 variant queries); `questions` prepends question words in the chosen locale; `both` combines them for the widest harvest.

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

Google's `hl` parameter, e.g. `en`, `id`, `es`. Also selects which question-word list is used in `questions`/`both` mode.

## `gl` (type: `string`):

Google's `gl` parameter (two-letter country code) - changes which suggestions surface.

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

Cap on unique keywords returned. `0` returns everything the expansion harvests - typically 150-350 unique keywords per seed in `alphabet` mode.

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

Apify Proxy settings. Google's autocomplete endpoint is public, but Apify's own container IP range can still be rate-limited or blocked by services that treat cloud IPs as suspicious regardless of any WAF - defaults to Residential as a precaution.

## Actor input object example

```json
{
  "seed": "python tutorial",
  "mode": "alphabet",
  "hl": "en",
  "gl": "us",
  "maxItems": 0,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `keywords` (type: `string`):

One row per unique suggestion, with the seed, which expansion variant(s) surfaced it, and its rank.

# 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 = {
    "seed": "python tutorial",
    "hl": "en",
    "gl": "us"
};

// Run the Actor and wait for it to finish
const run = await client.actor("axery/google-autocomplete-keyword-expander").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 = {
    "seed": "python tutorial",
    "hl": "en",
    "gl": "us",
}

# Run the Actor and wait for it to finish
run = client.actor("axery/google-autocomplete-keyword-expander").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 '{
  "seed": "python tutorial",
  "hl": "en",
  "gl": "us"
}' |
apify call axery/google-autocomplete-keyword-expander --silent --output-dataset

```

## MCP server setup

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

```

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/0x9hLe7mjIyMeGgiJ/builds/5Q5Rp3JmjHCaOOUE8/openapi.json
