# Keyword Autocomplete Scraper: Google, YouTube & Amazon SEO (`salmon_chaparral/keyword-autocomplete-scraper`) Actor

Keyword autocomplete scraper (Google Suggest) for SEO keyword research across Google, YouTube, Bing, Amazon & DuckDuckGo in any country/language — no API key or browser. Deduplicated long-tail, A-Z & question keywords with intent tags. Export JSON/CSV. $0 start, $0.50/1K.

- **URL**: https://apify.com/salmon_chaparral/keyword-autocomplete-scraper.md
- **Developed by:** [Max Lee](https://apify.com/salmon_chaparral) (community)
- **Categories:** SEO tools, Marketing, E-commerce
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.30 / 1,000 keyword suggestions extracted

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/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

## Keyword Autocomplete Scraper: Google, YouTube, Bing & Amazon

Extract real-time SEO keyword ideas, long-tail modifiers, and buyer questions from **Google, YouTube, Bing, Amazon, and DuckDuckGo** autocomplete over pure HTTP at 256 MB RAM — no headless browser, no API keys, and zero start fee.

- **Pricing:** **$0 start fee** + **$0.0005 per keyword suggestion** ($0.50 per 1,000 deduplicated suggestions). Failed or empty engine requests are never charged.
- **1-Click Zero-Config:** Run immediately with default input (`["ai agent", "web scraping"]`) across all 5 engines to get deduplicated multi-engine keyword ideas in under 5 seconds.
- **Multi-Engine Consensus & Intent Tagging:** Deduplicates identical suggestions across engines into one flat row with `engines`, `engineCount`, best `rank`, Google/YouTube `relevanceScore`, `isQuestion`, `intent` (`informational`, `commercial`, `comparison`, `transactional`, `general`), and `wordCount`.
- **Multi-Geo + Optional Deep Expansion:** Localize via `hl` (language) and `gl` (country + regional Amazon marketplace routing), and toggle optional **question/comparison expansion** (`how`, `what`, `why`, `best`, `vs`) and **A-Z wildcard expansion** (`seed a` .. `seed z`).

***

### Input Example

```json
{
  "seedKeywords": [
    "ai agent",
    "web scraping"
  ],
  "engines": [
    "google",
    "youtube",
    "bing",
    "amazon",
    "duckduckgo"
  ],
  "hl": "en",
  "gl": "us",
  "expandQuestions": false,
  "questionPrefixes": [
    "how",
    "what",
    "why",
    "best",
    "vs"
  ],
  "expandAlphabet": false,
  "alphabetPosition": "suffix",
  "deduplicateMode": "cross-engine",
  "excludeExactSeed": true,
  "maxSuggestionsPerSeed": 200,
  "maxTotalSuggestions": 500
}
```

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `seedKeywords` | `string[]` | `["ai agent", "web scraping"]` | Seed keywords or topics to expand via search autocomplete. |
| `engines` | `string[]` | `["google", "youtube", "bing", "amazon", "duckduckgo"]` | Public autocomplete endpoints to query concurrently. |
| `hl` | `string` | `"en"` | Two-letter ISO language code (`en`, `de`, `es`, `fr`, `ja`, `pt`). |
| `gl` | `string` | `"us"` | Two-letter ISO country code (`us`, `gb`, `de`, `ca`, `au`, `fr`, `jp`); routes Amazon to its regional marketplace. |
| `expandQuestions` | `boolean` | `false` | Expand each seed with `questionPrefixes` (`how <seed>`, `<seed> vs`, etc.). |
| `questionPrefixes` | `string[]` | `["how", "what", "why", "best", "vs"]` | Question and comparison modifiers applied when `expandQuestions` is enabled. |
| `expandAlphabet` | `boolean` | `false` | Expand each seed with letters `a` through `z` for deep long-tail coverage. |
| `alphabetPosition` | `string` | `"suffix"` | Wildcard placement when `expandAlphabet` is enabled: `"suffix"`, `"prefix"`, or `"both"`. |
| `deduplicateMode` | `string` | `"cross-engine"` | Merge identical keywords across engines (`"cross-engine"`) or keep one row per engine (`"per-engine"`). |
| `excludeExactSeed` | `boolean` | `true` | Skip exact echoes of the seed keyword so only expanded suggestions are emitted. |
| `maxSuggestionsPerSeed` | `integer` | `200` | Maximum deduplicated suggestions kept per seed keyword (1–5000). |
| `maxTotalSuggestions` | `integer` | `500` | Maximum total suggestions pushed and billed per run (1–20000). |
| `concurrency` | `integer` | `8` | Parallel HTTP workers across engines and expanded queries (1–20). |
| `requestTimeoutMs` | `integer` | `8000` | Per-request timeout in milliseconds (2000–30000). |

***

### Output Example (Dataset Item)

```json
{
  "keyword": "ai agents explained",
  "seedKeyword": "ai agent",
  "queryUsed": "ai agent",
  "expansionType": "seed",
  "modifier": null,
  "engine": "google",
  "engines": [
    "google",
    "youtube",
    "bing"
  ],
  "engineCount": 3,
  "rank": 2,
  "relevanceScore": 601,
  "isQuestion": false,
  "intent": "informational",
  "wordCount": 3,
  "charLength": 19,
  "hl": "en",
  "gl": "us",
  "scrapedAt": "2026-12-06T02:10:00.000Z"
}
```

A structured per-engine rollup (`seedsProcessed`, `queriesExecuted`, `engineStats`, `rawSuggestions`, `uniqueSuggestions`, `suggestionsPushed`, `chargedEvents`, `failedRequests`, `durationMs`) is saved to the default Key-Value Store under `OUTPUT`.

***

### How It Works

1. Builds a deduplicated query matrix from `seedKeywords`, optional `questionPrefixes` (`how/what/why/best/vs`), and optional `a`–`z` wildcards.
2. Queries selected public autocomplete endpoints concurrently over pure HTTP with strict response-size caps, charset-aware decoding (UTF-8 / ISO-8859-1), and per-engine fallback endpoints:
   - **Google Suggest:** `suggestqueries.google.com/complete/search?client=chrome` (falls back to `client=firefox`).
   - **YouTube Suggest:** `suggestqueries.google.com/complete/search?client=chrome&ds=yt` (falls back to `client=firefox&ds=yt`).
   - **Bing Suggest:** `www.bing.com/osjson.aspx` (falls back to `api.bing.com/qsonhs.aspx`).
   - **Amazon Suggest:** Regional `completion.amazon.<tld>/api/2017/suggestions` mapped from `gl` (falls back to US marketplace).
   - **DuckDuckGo Suggest:** `duckduckgo.com/ac/?type=list` (falls back to JSON phrase endpoint).
3. Deduplicates suggestions (`cross-engine` or `per-engine`), scores cross-engine consensus (`engineCount`), tags questions and search intent, and pushes clean flat records to the Dataset.
4. Bills `$0.0005` per pushed `keyword-suggestion` event only — failed, timed-out, or empty engine responses are logged in `OUTPUT` and never charged.

# Changelog

This Actor's version history is a separate document: https://apify.com/salmon_chaparral/keyword-autocomplete-scraper/changelog.md

# Actor input Schema

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

List of seed keywords or topics to expand via autocomplete (e.g. 'ai agent', 'web scraping').

## `engines` (type: `array`):

Public autocomplete sources to query in parallel. Each engine falls back cleanly on errors without charging failed requests.

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

Two-letter ISO language code for autocomplete localization (e.g. en, de, es, fr, ja, pt).

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

Two-letter ISO country code for geo-targeted suggestions and Amazon regional marketplace routing (e.g. us, gb, de, ca, au, fr, jp).

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

Query each seed with question/comparison prefixes (e.g. 'how <seed>', 'what <seed>', 'why <seed>', 'best <seed>', '<seed> vs').

## `questionPrefixes` (type: `array`):

Modifiers used when expandQuestions is enabled. Comparison terms like 'vs' or 'versus' append after the seed automatically.

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

Expand each seed keyword with letters a through z (e.g. '<seed> a' .. '<seed> z') to uncover hundreds of long-tail keywords.

## `alphabetPosition` (type: `string`):

Where to place the a-z wildcard letter relative to each seed keyword when expandAlphabet is enabled.

## `deduplicateMode` (type: `string`):

Choose whether to merge identical suggestions across engines into one enriched record with engineCount (cross-engine) or emit one row per engine (per-engine).

## `excludeExactSeed` (type: `boolean`):

Skip suggestions that exactly match the input seed keyword (case-insensitive) so only expanded keyword ideas are returned.

## `maxSuggestionsPerSeed` (type: `integer`):

Maximum number of deduplicated suggestions kept per seed keyword (1–5000).

## `maxTotalSuggestions` (type: `integer`):

Hard ceiling on total deduplicated keyword suggestions pushed and billed per run (1–20000).

## `concurrency` (type: `integer`):

Number of parallel pure-HTTP autocomplete requests (1–20).

## `requestTimeoutMs` (type: `integer`):

HTTP timeout in milliseconds for each engine request (2000–30000).

## Actor input object example

```json
{
  "seedKeywords": [
    "ai agent",
    "web scraping"
  ],
  "engines": [
    "google",
    "youtube",
    "bing",
    "amazon",
    "duckduckgo"
  ],
  "hl": "en",
  "gl": "us",
  "expandQuestions": false,
  "questionPrefixes": [
    "how",
    "what",
    "why",
    "best",
    "vs"
  ],
  "expandAlphabet": false,
  "alphabetPosition": "suffix",
  "deduplicateMode": "cross-engine",
  "excludeExactSeed": true,
  "maxSuggestionsPerSeed": 200,
  "maxTotalSuggestions": 500,
  "concurrency": 8,
  "requestTimeoutMs": 8000
}
```

# Actor output Schema

## `items` (type: `string`):

No description

## `summary` (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 = {
    "seedKeywords": [
        "ai agent",
        "web scraping"
    ],
    "engines": [
        "google",
        "youtube",
        "bing",
        "amazon",
        "duckduckgo"
    ],
    "hl": "en",
    "gl": "us",
    "expandQuestions": false,
    "questionPrefixes": [
        "how",
        "what",
        "why",
        "best",
        "vs"
    ],
    "expandAlphabet": false,
    "alphabetPosition": "suffix",
    "deduplicateMode": "cross-engine",
    "excludeExactSeed": true,
    "maxSuggestionsPerSeed": 200,
    "maxTotalSuggestions": 500,
    "concurrency": 8,
    "requestTimeoutMs": 8000
};

