# Long Tail Keyword Generator - Real Autocomplete Data (`gganbukim/long-tail-keyword-scraper`) Actor

Turn one seed keyword into hundreds of long-tail keywords and questions, pulled live from Google, YouTube and Amazon autocomplete. Alphabet-soup, question, comparison and commercial-intent modes. Nothing is AI-generated - every keyword came from a suggestion index. An AnswerThePublic alternative.

- **URL**: https://apify.com/gganbukim/long-tail-keyword-scraper.md
- **Developed by:** [DONGMIN KIM](https://apify.com/gganbukim) (community)
- **Categories:** SEO tools, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 keyword delivereds

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/platform/actors/running/actors-in-store#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

## Long Tail Keyword Generator — Google, YouTube & Amazon Autocomplete Research

Give it one seed phrase, get back **hundreds of real long-tail keywords and questions** — pulled live from the same autocomplete indexes Google, YouTube and Amazon use in their own search boxes.

A live run on `protein powder` returned **1,084 unique keywords in 2.1 seconds**: 315 of them questions, 836 of them four words or longer.

Nothing here is invented or LLM-generated. Every keyword is something a search engine volunteered because people actually type it.

### How it works

Autocomplete only answers exactly what you ask, so this asks many slightly different things:

- **Alphabet soup** — appends `a` through `z`, so Google reveals its top completion for each letter
- **Questions** — prefixes `how`, `what`, `why`, `when`, `where`, `who`, `can`, `does`, `is`…
- **Comparisons** — appends `vs`, `versus`, `alternative`, `better than`…
- **Prepositions** — `for`, `with`, `without`, `near`, `under`…
- **Commercial / intent** — `best`, `cheap`, `buy`, `price`, `review`, `near me`…

Results are de-duplicated across every query and source. Keywords that surfaced from **several** queries are ranked first, because that repetition is itself a relevance signal.

### Why not just pay for a keyword tool

AnswerThePublic and KeywordTool.io sell this for **$89–$99 per month**. This is the same mechanism, priced per keyword, with no subscription and an API you can call from a script or a schedule.

### Input

```jsonc
{
  "keywords": ["protein powder", "home espresso"],
  "sources": ["google", "youtube", "amazon"],
  "modifierGroups": ["bare", "questions", "comparisons", "prepositions", "alphabet"],
  "language": "en",
  "country": "us",
  "questionsOnly": false,
  "minWordCount": 4
}
```

**Sources**: Google for general intent, YouTube for video topics, Amazon for buying intent. Using more than one also tells you which keywords appear on several platforms.

**Localisation**: `language` and `country` matter a lot — autocomplete is heavily localised. `ko`/`kr`, `de`/`de`, `es`/`mx` all return genuinely different keyword sets.

### Output

```json
{
  "keyword": "protein powder vs creatine",
  "seed": "protein powder",
  "sources": ["google", "youtube"],
  "modifierGroups": ["comparisons", "alphabet"],
  "seenCount": 6,
  "relevance": 601,
  "wordCount": 4,
  "characterCount": 26,
  "isQuestion": false,
  "isLongTail": true
}
```

- `seenCount` — how many separate queries surfaced this keyword. The best single ranking signal here.
- `relevance` — Google's own suggestion relevance score, when it volunteers one.
- `isQuestion` / `isLongTail` — ready-made filters for content planning.

### Common uses

- **Content planning** — `questionsOnly: true` gives you a blog or FAQ outline in one run.
- **SEO keyword discovery** — find the long-tail terms with real demand that competitors have not written for.
- **YouTube titles and tags** — use the `youtube` source; its index reflects video search, not web search.
- **Amazon product research** — the `amazon` source is pure buying intent.
- **PPC negative keywords** — everything irrelevant that still autocompletes is a negative to add.
- **Localised research** — run the same seed across countries and compare.

### Pricing

Pay per keyword delivered. Keywords removed by your filters, and failed queries, **cost nothing**.

Starting a run costs $0.00004 — the platform's $0.00001 minimum, charged once per GB of memory, and these Actors run on 4 GB. That is four cents per thousand runs, and it is the only charge not tied to a row you received.

### FAQ

**Does this give search volume?** No. It gives real keywords plus corroboration and Google's relevance ordering. Volume needs a paid data provider; this is the discovery half, and it is the half that gets you the long tail.

**Are the keywords real?** Yes — they come from live autocomplete indexes, not a language model.

**Does it need an API key?** No.

**Can I run it on a schedule?** Yes, via Apify Schedules, webhooks, or the API. Also available over MCP for AI agents.

# Actor input Schema

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

One or more starting phrases. Each seed is expanded into hundreds of real long-tail variations.

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

Google for general search intent, YouTube for video topics, Amazon for buying intent. Using more than one also reveals which keywords appear on several platforms, which is a strong relevance signal.

## `modifierGroups` (type: `array`):

How the seed gets varied before asking autocomplete. Alphabet appends a-z (the classic trick that surfaces the top completion for each letter). Questions prefixes how/what/why/… Comparisons appends vs/alternative/…

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

ISO-639-1 code, e.g. en, es, ko, de.

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

ISO-3166 code, e.g. us, gb, kr. Autocomplete results are heavily localised.

## `maxKeywordsPerSeed` (type: `integer`):

Cap on delivered rows per seed. This is the main cost control.

## `questionsOnly` (type: `boolean`):

Keep only keywords phrased as questions — the fastest way to a content or FAQ plan. Filtered rows are not billed.

## `minWordCount` (type: `integer`):

Drop short head terms. Set to 4 for true long-tail only.

## `mustContain` (type: `array`):

Keep only keywords containing at least one of these substrings. Case-insensitive.

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

Parallel autocomplete queries.

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

Leave the default. Autocomplete endpoints are generous but do rate-limit per IP on big alphabet-soup runs; the actor starts on cheap datacenter proxies and only escalates if actually blocked.

## Actor input object example

```json
{
  "keywords": [
    "protein powder"
  ],
  "sources": [
    "google"
  ],
  "modifierGroups": [
    "bare",
    "questions",
    "comparisons",
    "prepositions",
    "alphabet"
  ],
  "language": "en",
  "country": "us",
  "maxKeywordsPerSeed": 1000,
  "questionsOnly": false,
  "minWordCount": 0,
  "concurrency": 8,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

One row per unique keyword, with the sources that suggested it and the modifier group it came from.

## `runSummary` (type: `string`):

Counts for this run: rows delivered, rows filtered, items that failed, the proxy tier used, and whether the run stopped at its charge limit.

# 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": [
        "protein powder"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("gganbukim/long-tail-keyword-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": ["protein powder"] }

# Run the Actor and wait for it to finish
run = client.actor("gganbukim/long-tail-keyword-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": [
    "protein powder"
  ]
}' |
apify call gganbukim/long-tail-keyword-scraper --silent --output-dataset

```

## MCP server setup

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