NewConnect Claude, Cursor, ChatGPT, and other AI agents to API Ninjas via our MCP server

Airports API

The Airports API provides vital information on over 85,000 airports, heliports, seaplane bases, and small airfields worldwide — from major international hubs to remote local strips.

Disclaimer: This data is provided for informational purposes only and is not for navigation or any flight-operations or safety-critical use.

Available endpoints:

(4.8)

From 4,860 users

2,500+

Applications using this API

API Status

Online - All Systems Operational

API Response Times

Average
P50
P75
P90
P95
433ms463ms486ms822ms1367ms

Didn't find what you were looking for? Suggest an improvement


/v1/airports GET

https://api.api-ninjas.com/v1/airports

Returns a list of up to 10 airport results. Use the offset parameter to access more results if available.

To look up a list of airport codes and names, use the /v1/airportslist endpoint.

Parameters

At least one of the following parameters (other than offset) must be set:

  • iata  optional

    International Air Transport Association (IATA) airport code (typically 3 characters). Supports partial, case-insensitive matching (e.g. LH matches LHR).

  • icao  optional

    International Civil Aviation Organization (ICAO) 4-character airport code. Supports partial, case-insensitive matching (e.g. EGL matches EGLL).

  • name  optional premium only

    Airport name. Supports partial matching (e.g. Heathrow matches London Heathrow Airport).

  • country  optional

    Airport country. Must be 2-character ISO-2 country code (e.g. GB).

  • region  optional premium only

    Administrative region such as state or province within a country (e.g. California). Supports partial, case-insensitive matching.

  • city  optional premium only

    Airport city (e.g. London). Supports partial, case-insensitive matching (e.g. York may match New York).

  • timezone  optional

    Airport timezone (e.g. Europe/London).

  • min_elevation  optional

    Minimum airport elevation in feet.

  • max_elevation  optional

    Maximum airport elevation in feet.

  • size  optional

    Airport size. Must be one of: large, medium, small.

  • has_iata  optional

    Filter by whether the airport has an IATA code. true returns only IATA-coded airports; false returns only those without.

  • min_runway_length  optional

    Minimum length (in feet) of at least one runway at the airport.

  • type  optional

    Facility type (more granular than size). Must be one of: large_airport, medium_airport, small_airport, heliport, seaplane_base, balloonport, closed.

  • scheduled_service  optional

    Filter by whether the airport has scheduled airline service. true or false.

  • continent  optional

    Continent code. Must be one of: AF, AN, AS, EU, NA, OC, SA.

  • surface  optional

    Filter to airports having at least one runway of the given surface category. Must be one of: paved, unpaved, water, unknown.

  • has_lights  optional

    Filter by whether the airport has at least one lighted runway. true or false.

  • q  optional

    Free-text search across airport name, city, codes, and alternate-name keywords.

  • include_closed  optional

    Set to true to include permanently closed airports. Closed airports are excluded by default.

  • limit  optional

    Maximum number of results to return. Must be between 1 and 100. Default is 10.

  • sort  optional

    Sort order for results. Must be one of: passengers (default), name, elevation, runway_length, longest_runway, num_runways.

  • order  optional

    Sort direction. Must be asc or desc. Default is desc.

  • offset  optional

    Number of results to offset for pagination.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

A JSON array of objects, each containing the following fields, or an error if the request is unsuccessful.

Response fields
  • iata

    3-character IATA airport code.

  • icao

    4-character ICAO airport code. May be empty for facilities without an official ICAO code — use ident for an identifier that is always present.

  • name

    Airport name.

  • city

    City where the airport is located.

  • region

    Administrative region (state or province).

  • country

    2-letter ISO country code.

  • elevation_ft

    Airport elevation in feet.

  • latitude

    Latitude coordinate.

  • longitude

    Longitude coordinate.

  • timezone

    Airport timezone (e.g., Europe/London).

  • size

    Airport size: large, medium, or small. Only set for airport-type facilities; null for heliports, seaplane bases, and balloonports (see type).

  • num_runways

    Number of runways at the airport.

  • ident

    Universal airport identifier (always present). Equals the ICAO code where one exists, otherwise a local or regional code.

  • type

    Facility type: large_airport, medium_airport, small_airport, heliport, seaplane_base, balloonport, or closed.

  • region_code

    ISO 3166-2 region code (e.g. US-CA).

  • country_name

    Full country name.

  • continent

    Continent code (AF, AN, AS, EU, NA, OC, SA).

  • elevation_m

    Airport elevation in meters.

  • scheduled_service

    Whether the airport has scheduled airline service (true or false).

  • is_closed

    Whether the facility is permanently closed (true or false).

  • gps_code

    GPS/navigation database code, if available.

  • local_code

    Local/national airport code, if available.

  • home_link

    Official airport website URL, if available.

  • wikipedia_link

    Wikipedia article URL, if available.

  • keywords

    Array of alternate names and codes used for search.

  • longest_runway_ft

    Length of the longest runway in feet.

  • runways

    Array of runway objects, each containing:

    • length - Runway length in feet.
    • width - Runway width in feet.
    • has_lights - Whether the runway has lights (true or false).
    • surface - Raw surface description (e.g. ASP).
    • surface_category - Normalized surface: paved, unpaved, water, or unknown.
    • closed - Whether the runway is closed (true or false).
    • le_ident / he_ident - Runway end designators (e.g. 09L / 27R).
    • le_heading_deg / he_heading_deg - True heading of each runway end in degrees.
  • estimated_annual_passengers

    Estimated yearly passenger volume. This is a heuristic estimate derived from facility type, runways, and country — not an official figure.

