---
title: "Autocomplete"
method: GET
path: "/maps/autocomplete"
tags: ["Google Maps"]
---

# Autocomplete

`GET /maps/autocomplete`

## Request

- Base URL: `https://scrappa.co/api`
- URL: `https://scrappa.co/api/maps/autocomplete`
- Auth: API key in header `X-API-KEY`

Get autocomplete suggestions for a search query.

## Query parameters

- `query` string
- `q` string
- `hl` string, nullable
- `gl` string, nullable
- `ll` string, nullable
- `google_domain` string, nullable

## Response `200`

- object
  - `search_parameters` object, required
    - `engine` string, required
    - `q` string, required
    - `hl` string, required
    - `gl` string, nullable, required
    - `google_domain` string, nullable, required
    - `ll` string, nullable, required
  - `suggestions` object[], required
    - `type` string, required
    - `google_id` string, nullable, required
    - `place_id` string, nullable, required
    - `main_text` string, nullable, required
    - `subtext` string, nullable, required
    - `main_text_highlights` object[], required
      - `offset` integer, required
      - `length` integer, required
    - `latitude` number, nullable, required
    - `longitude` number, nullable, required
    - `country` string, nullable, required
  - `response_time_ms` integer, required

## Other responses

- `401`: Unauthorized - API key is missing or invalid
- `422`: The q/query, locale, domain, or ll parameters failed validation before the Google Maps autocomplete request ran.
- `503`: The upstream service is temporarily unavailable. Please retry shortly.

---

[API](https://skmtc.dev/scrappa/apis/scrappa-api-documentation.md) · [All operations](https://skmtc.dev/scrappa/apis/scrappa-api-documentation/llms.txt) · [OpenAPI document](https://skmtc.dev/scrappa/apis/scrappa-api-documentation/revisions/2f4af6143d10?raw)