// Run the Actor and wait for it to finish
const run = await client.actor("salmon_chaparral/keyword-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 = {
    "seedKeywords": [
        "ai agent",
        "web scraping",
    ],
    "engines": [
        "google",
        "youtube",
        "bing",
        "amazon",
        "duckduckgo",
    ],
    "hl": "en",
    "gl": "us",
    "expandQuestions": False,
    "questionPrefixes": [
        "how",
        "what",
        "why",
        "best",
        "vs",
    ],
    "expandAlphabet": False,
    "alphabetPosition": "suffix",
    "deduplicateMode": "cross-engine",
    "excludeExactSeed": True,
    "maxSuggestionsPerSeed": 200,
    "maxTotalSuggestions": 500,
    "concurrency": 8,
    "requestTimeoutMs": 8000,
}

# Run the Actor and wait for it to finish
run = client.actor("salmon_chaparral/keyword-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 '{
  "seedKeywords": [
    "ai agent",
    "web scraping"
  ],
  "engines": [
    "google",
    "youtube",
    "bing",
    "amazon",
    "duckduckgo"
  ],
  "hl": "en",
  "gl": "us",
  "expandQuestions": false,
  "questionPrefixes": [
    "how",
    "what",
    "why",
    "best",
    "vs"
  ],
  "expandAlphabet": false,
  "alphabetPosition": "suffix",
  "deduplicateMode": "cross-engine",
  "excludeExactSeed": true,
  "maxSuggestionsPerSeed": 200,
  "maxTotalSuggestions": 500,
  "concurrency": 8,
  "requestTimeoutMs": 8000
}' |
apify call salmon_chaparral/keyword-autocomplete-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,salmon_chaparral/keyword-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/NINMXuG3irrGyiGyq/builds/eJDSw09mMzdLVo2zO/openapi.json
