Google Flights Location Search API

Google Flights Location Search API uses the /api/v1/search?engine=google_flights_location_search endpoint to provide suggestions based on partial user input.

It returns detailed information including airport codes (IATA), city and airport titles, geographic context, and Knowledge Graph IDs (kgmid), supporting both airport and city-level matches.

API Parameters

Search Query

  • Name
    q
    Required
    Required
    Description

    Search query that would produce autocomplete suggestions.

Localization

  • Name
    hl
    Required
    Optional
    Description

    The default parameter en defines the interface language of the search. Check the full list of supported Google Travel hl languages.

Engine

  • Name
    engine
    Required
    Required
    Description

    Parameter defines an engine that will be used to retrieve real-time data. It must be set to google_flights_location_search.

API key

  • Name
    api_key
    Required
    Required
    Description

    The api_key authenticates your requests. Use it as a query parameter (https://www.searchapi.io/api/v1/search?api_key=YOUR_API_KEY) or in the Authorization header (Bearer YOUR_API_KEY).

API Examples

Locations

Locations
GET
https://www.searchapi.io/api/v1/search?engine=google_flights_location_search&q=New
Request
import requests

url = "https://www.searchapi.io/api/v1/search"
params = {
  "engine": "google_flights_location_search",
  "q": "New"
}

response = requests.get(url, params=params)
print(response.text)
Response
{
  ...
  "locations": [
    {
      "type": "city",
      "kgmid": "/m/02_286",
      "full_name": "New York",
      "short_name": "New York",
      "description": "City in New York State",
      "airports": [
        {
          "type": "airport",
          "kgmid": "/m/02_286",
          "airport_code": "JFK",
          "title": "John F. Kennedy International Airport",
          "city": "New York",
          "distance": "12 mi"
        },
        ...
      ]
    },
    {
      "type": "city",
      "kgmid": "/m/0f2tj",
      "full_name": "New Orleans, Louisiana",
      "short_name": "New Orleans",
      "description": "City in Louisiana",
      "airports": [
        {
          "type": "airport",
          "kgmid": "/m/0f2tj",
          "airport_code": "MSY",
          "title": "Louis Armstrong New Orleans International Airport",
          "city": "New Orleans",
          "distance": "11 mi"
        }
      ]
    },
    ...
  ]
}