Sample Request Live Demo!

iata
icao
name 
city 

Try this API endpoint with all available parameters in our API playground

https://api.api-ninjas.com/v1/airports?iata=LHR

Headers

X-Api-KeyLog in or sign up to get your API Key

Sample Response

JSON
[
    {
      icao:"EGLL",
      ident:"EGLL",
      iata:"LHR",
      name:"London Heathrow Airport",
      city:"London",
      region:"England",
      region_code:"GB-ENG",
      country:"GB",
      country_name:"United Kingdom",
      continent:"EU",
      elevation_ft:83,
      elevation_m:25.3,
      latitude:51.47060013,
      longitude:-0.461941,
      timezone:"Europe/London",
      type:"large_airport",
      size:"large",
      scheduled_service:true,
      is_closed:false,
      gps_code:"EGLL",
      local_code:null,
      home_link:"https://www.heathrow.com/",
      wikipedia_link:"https://en.wikipedia.org/wiki/Heathrow_Airport",
      keywords:[
        "LON",
        "Londres"
      ],
      num_runways:2,
      longest_runway_ft:12799,
      runways:[
        {
          length:12799,
          width:164,
          has_lights:true,
          surface:"ASP",
          surface_category:"paved",
          closed:false,
          le_ident:"09L",
          he_ident:"27R",
          le_heading_deg:89.6,
          he_heading_deg:269.6
        },
        {
          length:12001,
          width:164,
          has_lights:true,
          surface:"ASP",
          surface_category:"paved",
          closed:false,
          le_ident:"09R",
          he_ident:"27L",
          le_heading_deg:89.6,
          he_heading_deg:269.6
        }
      ],
      estimated_annual_passengers:79200000
    }
]

Code Examples

1 2 curl -X GET "https://api.api-ninjas.com/v1/airports?iata=LHR" \ -H "X-Api-Key: YOUR_API_KEY"

If your programming language is not listed in the Code Example above, you can still make API calls by using a HTTP request library written in your programming language and following the above documentation.


/v1/airportconvert GET

https://api.api-ninjas.com/v1/airportconvert

Convert between IATA and ICAO airport codes. Provide exactly one of iata, icao, or code.

Parameters

  • iata  optional

    3-character IATA airport code.

  • icao  optional

    4-character ICAO airport code. May be empty for facilities without an official ICAO code — use ident for an identifier that is always present.

  • code  optional

    Any airport identifier — IATA, ICAO, ident, GPS, or local code. The matching type is detected automatically.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

A JSON object containing the following fields, or an error if no airport is found.

Response fields
  • icao

    4-character ICAO airport code. May be empty for facilities without an official ICAO code — use ident for an identifier that is always present.

  • iata

    3-character IATA airport code.

  • name

    Airport name.

  • city

    City where the airport is located.

  • region

    Administrative region (state or province).

  • country

    2-letter ISO country code.

  • elevation_ft

    Airport elevation in feet.

  • latitude

    Latitude coordinate.

  • longitude

    Longitude coordinate.

  • timezone

    Airport timezone (e.g., Europe/London).

  • size

    Airport size: large, medium, or small. Only set for airport-type facilities; null for heliports, seaplane bases, and balloonports (see type).

Sample Request Live Demo!

code

Try this API endpoint with all available parameters in our API playground

https://api.api-ninjas.com/v1/airportconvert?code=LHR

Headers

X-Api-KeyLog in or sign up to get your API Key

Sample Response

