LurkAPI
Docs · Google autocomplete

Google autocomplete

What Google suggests as someone types: about 15 completions of a partial search, best first.

1 credit per callFresh within 6 hoursMCP tool: google_autocomplete
GEThttps://api.lurkapi.com/v1/google/autocomplete

Example responseView as markdown

When to use this

Use it for keyword research (what people search around a term) or to build search-as-you-type. Pass what's typed so far as query; region and language pick the market, US English by default.

These are the suggestions Chrome's address bar shows. Most are searches (type query); some are websites (navigation, with the URL in value) or instant answers (calculator: = 4 for 2+2). An unusual query can have none.

Parameters

All parameters go in the query string.

ParameterDescription
query
stringrequired
What's typed so far, e.g. best coff.
Example
best coff
region
stringoptional
Suggestions for searchers in this country: a 2-letter code (US, GB, DE…).
Default
US
language
stringoptional
The searchers' language, e.g. en, de or pt-BR.
Default
en

Example request

Replace YOUR_API_KEY with your key, or set LURKAPI_KEY for the code. Get a free key.

Language

Example response

A real response from this endpoint, captured from the live API and trimmed to a couple of items. Strings over 96 characters (mostly signed media URLs) are cut short and end in ….

Show the example response (1 KB)
{
  "success": true,
  "credits_remaining": 999999,
  "credits_charged": 1,
  "suggestions": [
    {
      "value": "best coffee",
      "type": "query",
      "title": null
    },
    {
      "value": "best coffee near me",
      "type": "query",
      "title": null
    }
  ]
}

Response fields

Every field of a successful response. [] marks a list: a[].b is the b of each item in a. nullable fields can be null; optional fields can be missing.

Show all 7 fields
FieldTypeDescription
successtrueAlways true here; errors have success: false.
credits_remainingnumberYour balance after this call. On anonymous playground calls: free tries left today.
credits_chargednumberCredits this call cost; 0 on free endpoints. On anonymous playground calls: tries used (1).
suggestionsobject[]Google's suggestions, best first: usually 15, plus an instant answer when there is one. Empty when Google has none.
suggestions[].valuestringThe suggestion: a search, a URL (navigation) or Google's answer (calculator).
suggestions[].typestringWhat it is: query (a search), navigation (a website) or calculator (an instant answer). Others are rare.
suggestions[].titlestringnullableThe page's title for navigation, Calculator for answers; null for searches.

Caching and freshness

Responses are cached for up to 6 hours, so a repeat call within that window can return the same data. It still costs 1 credit.

Errors

Errors return { success: false, error, code, docs } with the HTTP status below. Validation errors, 401/402/429 rejections and 5xx failures are free; not_found is charged (how charging works). All error codes.

StatusCodeMeaning
401missing_api_keyNo API key. Send it in the x-api-key header.
401invalid_api_keyThe key is unknown or was revoked.
402insufficient_creditsNot enough credits for this call. Buy a pack or wait for tomorrow's top-up.
403account_suspendedThis account is suspended. Contact support@lurkapi.com. Never charged.
405method_not_allowedEndpoints take GET with query params.
429rate_limitedToo many calls at once. Wait for the retry-after seconds, then retry.
500internal_errorSomething broke on our side. Retry; 5xx errors are free.
502upstream_errorThe platform didn't give a usable answer. Retry; 5xx errors are free.
503upstream_busyAll our connections to the platform are busy. Retry in a few seconds; 5xx errors are free.
504upstream_timeoutThe platform took over 30 seconds to answer (90 for web pages). Retry; timeouts are free.

Use it in Claude

Once LurkAPI is connected to Claude, this endpoint is the google_autocomplete tool. Ask in plain English, for example:

Ask Claude
Use LurkAPI's google_autocomplete with query "best coff" and summarize what you find.

Claude calls google_autocomplete with arguments like these, and each call costs 1 credit:

Tool arguments
{
  "query": "best coff"
}

Tool results are compact to save tokens: no nulls or empty lists, one URL per image or video, transcripts as plain text unless you pass timestamps=true. A result over 45,000 characters comes in parts: its _note gives the offset for the rest, and later parts are free for 15 minutes. trim=false returns the full response.

From the blog

All posts