Google Autocomplete API
Get Google autocomplete suggestions for any query as structured JSON: the suggestions Google shows as you type. Resolve partial searches and surface place suggestions to feed into a Maps or Places lookup. Fast query and keyword expansion for SEO and AI agents. Pay per suggestion, MCP-ready.
MEDIAN LAGon demand
PARAMETERS3
TOTAL USERS5
MONTHLY ACTIVE3
TOTAL RUNS30
RUNS SUCCEEDED100.0%
RATING5.0 (1)
Input parameters
| PARAMETER | TYPE | REQ | DEFAULT | DESCRIPTION |
|---|---|---|---|---|
| queries | string[] | yes | — | Provide one or more partial queries to autocomplete, for example 'coffee near' or 'best pizza in'. Each query is completed independently and billed per suggestion returned. |
| gl | string | no | us | Set the two-letter country code for localization, for example 'us', 'gb', 'de'. Defaults to 'us'. |
| hl | string | no | en | Set the two-letter interface language code, for example 'en', 'es', 'de'. Defaults to 'en'. |
Worked examples
{
"queries": [
"coffee near"
]
}
Tasks
Saved runs with the inputs already filled in — each one a standalone page and a working configuration example.
Code
curl
curl -X POST "https://api.apify.com/v2/acts/johnvc~google-autocomplete-api/run-sync-get-dataset-items" \
-H "Authorization: Bearer $APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"queries": ["coffee near"]}'
Python
from apify_client import ApifyClient
client = ApifyClient("APIFY_TOKEN")
run = client.actor("johnvc/google-autocomplete-api").call(
run_input={'queries': ['coffee near']}
)
for item in client.dataset(run.default_dataset_id).iterate_items():
print(item)