JSON
{
    icao:"EGLL",
    iata:"LHR",
    ident:"EGLL",
    name:"London Heathrow Airport",
    city:"London",
    region:"England",
    region_code:"GB-ENG",
    country:"GB",
    country_name:"United Kingdom",
    continent:"EU",
    elevation_ft:83,
    elevation_m:25.3,
    latitude:51.47060013,
    longitude:-0.461941,
    timezone:"Europe/London",
    type:"large_airport",
    size:"large",
    scheduled_service:true,
    is_closed:false,
    gps_code:"EGLL",
    local_code:null
}

Code Examples

1 2 curl -X GET "https://api.api-ninjas.com/v1/airportconvert?iata=LHR" \ -H "X-Api-Key: YOUR_API_KEY"

/v1/airportslist GETPremium only

https://api.api-ninjas.com/v1/airportslist

Returns a list of up to 100 airport codes and names in alphabetical order. Use the offset parameter to access more results via pagination.

To look up detailed information about an airport, use the icao parameter in the /v1/airports endpoint.

Parameters

  • offset  optional

    Number of results to offset for pagination. Default is 0.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

A JSON array of objects, each containing the following fields, or an error if the request is unsuccessful.

Response fields
  • icao

    4-character ICAO airport code. May be empty for facilities without an official ICAO code — use ident for an identifier that is always present.

  • name

    Airport name.

Sample Request Live Demo!

offset

Try this API endpoint with all available parameters in our API playground

https://api.api-ninjas.com/v1/airportslist

Headers

X-Api-KeyLog in or sign up to get your API Key

Sample Response

JSON
[
    {
      ident:"00A",
      icao:"",
      iata:"",
      name:"Total RF Heliport",
      type:"heliport"
    },
    {
      ident:"00AA",
      icao:"",
      iata:"",
      name:"Aero B Ranch Airport",
      type:"small_airport"
    },
    {
      ident:"00AK",
      icao:"",
      iata:"",
      name:"Lowell Field",
      type:"small_airport"
    }
]

/v1/airportdistance GETAnnual subscription only

https://api.api-ninjas.com/v1/airportdistance

Calculate the great-circle distance, initial bearing, and an estimated flight time between two airports.

Parameters

  • from  required

    Origin airport — IATA (3 chars) or ICAO (4 chars) code.

  • to  required

    Destination airport — IATA (3 chars) or ICAO (4 chars) code.

  • units  optional

    Distance units. Must be one of: km (default), mi, nm.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

A JSON object containing the following fields, or an error.

Response fields
  • from

    Origin airport code as provided in the request (uppercased).

  • to

    Destination airport code as provided in the request (uppercased).

  • distance

    Great-circle distance in the requested units.

  • bearing_initial

    Initial bearing from origin to destination, in degrees true (0–360).

  • unit

    Units used for the distance field. One of km, mi, nm.

  • estimated_flight_time_minutes

    Approximate total flight time in minutes, assuming an 800 km/h cruise plus 30 minutes of ground/climb/descent overhead.

Sample Request Live Demo!

from
to
units

Try this API endpoint with all available parameters in our API playground

https://api.api-ninjas.com/v1/airportdistance?from=JFK&to=LHR

Headers

X-Api-KeyLog in or sign up to get your API Key

Sample Response

JSON
{
    from:"JFK",
    to:"LHR",
    distance:5539.7,
    bearing_initial:51.4,
    unit:"km",
    estimated_flight_time_minutes:445
}

Code Examples

1 2 curl -X GET "https://api.api-ninjas.com/v1/airportdistance?from=JFK&to=LHR" \ -H "X-Api-Key: YOUR_API_KEY"

/v1/airportsuggest GETPremium only

https://api.api-ninjas.com/v1/airportsuggest

Autocomplete / typeahead suggestions for airport search. Matches against IATA, ICAO, name, and city. Results are ranked by code-prefix match, airport size, and IATA availability.

Parameters

  • q  required

    Query string (minimum 2 characters).

  • country  optional

    Restrict results to a country. Must be a 2-character ISO country code (e.g. US).

  • size  optional

    Restrict results to a size. Must be one of: large, medium, small.

  • limit  optional

    Maximum number of results to return. Must be between 1 and 3. Default is 3.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

A JSON array of compact airport records: icao, iata, name, city, country, size.

Sample Request Live Demo!

q
limit

Try this API endpoint with all available parameters in our API playground

https://api.api-ninjas.com/v1/airportsuggest?q=lon&limit=3

Headers

X-Api-KeyLog in or sign up to get your API Key

Sample Response

