---
title: "Search Agoda flight destinations/airports"
method: GET
path: "/agoda/flights/search-locations"
tags: ["Agoda"]
---

# Search Agoda flight destinations/airports

`GET /agoda/flights/search-locations`

## Request

- Base URL: `https://api.crawlora.net/api/v1`
- URL: `https://api.crawlora.net/api/v1/agoda/flights/search-locations`
- Auth: API key in header `x-api-key`

Resolves a free-text city or airport name into IATA airport codes for flight search, with each city's direct and nearby airports.

## Query parameters

- `keyword` string, required

## Headers

- `x-api-key` string, required

## Response `200`

OK

- AgodaFlightLocationSearchResponseDoc
  - `code` integer
  - `data` AgodaFlightLocationSearchResponse
    - `count` integer
    - `keyword` string
    - `suggestions` AgodaFlightLocationSuggestion[]
      - `airports` AgodaFlightAirportSuggestion[]
        - `code` string
        - `distance_km` integer
        - `lat` number
        - `lng` number
        - `name` string
      - `city_code` string: CityCode is Agoda's own multi-airport city-level search code, only present when the city has a distinct bookable code of its own (e.g. Bangkok's is "BKK", matching its single main airport). Empty when the location has no distinct city-wide code -- use one of Airports[].Code instead (e.g. Phuket has no city code, only its airport's "HKT").
      - `country_code` string
      - `country_name` string
      - `name` string
      - `nearby_airports` AgodaFlightAirportSuggestion[]
        - `code` string
        - `distance_km` integer
        - `lat` number
        - `lng` number
        - `name` string
      - `state_name` string
  - `msg` string

## Other responses

- `400`: Bad Request
- `500`: Internal Server Error
- `503`: Service Unavailable

---

[API](https://skmtc.dev/crawlora/apis/crawlora-api.md) · [All operations](https://skmtc.dev/crawlora/apis/crawlora-api/llms.txt) · [OpenAPI document](https://skmtc.dev/crawlora/apis/crawlora-api/revisions/028417aa35bb?raw)
