# Google Autocomplete Scraper - Keywords & Scores (`s-r/google-autocomplete`) Actor

Pull Google's own search suggestions for any keyword, in any language and country, with the relevance score Google publishes for each one. Expand a seed by alphabet, question words, prepositions or digits.

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

## Pricing

Pay per event

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/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 Scraper - Keywords & Scores

Pull Google's own search suggestions for any keyword, in any language and
country, and get the **relevance score Google publishes for each one**.

No API key, no browser, no login.

### The scores are the point

Google does not just return a list of completions. It returns a number saying
how strongly each one belongs to what you typed:

| suggestion | relevance |
|---|---|
| best laptops | 1250 |
| best laptops for college students | 1200 |
| best laptop 2026 | 750 |
| best laptop for home use | 601 |

That is Google's own ranking, not a position we counted. Most tools that read
this endpoint throw it away and hand you an ordered list, which looks the same
until you try to compare suggestions from two different seeds: rank 3 of one
seed and rank 3 of another are not comparable, and 750 against 601 is.

Where a score is missing it is **empty**, never filled in from the position. A
number derived from the rank would look exactly like a real score.

### Choose the client deliberately

Google answers three different clients with three different things, and the run
summary reports which you used:

| client | suggestions | scores |
|---|---|---|
| **chrome** | 15 | **yes** |
| firefox | 10 | no |
| psy-ab | 10 | no, but marks the matched part |

`chrome` is the default and the reason to use this Actor. A fourth client,
`toolbar`, is deliberately not offered: it answers **HTTP 200 with an empty
list**, which is the worst kind of option because nothing about it looks wrong.

### Expansion: one seed, hundreds of keywords

A seed on its own returns about fifteen suggestions. That is rarely what anyone
wants, so the seed can be fanned out:

| expansion | what it sends | queries |
|---|---|---|
| None | the seed | 1 |
| **Alphabet** | `laptop a` … `laptop z` | 27 |
| **Question words** | `how laptop`, `what laptop`, … | 13 |
| **Prepositions** | `laptop for`, `laptop vs`, … | 9 |
| **Digits** | `laptop 0` … `laptop 9` | 11 |

`laptop` with the alphabet expansion returned **80 distinct suggestions in nine
seconds**. `web scraping` with question words returned 60.

Each expansion multiplies the number of requests, which is exactly why it is a
visible choice and not a hidden default. Every row records the `query` that
produced it alongside the `seed`, so a fanned-out result can always be traced
back to what asked for it.

### Language and country are separate, and both matter

Suggestions are regional even at a fixed language. **Language** sets what the
suggestions are written in; **Country** sets what Google thinks the market is
*and* where the request comes from.

`laptop` in Dutch from the Netherlands returns `laptop hoes`, `laptop kopen`,
`laptoptas dames`. The same seed in English from the US returns nothing like it.
Both are on every row, so two runs are comparable rather than accidentally
different.

### What you get per suggestion

- `suggestion` and `relevance`
- `seed` and `query` — what you asked for, and what was actually sent
- `rank` within that query
- `language`, `market`, `position`

Duplicates are removed per seed, so an alphabet run does not hand you the same
completion twenty times.

### Run summary

Seeds, queries sent, suggestions returned, how many carried a score, and
`queriesThatReturnedNothing`.

That last one is worth watching. A query returning nothing is a normal thing:
`why web scraping` may simply have no completions. A run where most queries
return nothing means the client or the market is wrong, not that Google is out
of ideas.

### What people use this for

**Keyword research.** The alphabet expansion on a head term is the classic
long-tail sweep, and the scores let you sort the output by something better than
alphabetical.

**Content planning.** Question-word expansion returns the questions people
actually type, which is the raw material for an FAQ or a comparison page.

**Market entry.** The same seed across several language and country pairs shows
what a market asks that yours does not.

**Brand monitoring.** What Google suggests after your brand name is what people
search next, and it changes. Run it on a schedule and keep the rows.

**PPC.** Suggestions with a high relevance score against a head term are the
phrases with real volume behind them, before you pay anyone for volume data.

### Notes

Suggestions are personalised in a browser and not here: what you get is the
unpersonalised set for that language and country, which is the right basis for
research and the reason two people running this get the same answer.

They also change, sometimes daily. A run is a snapshot, which is why nothing is
cached between runs.

This returns suggestions, not search volume. For volume, CPC and difficulty,
that is a different question and a different source.

# Actor input Schema

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

One keyword per line. Each becomes at least one query to Google's suggestion endpoint.

## `expansion` (type: `string`):

How to fan each seed out. None sends the seed alone (~15 suggestions). Alphabet appends a to z (27 queries, hundreds of suggestions). Questions prefixes how/what/why and the rest. Prepositions appends for/with/vs and the rest. Numbers appends 0 to 9. Each expansion multiplies the number of requests, which is why it is a choice rather than a hidden default.

## `max_suggestions` (type: `integer`):

Stop after this many distinct suggestions. Also the cost ceiling for the run.

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

Two-letter interface language, such as en, nl or de. Suggestions are written in it.

## `region` (type: `string`):

Two-letter country code. Sets both what Google thinks the market is and where the request comes from, because suggestions are regional even at a fixed language.

## `client` (type: `string`):

Which Google client to imitate. chrome returns 15 suggestions WITH relevance scores and is the reason to use this Actor. firefox returns 10 without scores. psy-ab returns 10 with the matched part marked up.

## `attempts` (type: `integer`):

How often to retry a query that fails. Twenty rapid calls in testing all succeeded, so retries are rarely needed.

## Actor input object example

```json
{
  "keywords": [
    "web scraping"
  ],
  "expansion": "none",
  "max_suggestions": 500,
  "language": "nl",
  "region": "nl",
  "client": "chrome",
  "attempts": 3
}
```

# Actor output Schema

## `suggestions` (type: `string`):

One row per suggestion.

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

Seeds, queries sent, suggestions returned, and how many carried a relevance score.

## `errors` (type: `string`):

Queries that could not be read.

# 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": [
        "best laptop"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("s-r/google-autocomplete").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": ["best laptop"] }

# Run the Actor and wait for it to finish
run = client.actor("s-r/google-autocomplete").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": [
    "best laptop"
  ]
}' |
apify call s-r/google-autocomplete --silent --output-dataset

```

## MCP server setup

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

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/EFhKspbLwYGfqlIGT/builds/sJKBrkzKl2oUTMVAI/openapi.json