JSON
[
    {
      icao:"EGKK",
      iata:"LGW",
      ident:"EGKK",
      name:"London Gatwick Airport",
      city:"London",
      country:"GB",
      type:"large_airport",
      size:"large"
    },
    {
      icao:"EGLL",
      iata:"LHR",
      ident:"EGLL",
      name:"London Heathrow Airport",
      city:"London",
      country:"GB",
      type:"large_airport",
      size:"large"
    },
    {
      icao:"EGGW",
      iata:"LTN",
      ident:"EGGW",
      name:"London Luton Airport",
      city:"London",
      country:"GB",
      type:"large_airport",
      size:"large"
    }
]

Code Examples

1 2 curl -X GET "https://api.api-ninjas.com/v1/airportsuggest?q=lon&limit=3" \ -H "X-Api-Key: YOUR_API_KEY"

/v1/closestairport GETPremium only

https://api.api-ninjas.com/v1/closestairport

Find the airports nearest to a given latitude/longitude. Results are sorted by airport size (largest first), then by distance ascending within each size tier. Each result includes distance and bearing from the input coordinate.

Parameters

  • lat  required

    Latitude of the search center, in decimal degrees (-90 to 90).

  • lon  required

    Longitude of the search center, in decimal degrees (-180 to 180).

  • radius  optional

    Search radius in kilometres. Default is 50, maximum is 500.

  • size  optional

    Restrict to size: large, medium, or small.

  • has_iata  optional

    Filter by whether the airport has an IATA code (true or false).

  • min_runway_length  optional

    Minimum runway length in feet.

  • limit  optional

    Maximum number of results. Must be between 1 and 50. Default is 10.

  • units  optional

    Distance units. Must be km (default) or mi.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

A JSON array of objects sorted by airport size (largest first), then by distance ascending within each size tier. Each object contains the following fields, or an error.

Response fields
  • icao

    4-character ICAO airport code. May be empty for facilities without an official ICAO code — use ident for an identifier that is always present.

  • iata

    3-character IATA airport code.

  • name

    Airport name.

  • city

    City where the airport is located.

  • region

    Administrative region (state or province).

  • country

    2-letter ISO country code.

  • elevation_ft

    Airport elevation in feet.

  • latitude

    Latitude coordinate.

  • longitude

    Longitude coordinate.

  • timezone

    Airport timezone (e.g., America/Los_Angeles).

  • size

    Airport size: large, medium, or small. Only set for airport-type facilities; null for heliports, seaplane bases, and balloonports (see type).

  • distance

    Great-circle distance from the requested coordinate, in the requested units.

  • bearing

    Initial bearing from the requested coordinate to the airport, in degrees true (0–360).

  • distance_unit

    Units used for the distance field. One of km, mi.

Sample Request Live Demo!

lat
lon
radius

Try this API endpoint with all available parameters in our API playground

https://api.api-ninjas.com/v1/closestairport?lat=37.78&lon=-122.42&radius=80

Headers

X-Api-KeyLog in or sign up to get your API Key

Sample Response

JSON
[
    {
      icao:"KSFO",
      ident:"KSFO",
      iata:"SFO",
      name:"San Francisco International Airport",
      city:"San Francisco",
      region:"California",
      region_code:"US-CA",
      country:"US",
      country_name:"United States",
      continent:"NA",
      elevation_ft:13,
      elevation_m:4,
      latitude:37.61899948,
      longitude:-122.375,
      timezone:"America/Los_Angeles",
      type:"large_airport",
      size:"large",
      scheduled_service:true,
      is_closed:false,
      num_runways:4,
      longest_runway_ft:11870,
      distance:18.34,
      bearing:167.5,
      distance_unit:"km"
    },
    {
      icao:"KOAK",
      ident:"KOAK",
      iata:"OAK",
      name:"Metropolitan Oakland International Airport",
      city:"Oakland",
      region:"California",
      region_code:"US-CA",
      country:"US",
      country_name:"United States",
      continent:"NA",
      elevation_ft:9,
      elevation_m:2.7,
      latitude:37.72129822,
      longitude:-122.22100067,
      timezone:"America/Los_Angeles",
      type:"large_airport",
      size:"large",
      scheduled_service:true,
      is_closed:false,
      num_runways:4,
      longest_runway_ft:10520,
      distance:18.67,
      bearing:110.4,
      distance_unit:"km"
    }
]

Code Examples

1 2 curl -X GET "https://api.api-ninjas.com/v1/closestairport?lat=37.78&lon=-122.42&radius=80" \ -H "X-Api-Key: YOUR_API_KEY"