# Google & YouTube Autocomplete Keyword Miner (`fayacuts/autocomplete-keyword-miner`) Actor

Expands seed topics into the real searches people type on Google and YouTube, with question detection, relevance scores and any language/country. Built for content and SEO planning.

- **URL**: https://apify.com/fayacuts/autocomplete-keyword-miner.md
- **Developed by:** [Ricardo Faya](https://apify.com/fayacuts) (community)
- **Categories:** SEO tools, Marketing
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## 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 & YouTube Autocomplete Keyword Miner

Turn a handful of seed topics into **the searches people actually type** on Google and YouTube — in any language and country — with question detection built in.

### Why this exists

We ran a content site with hundreds of pages and almost no non-brand search traffic. Search Console had nothing to teach: you can't learn demand from a site nobody finds yet. The autocomplete of Google and YouTube can — it's public, free, and ordered by what people type. One run of this approach produced **8,276 real searches and 732 page ideas** for us.

### What you get

For every seed, the Actor queries:

- the seed itself,
- **question words** in front of it (`como`, `o que é`, `vale a pena`… / `how to`, `what is`… / `cómo`, `qué es`…),
- **a–z** after it, for the long tail,

on **Google Search** and/or **YouTube**, and returns one deduplicated row per keyword:

```json
{
  "keyword": "como usar inteligência artificial no trabalho",
  "source": "youtube",
  "seed": "inteligência artificial",
  "query": "como inteligência artificial",
  "expansion": "question: como",
  "position": 2,
  "relevance": null,
  "isQuestion": true,
  "wordCount": 6,
  "language": "pt-BR",
  "country": "BR"
}
```

- `relevance` is Google's own suggestion weight (Google source only). It is an **order**, not a monthly search volume — use it to compare keywords, not to promise traffic.
- Turn on **Only return questions** to get a list of ready-made video and article titles.

### Tips

- **YouTube-only questions** are gold for video creators: filter `source = youtube` and `isQuestion = true`.
- For more than a few hundred queries, **enable Apify Proxy**. Google blocks datacenter IPs quietly (HTTP 403 with an empty body).
- The run protects itself: after 12 blocked queries in a row it **stops and keeps everything collected so far**, instead of spending hours retrying. A blocked query is never recorded as "no suggestions".

### Output

- **Dataset**: one row per unique keyword per source.
- **Key-value store `OUTPUT`**: run summary (queries run, keywords, questions, blocked responses, whether it stopped early).

### Limits

Autocomplete shows what is typed, not how often. Pair it with a volume tool if you need absolute numbers.

# Actor input Schema

## `seeds` (type: `array`):

Topics to expand. Each seed is combined with question words and with a–z to surface what people actually type.

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

Where to collect suggestions from.

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

Interface language, e.g. pt-BR, en, es. Also picks the question words (pt, en or es).

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

Two-letter country code, e.g. BR, US, PT, MX.

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

Adds "como / o que é / vale a pena…" (or the English/Spanish equivalents) in front of each seed.

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

Adds each letter after the seed to reach the long tail.

## `onlyQuestions` (type: `boolean`):

Keep only suggestions phrased as questions — ready-made content titles.

## `maxRequests` (type: `integer`):

Upper bound on queries sent (seed × expansions × sources).

## `delayMillis` (type: `integer`):

Polite pacing. Lower values get blocked sooner.

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

Recommended for large runs: Google blocks datacenter IPs quietly after a few hundred queries.

## Actor input object example

```json
{
  "seeds": [
    "inteligência artificial"
  ],
  "sources": [
    "google",
    "youtube"
  ],
  "language": "pt-BR",
  "country": "BR",
  "expandQuestions": true,
  "expandAlphabet": true,
  "onlyQuestions": false,
  "maxRequests": 400,
  "delayMillis": 700,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Every unique keyword per source, with seed, expansion, position and relevance.

## `summary` (type: `string`):

Totals for the whole run (key-value store record OUTPUT).

# 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 = {
    "seeds": [
        "inteligência artificial"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("fayacuts/autocomplete-keyword-miner").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 = {
    "seeds": ["inteligência artificial"],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("fayacuts/autocomplete-keyword-miner").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 '{
  "seeds": [
    "inteligência artificial"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call fayacuts/autocomplete-keyword-miner --silent --output-dataset

```

## MCP server setup

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

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/QmWFQhkLmjbY2MDoM/builds/16uXj4Iy99OJhQC4r/openapi.json
