Google Autocomplete API
Google's search-box suggestions for text as typed, as JSON: 15 suggestions with Google's relevance score, or the box's own 10 with the people, places and things Google knows. For keyword research, query ideas and search boxes of your own.
What people type next
Send the text as typed, spaces kept: how to asks what follows. client=chrome gives 15 suggestions with relevance; client=gws-wiz gives the box's 10, with things Google knows.
curl -G https://api.serpbit.com/v1/autocomplete \ -H "Authorization: Bearer $SERPBIT_API_KEY" \ --data-urlencode "q=golden ret" \ --data-urlencode "client=gws-wiz" { "suggestions": [ { "position": 1, "value": "golden retriever", "type": "ENTITY", "title": "Golden Retriever", "description": "Dog breed" }, { "position": 2, "value": "golden retriever puppies", "type": "QUERY" } ] }
What comes back
The suggestions
Each one's position and text, as the search box would show them.
Query or thing
typetells a plain query from a person, place or thing Google knows.Google's score
relevancefor each suggestion, withclient=chrome.What Google knows
A known thing's title, description and thumbnail, with
client=gws-wiz.Any country and language
glandhl, andcpfor where the cursor is in the text.
The same call in Python and JavaScript
Three prefixes, three calls: every suggestion once, with its best relevance. The clients read the key from SERPBIT_API_KEY and retry a failed call without billing it twice. Any HTTP client works too.
# pip install serpbit from serpbit import Serpbit sb = Serpbit() # reads SERPBIT_API_KEY seen = {} for prefix in ["how to ", "how to a", "how to b"]: answer = sb.autocomplete(prefix, gl="us", hl="en") for s in answer["suggestions"]: seen[s["value"]] = max(seen.get(s["value"], 0), s.get("relevance", 0)) for value, score in sorted(seen.items(), key=lambda kv: -kv[1]): print(score, value)
// npm install serpbit import Serpbit from "serpbit"; const sb = new Serpbit(); // reads SERPBIT_API_KEY const seen = new Map(); for (const prefix of ["how to ", "how to a", "how to b"]) { const answer = await sb.autocomplete(prefix, { gl: "us", hl: "en" }); for (const s of answer.suggestions) { seen.set(s.value, Math.max(seen.get(s.value) ?? 0, s.relevance ?? 0)); } } console.log([...seen].sort((a, b) => b[1] - a[1]));
Response fields
The main fields of the answer. Some come only with one client, as marked. The reference has every parameter.
| Field | Type | What it holds |
|---|---|---|
| suggestions[] | array | The suggestions, in the box's order: 15 with client=chrome, 10 with gws-wiz. |
| position | integer | The suggestion's place in the list. |
| value | string | The suggested text: "golden retriever puppies". |
| type | string | The kind of suggestion: QUERY for a plain query, ENTITY for a thing Google knows, or NAVIGATION. |
| relevance | integer | Google's score for the suggestion. client=chrome. |
| highlighted | string | The suggestion with what Google added in <b>. client=gws-wiz. |
| title, description | string | A known thing's name and line: "Golden Retriever", "Dog breed". client=gws-wiz. |
| thumbnail | string | A known thing's picture. client=gws-wiz. |
| verbatim_relevance | integer | Google's score for the text as typed. client=chrome. |
| search | object | What was asked: q, gl, hl, client, and cp when given. |
| meta.credits | integer | The credits the call spent. |
| request_id | string | The call's id, to quote to support. |
What it is used for
Grow a keyword list
Ask a seed word followed by each letter, "espresso a", "espresso b" and so on, and keep every value with its relevance.
Find the questions people ask
Send "how to ", "why does " or "can I " with the trailing space. The suggestions are what people type after those words.
See what your brand suggests
Type your brand's name and read what Google suggests after it, for the country and language you ask from.
Compare countries and languages
Ask the same text with another gl and hl to see what people elsewhere type.
What 1,000 cost
1 credit a call, on the same key and credits as every other API. A call that fails is free, and so is the same call again within the hour.
| Plan | Price a month | Calls a month | Per 1,000 |
|---|---|---|---|
| Free | $0 | 1,000 | free |
| Starter | $25 | 25,000 | $1.00 |
| Developer | $75 | 100,000 | $0.75 |
| Production | $150 | 300,000 | $0.50 |
| Scale | $350 | 800,000 | $0.44 |
In US dollars before tax. All plans and credit packs are on the pricing page.
Questions
Which client should I use?
chrome, the default, for more suggestions with a relevance score: good for keyword research. gws-wiz for exactly what Google's search box shows, with the things it knows.
Why keep the trailing space?
Because Google reads it: how to suggests ways to finish the words, while how to with a space suggests what comes after them.
Can I get suggestions for another country?
Yes. gl sets the country and hl the language, as they do on every other API.
Can I get it as Markdown?
Yes. output=md returns the suggestions as Markdown, ready for a language model.
Can an AI agent use it?
Yes. Our MCP server has it as the google_autocomplete tool: add https://api.serpbit.com/mcp as a connector in Claude, ChatGPT or Cursor and sign in.
Is Serpbit part of Google?
No. Serpbit is not affiliated with Google; Google is a trademark of Google LLC.
Start with 1,000 free credits.
Every month. No card.