Skip to content

Endpoints · 12/13

Autocomplete

The suggestions Google offers while someone types.

EndpointPOSThttps://serp-api.ozymoz.com/autocomplete
Credits per call1

Parameters

NameDescription
qrequiredThe search query.
glCountry to search from, as a two-letter code (us, tr, de…).Default: us
hlInterface language, as a language code (en, tr, de…).Default: en

Example request

curl -X POST 'https://serp-api.ozymoz.com/autocomplete' \
  -H 'X-API-KEY: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "q": "how to make",
    "gl": "us",
    "hl": "en"
  }'

Example response

Illustrative values in the real shape. Top-level keys: suggestions.

response.json
{
  "searchParameters": {
    "type": "autocomplete",
    "engine": "google",
    "q": "how to make",
    "gl": "us",
    "hl": "en"
  },
  "suggestions": [
    {
      "value": "how to make money online"
    },
    {
      "value": "how to make pancakes"
    },
    {
      "value": "how to make a website"
    }
  ],
  "credits": 1
}

Good to know

Suggestions follow gl and hl.

Errors · Batch requests · Rate limits