Skip to main content

Get airports

curl -X GET "http://localhost:3000/v1/airports?search=VIDP" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"
GET
/v1/airports
Get all airports. We do not recommend using this route without any search query. This route has over 20k records.

Query parameters

Search query for airport. Can be IATA, ICAO (ident), name, or a part of any of these. Searching is case insensitive.Example: VIDP, Delhi, or Indira Gandhi

Response

Returns an array of airport objects.
id
string
Unique airport identifier
ident
string
Airport ICAO codeExample: VIDP
type
string
Airport typeValues: small_airport, seaplane_base, medium_airport, large_airport, heliport, closed, balloonport
elevation
string
Elevation in feet
continent
string
Continent codeExample: AS (Asia), EU (Europe)
isoCountry
string
ISO country code
isoRegion
string
ISO region code
municipality
string
Municipality/city name
gpsCode
string
GPS code
iataCode
string
IATA airport code (nullable for private airports)Example: DEL
name
string
Airport nameExample: Indira Gandhi International Airport
lat
string
Latitude coordinate
long
string
Longitude coordinate

Response example

[
  {
    "id": "airport_123",
    "ident": "VIDP",
    "type": "large_airport",
    "elevation": "777",
    "continent": "AS",
    "isoCountry": "IN",
    "isoRegion": "IN-DL",
    "municipality": "New Delhi",
    "gpsCode": "VIDP",
    "iataCode": "DEL",
    "name": "Indira Gandhi International Airport",
    "lat": "28.5665",
    "long": "77.1031"
  },
  {
    "id": "airport_456",
    "ident": "KJFK",
    "type": "large_airport",
    "elevation": "13",
    "continent": "NA",
    "isoCountry": "US",
    "isoRegion": "US-NY",
    "municipality": "New York",
    "gpsCode": "KJFK",
    "iataCode": "JFK",
    "name": "John F. Kennedy International Airport",
    "lat": "40.6398",
    "long": "-73.7789"
  }
]

Error responses

500
object
Internal server error
{
  "message": "Internal server error"
}

Search examples

Search by IATA code

curl -X GET "http://localhost:3000/v1/airports?search=LAX" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"
Returns Los Angeles International Airport.

Search by ICAO code

curl -X GET "http://localhost:3000/v1/airports?search=KLAX" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"
Returns Los Angeles International Airport.

Search by name

curl -X GET "http://localhost:3000/v1/airports?search=Heathrow" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"
Returns London Heathrow Airport and other airports with “Heathrow” in the name.

Search by city

curl -X GET "http://localhost:3000/v1/airports?search=Tokyo" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"
Returns all airports in or near Tokyo.

Airport types

The API includes various types of airports:
  • large_airport: Major international airports with significant passenger traffic
  • medium_airport: Regional airports with commercial service
  • small_airport: Smaller airports, often serving general aviation

Best practices

  • Always use the search parameter when querying airports to avoid retrieving all 20,000+ records
  • Search is case-insensitive, so “JFK”, “jfk”, and “Jfk” will all return the same results
  • You can search by partial names (e.g., “Kennedy” will return “John F. Kennedy International Airport”)
  • For the most accurate results, use IATA or ICAO codes when you know them

Build docs developers (and LLMs) love