# Google Autocomplete Keyword Research Tool (`serj_henrique/google-autocomplete-keyword-research-tool`) Actor

A multi-depth scraper that harvests Google Autocomplete suggestions from any seed keyword. Expand a single topic into hundreds of long-tail keyword ideas by traversing the full alphabet and recursively following the most relevant suggestions.

- **URL**: https://apify.com/serj_henrique/google-autocomplete-keyword-research-tool.md
- **Developed by:** [Sergio Henrique](https://apify.com/serj_henrique) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.30 / 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

## Google Autocomplete Keyword Research Tool

A multi-depth scraper that harvests Google Autocomplete suggestions from any seed keyword. Expand a single topic into hundreds of long-tail keyword ideas by traversing the full alphabet and recursively following the most relevant suggestions.

***

### What the Actor Does

When you type a query into Google, the search bar offers autocomplete suggestions that reflect real user intent. These suggestions are a goldmine for keyword research, content planning, and SEO analysis — but collecting them at scale requires automation.

This Actor automates that process. You provide one or more seed keywords, and the scraper systematically queries Google Autocomplete by appending every letter of the alphabet (a-z) and every digit (0-9). It then takes the suggestions returned at each step and uses them as new starting points, repeating the alphabet sweep until it reaches the configured depth limit. The result is a tree of keyword variants, each tagged with its depth level, the original seed keyword it descended from, and its relevance score from Google.

***

### Use Cases

- **SEO & Content Strategy**: Feed a product or topic into the Actor and receive a structured list of long-tail keywords with relevance scores. Use the output to identify content gaps, plan blog posts, or discover underserved search queries.
- **PPC & Ad Campaign Research**: Discover the exact phrases users type when searching for a niche. The depth expansion reveals question-style queries and modifier variations that manual brainstorming would miss.
- **Market Intelligence**: Seed the Actor with competitor brand names or industry terms to map the competitive landscape. The `suggestion_type` field helps distinguish informational queries from navigational or transactional ones.
- **Product & Feature Discovery**: Use autocomplete data to surface features, use cases, or integrations that customers mention — e.g., searching "Slack" reveals suggestions like "Slack integration with Jira" or "Slack alternative for teams."

***

### How the Search Works

The Actor operates in two distinct phases controlled by the **Max Depth** parameter:

#### Phase 1 — Alphabet Expansion (Depth 1)

Every seed keyword is expanded by appending each character in the alphabet and digits:

```
seed: "python"
depth 0: "python"
  → "python a"  → yields: ["python api", "python course a1", ...]
  → "python b"  → yields: ["python basics", "python blog", ...]
  → "python c"  → yields: ["python conda", "python code", ...]
  → ...
  → "python z"  → yields: ["python zip", ...]
  → "python 0"  → yields: ["python 099", ...]
  → ...
  → "python 9"  → yields: ["python 9x10", ...]
```

#### Phase 2 — Recursive Suggestion Expansion (Depth 2)

The suggestions collected in Phase 1 become new seed keywords. Each one is then expanded with the full alphabet again:

```
suggestion from Phase 1: "python api"
depth 1: "python api a"  → yields: ["python api async", ...]
depth 1: "python api b"  → yields: ["python api basics", ...]
depth 1: "python api c"  → yields: ["python api cookies", ...]
...
```

#### Visual Flow

```
┌─────────────────────────────────────────────────────────┐
│  USER INPUT                                             │
│  keyword = ["python"]                                   │
│  maxDepth = 2                                           │
└──────────────────────────┬──────────────────────────────┘
                           │
                           ▼
            ┌─────────────────────────────┐
            │  PHASE 1: Alphabet Sweep    │
            │  (depth = 0 → 1)            │
            │                             │
            │  "python" + {a..z, 0..9}    │
            │       ↓                     │
            │  36 queries → ~200+         │
            │  suggestions collected      │
            └────────────────┬────────────┘
                             │
                Suggestions become seeds
                             │
                             ▼
            ┌─────────────────────────────┐
            │  PHASE 2: Recursive Sweep   │
            │  (depth = 1 → 2)            │
            │                             │
            │  "python api" + {a..z, 0..9}│
            │  "python basics" + {a..z..} │
            │  "python blog" + {a..z..}   │
            │       ↓                     │
            │  thousands of queries →     │
            │  10,000+ suggestions        │
            └────────────────┬────────────┘
                             │
                             ▼
            ┌─────────────────────────────┐
            │  OUTPUT: Flat Dataset       │
            │                             │
            │  { seedKeyword, query,      │
            │    depth, suggestion,       │
            │    relevance,               │
            │     suggestionType}         │
            │                             │
            └─────────────────────────────┘
```

Each record in the output carries three key fields:

| Field | Description |
|-------|-------------|
| `seedKeyword` | The original keyword you provided. Links every result back to your starting point. |
| `query` | The exact query sent to Google (e.g., `"python api async"`). |
| `depth` | The expansion level. `1` = direct child of your seed. `2` = grandchild. Higher values mean more granular long-tail variants. |

***

### Input

| Parameter | Type | Description |
|-----------|------|-------------|
| **Seed Keywords** | Array of strings | One or more starting keywords. The Actor will expand each one through the full search tree. |
| **Max Depth** | Integer (1 or 2) | Controls how many levels the Actor follows. Depth 1 collects only direct alphabet expansions. Depth 2 recursively expands the suggestions from Depth 1. |
| **Max Suggestions Limit** | Integer | Hard cap on the total number of suggestions collected. The Actor stops once this limit is reached. Defaults to 100. |
| **Target Country** | String | ISO 3166-1 alpha-2 country code to localize autocomplete results. Defaults to DE (Germany). Changing this affects which country-specific suggestions Google returns. |

***

### Output

Each record represents one autocomplete suggestion discovered during the sweep:

```json
{
  "seedKeyword": "python",
  "query": "python api async",
  "depth": 2,
  "suggestion": "python api async",
  "relevance": 680,
  "suggestionType": "QUERY"
}
```

***

### Pro Tips

The Actor can generate thousands of suggestions per seed keyword. To use it efficiently and avoid wasting runs on irrelevant results, follow this workflow:

**1. Start with `maxDepth = 1`**

Run the Actor with a shallow depth first. This collects only the direct alphabet expansions of your seed keyword — typically 100–200 suggestions. These are the most broadly relevant results.

**2. Review and select**

Examine the suggestions from the Depth 1 run. Identify which ones are worth exploring further — for example, `"python api"` or `"python course"` if you're building a tutorial site.

**3. Seed those back in**

Take the promising suggestions from Step 2 and paste them as the new **Seed Keywords** in a second run. This time set `maxDepth = 2` to expand them into long-tail variants.

**4. Iterate**

Repeat the cycle as needed. Each run narrows the focus and uncovers more specific keyword variants. This iterative approach prevents you from collecting thousands of irrelevant suggestions and keeps compute costs low.

***

### Notes

- **Proxy usage is automatic.** The Actor uses Apify's built-in residential proxy with IP rotation by default, so you don't need to configure anything manually.
- **No login required.** The Actor does not need Google account credentials — it uses the public autocomplete endpoint.
- **Results vary by region.** Google Autocomplete is personalized based on location and search history. Use the **Target Country** parameter to specify which country's autocomplete suggestions you want to collect.

***

# Actor input Schema

## `keyword` (type: `array`):

A list of seed keywords to collect autocomplete suggestions for. The scraper will expand each keyword by appending letters (a-z, 0-9) up to the specified max depth.

## `maxDepth` (type: `integer`):

Maximum depth for keyword expansion. Controls how deeply the scraper will follow autocomplete suggestion branches. Depth 1 queries the seed keyword plus one level of letter expansion; depth 2 goes one level deeper. Higher values generate more suggestions but increase runtime.

## `maxLimit` (type: `integer`):

Maximum total number of autocomplete suggestions to collect across all seed keywords. The scraper will stop once this limit is reached.

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

ISO 3166-1 alpha-2 country code to localize autocomplete results. Defaults to DE (Germany). Changing this affects which country-specific suggestions Google returns.

## Actor input object example

```json
{
  "keyword": [
    "apify"
  ],
  "maxDepth": 2,
  "maxLimit": 100,
  "country": "DE"
}
```

# Actor output Schema

## `default` (type: `string`):

No description

# 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 = {
    "keyword": [
        "apify"
    ],
    "maxDepth": 2,
    "country": "DE"
};

// Run the Actor and wait for it to finish
const run = await client.actor("serj_henrique/google-autocomplete-keyword-research-tool").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 = {
    "keyword": ["apify"],
    "maxDepth": 2,
    "country": "DE",
}

# Run the Actor and wait for it to finish
run = client.actor("serj_henrique/google-autocomplete-keyword-research-tool").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 '{
  "keyword": [
    "apify"
  ],
  "maxDepth": 2,
  "country": "DE"
}' |
apify call serj_henrique/google-autocomplete-keyword-research-tool --silent --output-dataset

```

## MCP server setup

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

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/nU8m0oiYizBPsQ671/builds/jhPFRwEGnxpAN2b0T/openapi.json
