SEARCH

Google Autocomplete API

Google Autocomplete returns the search suggestions Google shows as someone types a query, as structured JSON. You send a query and get back a list of suggestions, each with its text and, where Google supplies them, a relevance score and a kind. language and country set Google’s hl and gl parameters, so the same prefix can be read for different languages and countries, and client picks between the chrome and firefox suggestion endpoints, the first of which is the richer one. Setting expand to true also queries the seed followed by each letter from a to z and merges the results, which is the standard way to mine long-tail keyword ideas from one seed phrase, and maxSuggestions caps how many come back. It is a pure HTTP call to Google’s public suggestion endpoints — no browser, no CAPTCHA to solve, no Google API key or Cloud account — which makes it a light option for keyword research, content planning and query-expansion pipelines. The response includes the original query, the suggestions, a count, a fetchedAt timestamp and the elapsed time. If the seed request to Google fails, the operation raises an UPSTREAM_ERROR; during expansion a single failing letter is tolerated and the remaining results still return. The exact price and cache lifetime are on this page’s FAQ, generated from the same catalog the calls run against.

Last updated

What data you get

Google Autocomplete

count
integerrequired
query
stringrequired
message
stringrequired
success
booleanrequired
elapsedMs
integerrequired
fetchedAt
stringrequired
suggestions
arrayrequired
suggestions[].kind
string
suggestions[].text
stringrequired
suggestions[].relevance
integer

Calling Google Autocomplete

A schema-derived request and response shape — not a captured production call, since upAPI has none to publish. Every field is real, from the operation’s own published schema.

bash
curl -X POST https://api.upapi.io/google-autocomplete.post \
  -H "X-Api-Key: $UPAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "typescript",
  "client": "chrome",
  "expand": false,
  "country": "us",
  "language": "en",
  "maxSuggestions": 50
}'
json — example response shape
{
  "count": 3,
  "query": "typescript",
  "message": "example",
  "success": false,
  "elapsedMs": 1,
  "fetchedAt": "example",
  "suggestions": [
    {
      "kind": "example",
      "text": "Hello, world",
      "relevance": 1
    }
  ]
}

Worked example: expand one seed across a to z

Send a seed phrase with expand set to true. The operation asks Google for the seed, then for the seed followed by a space and each letter from a to z, and merges the answers in that order, dropping any suggestion it has already seen (compared without regard to case). Before it asks for each letter it checks whether maxSuggestions has been reached and stops if so, and the merged list is then cut to maxSuggestions, so a letter that pushes the total past the cap contributes only part of its results. The default is 50, so a busy seed only gets through the first few letters at the default; set maxSuggestions higher, up to 200, to cover the whole alphabet.

The sample is a real response: the request below was run against the live operation on 2026-10-07 and returned 111 distinct suggestions in 2,896 ms, covering all 26 letters. The suggestions array is trimmed to four of the 111, and every other field is exactly as returned. Google’s suggestions change over time, so read the sample as the shape of a response, not a fixed result.

json — request body
{
  "query": "web scraping api",
  "expand": true,
  "maxSuggestions": 200
}
json — live response, captured 2026-10-07, suggestions trimmed to four
{
  "success": true,
  "query": "web scraping api",
  "suggestions": [
    { "text": "web scraping api python", "relevance": 601, "kind": "QUERY" },
    { "text": "web scraping api free", "relevance": 600, "kind": "QUERY" },
    { "text": "web scraping and api", "relevance": 562, "kind": "QUERY" },
    { "text": "web scraping zillow", "relevance": 553, "kind": "QUERY" }
  ],
  "count": 111,
  "message": "Found 111 suggestions",
  "fetchedAt": "2026-10-07T17:59:20Z",
  "elapsedMs": 2896
}

Language, country and the other parameters

language and country are how one prefix is read for another market: they are sent to Google as hl and gl, and language is also sent as the Accept-Language header. These are all of the operation’s inputs.

Google Autocomplete input parameters
ParameterDefaultWhat it does
queryrequiredThe seed phrase to autocomplete, at least one character.
languageenSent as hl: the language of the suggestions, for example en, fr or es.
countryusSent as gl: the country Google localises suggestions for, for example us, ca or gb.
clientchromechrome returns a relevance score and a kind with each suggestion; firefox returns the text only.
expandfalseAlso queries the seed followed by each letter from a to z.
maxSuggestions50Caps the merged list, from 1 up to 200.
proxyUrlnoneOptional proxy URL to route the requests through.

Pricing

Every unit draws from one pooled monthly quota shared across the whole catalog. What a unit costs on each plan is on the pricing page, linked below.

Questions people actually ask

How do I get Google autocomplete suggestions as JSON?

Send the seed query to Google Autocomplete. The suggestions field of the response is a list of entries with the suggestion text and, from the chrome client, a relevance score and a kind, and count tells you how many came back.

How do I get long-tail keyword suggestions from one seed phrase?

Set expand to true. The operation also queries the seed followed by each letter a to z and merges every result, and maxSuggestions limits the total. A letter whose request fails is skipped without failing the whole call.

Can I get suggestions for a different country or language?

Yes. language sets Google’s hl parameter (en, fr, es and so on) and country sets gl (us, ca, gb and so on), so you can read what searchers in another market are shown.

Is this the Google Places Autocomplete API?

No. It reads the public suggestion endpoints behind Google’s own search box — google.com/complete/search and suggestqueries.google.com — and returns search-query suggestions. It does not wrap Google’s paid Places Autocomplete and needs no Google Cloud account.

Is Google’s suggest endpoint free, and is it rate-limited?

It needs no Google API key and no Google account, but calls to the operation through upAPI are priced per your plan; the cost answer on this page gives the exact figure. Google’s suggest endpoint is an undocumented public endpoint, so no request quota is published for it and none is stated here. A failing seed request raises UPSTREAM_ERROR instead of returning an empty list, and proxyUrl routes the requests through an exit of your own when you read at volume.

What is the difference between the chrome and firefox client?

chrome, the default, reads google.com/complete/search and returns each suggestion with a relevance score and a kind. firefox reads suggestqueries.google.com and returns only the suggestion text. Any other value of client is treated as chrome.

How much does this cost?

Every operation in this cluster costs 1 weighted unit per call, drawn from your plan’s pooled monthly quota — see upapi.io/pricing for what a unit costs on each tier.

How fresh is the data — is it cached?

every cached operation here returns a response held for 5 minutes. A repeat call inside a cached window returns the cached response and is billed nothing.

Related

Start with the free plan

One key and one pooled monthly quota cover Google Autocomplete and every other API in the catalog. See what a unit costs on each plan, or run the operation first.