Piloterr

Google Search Autocomplete

Retrieve real-time Google Search autocomplete suggestions for any query, with support for language and country localization.

Credit cost: 1 credit per call

GET
/v2/google/search/autocomplete

Authorization

ApiKeyAuth
x-api-key<token>

Your API key. Include it in the x-api-key header for every request.

In: header

Query Parameters

query*string

The partial or complete search query for which you want to retrieve autocomplete suggestions from Google.

Example:

coffee
cp?number

Cursor position in the query string where autocomplete suggestions should be generated. Determines which part of the query is being completed.

  • 0: Suggestions based on the full query (default)
  • 5: Suggestions based on the first 5 characters of the query
Default"0"
gl?string

Two-letter country code for the Google search country context. Defines which regional Google index is used.

  • us: United States (default)
  • fr: France
  • gb: United Kingdom
  • de: Germany

Example:

us
Default"us"
hl?string

Two-letter language code for the Google interface language. Controls the language in which suggestions are returned.

  • en: English (default)
  • fr: French
  • de: German
  • es: Spanish

Example:

en
Default"en"

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://api.piloterr.com/v2/google/search/autocomplete?query=string"

{
  "suggestions": [
    {
      "value": "ryze mushroom coffee"
    },
    {
      "value": "coffee near me"
    },
    {
      "value": "mushroom coffee"
    },
    {
      "value": "keurig coffee maker"
    },
    {
      "value": "costa coffee"
    },
    {
      "value": "zus coffee"
    },
    {
      "value": "ninja coffee machine"
    },
    {
      "value": "black rifle coffee"
    },
    {
      "value": "delonghi coffee machine"
    },
    {
      "value": "coffee shops near me"
    }
  ],
  "search_parameters": {
    "q": "coffee",
    "cp": 0,
    "gl": "us",
    "hl": "en",
    "engine": "google",
    "google_domain": "google.com"
  }
}

{
  "error": "Bad Request"
}
{
  "error": "Invalid API Key"
}
{
  "error": "Payment required"
}
{
  "error": "Rate limit exceeded for the API key: quota monthly"
}
{
  "error": "Internal Error"
}