Google Autocomplete Scraper: how to get Keyword Suggestions as JSON/CSV (API, Python, no code)
Google Autocomplete scraper for search suggestions of any keyword list, with position and relevance score. This guide shows the output fields, a working input, and
Python, JavaScript and cURL code for the Actor v0iddo/google-autocomplete-scraper on Apify.
Open Google Autocomplete Scraper on Apify
What data you get
One row per result. Every row can be downloaded as JSON, CSV, Excel or HTML, or read through the API.
| Field | Label | Type | Example |
|---|---|---|---|
seed | Seed keyword | text | running shoes |
query | Query sent | text | running shoes |
suggestion | Suggestion | text | running shoes for men |
position | Position | number | 1 |
relevance | Relevance | number | 603 |
type | Type | text | QUERY |
language | Language | text | en |
country | Country | text | us |
Input example
This is the input that is pre-filled on the Actor page. Change the values for your own run.
{
"keywords": [
"running shoes"
],
"expand": "alphabet",
"maxItems": 20
}
| Input field | Type | What it does |
|---|---|---|
keywords | array | Seed keywords or phrases. |
language | string | Interface language code such as en, de, es, pt-BR. |
country | string | Two-letter country code such as us, gb, de. |
expand | string | Each expansion sends one extra request per variant. |
dedupe | boolean | Keep each suggestion once per seed keyword, even when several variants return it. |
maxItems | integer | The run stops after this many result rows. |
Output sample
Real rows from a run of the Actor. Fields that name people are left out of the sample.
[
{
"seed": "running shoes",
"query": "running shoes",
"suggestion": "running shoes for men",
"position": 1,
"relevance": 603,
"type": "QUERY",
"language": "en",
"country": "us"
},
{
"seed": "running shoes",
"query": "running shoes",
"suggestion": "running shoes for women",
"position": 2,
"relevance": 602,
"type": "QUERY",
"language": "en",
"country": "us"
}
]
Code: Python, JavaScript and cURL
Get your API token in Apify Console under Settings, then Integrations. The Actor id is v0iddo/google-autocomplete-scraper.
Python (apify-client)
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run_input = {'keywords': ['running shoes'], 'expand': 'alphabet', 'maxItems': 20}
run = client.actor("v0iddo/google-autocomplete-scraper").call(run_input=run_input)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item)
JavaScript (apify-client)
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const input = {
"keywords": [
"running shoes"
],
"expand": "alphabet",
"maxItems": 20
};
const run = await client.actor('v0iddo/google-autocomplete-scraper').call(input);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
cURL
curl -X POST "https://api.apify.com/v2/acts/v0iddo~google-autocomplete-scraper/run-sync-get-dataset-items" \
-H "Authorization: Bearer YOUR_APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"keywords": ["running shoes"], "expand": "alphabet", "maxItems": 20}'
Price
$0.77 per 1,000 results. You pay per result row. There is no separate charge per run. Higher Apify plans pay less per result, down to $0.539 per 1,000. See the pricing tab for your plan. A new Apify account gets $5 of platform credit every month.
Good to know
- Google shows about 5 to 15 suggestions per query. Expansion with letters sends 27 requests per keyword (the keyword itself plus a-z), with digits 37, with question words 12.
- Suggestions depend on language and country. The same keyword gives different ideas for en/us and de/de.
- Relevance is the score Google attaches to a suggestion (higher means more prominent). It can be empty for some queries.
- Entries of type NAVIGATION are website suggestions; their description holds the page title.
FAQ
What data does the Google Autocomplete Scraper return?
Each result is one row in an Apify dataset. Fields include seed, query, suggestion, position, relevance, type, language, country. The table above shows every field with an example value.
How do I use the Google Autocomplete Scraper from Python?
Install the apify-client package, create a client with your Apify API token, call the Actor v0iddo/google-autocomplete-scraper with an input like the one above, and read the rows from the run's dataset. The Python snippet above does exactly that.
Can I use it without writing code?
Yes. Open the Actor page on Apify, fill in the input form (an example is already filled in), press Start, and download the results as JSON, CSV, Excel or HTML. You can also schedule runs there.
How much does it cost?
$0.77 per 1,000 results. You pay per result row. There is no separate charge per run. Higher Apify plans pay less per result, down to $0.539 per 1,000. A new Apify account gets $5 of platform credit every month.
How do I limit the number of results?
Set the maxItems input field to the number of results you need; the run stops there, so it also caps the cost of one run. You can also set a maximum cost for a run in the run options on Apify, and the run stops when it is reached.
Can I send the results to Google Sheets, Make, Zapier or n8n?
Yes. Apify datasets connect to Google Sheets, Slack, Make, Zapier and n8n, and a webhook can call your own service when a run finishes. You can also export the dataset as JSON, CSV or Excel.
Open Google Autocomplete Scraper on Apify
Related guides
- Similarweb Scraper: Scrape Similarweb top websites rankings by category: global rank, domain, category, rank change, average vi...
- SEO audit tool: Audit the on-page SEO of any public web pages: title, meta description, headings, canonical, indexability,...
- DuckDuckGo Search Scraper: DuckDuckGo scraper for web search results as structured rows: title, URL, snippet, position, and query.