---
title: "Get Autocomplete Suggestions"
method: GET
path: "/flights/autocomplete"
tags: ["GoogleFlights"]
---

# Get Autocomplete Suggestions

`GET /flights/autocomplete`

## Request

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

Suggest airports, cities, and stations for a partial location query.
One upstream lookup per request; an upstream or shape failure fails the
request and is not billed, a valid empty result is billed.

## Query parameters

- `q` string, required
- `hl` string, nullable
- `gl` string, nullable

## Response `200`

- object
  - `query` string, required
  - `suggestions` object[], required
    - `type` string, required
    - `name` string, required
    - `short_name` string, nullable, required
    - `description` string, nullable, required
    - `id` string, required
    - `code` string, nullable, required
    - `score` number, required
    - `airports` object[], required
      - `name` string, required
      - `id` string, required
      - `city` string, nullable, required
      - `distance` string, nullable, required

## Other responses

- `401`: Unauthorized - API key is missing or invalid
- `402`: Your API key is valid, but the account has no free, subscription, or package credits available.
- `422`: q is required and must be 1 to 255 characters; hl and gl must be valid language and country codes when provided.
- `429`: The request could not be completed because a temporary request limit was reached.
- `500`: Scrappa could not complete the Google Flights search after validation passed.
- `503`: The Google Flights search could not be completed because its upstream provider was temporarily unavailable.

---

[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)
