Get airport information
Returns airports matching filters such as IATA/ICAO code, name, city, country, region, elevation, size, or runway length. For typeahead suggestions use /airportsuggest.
Example code
// Using @orth/sdk - The simplest way to call APIs
// Install: npm install @orth/sdk
import Orthogonal from "@orth/sdk";
const orthogonal = new Orthogonal({
apiKey: process.env.ORTHOGONAL_API_KEY,
});
const output = await orthogonal.run({
api: "api-ninjas",
path: "/v1/airports"
});
console.log(output);Query parameters
International Air Transport Association (IATA) airport code (typically 3 characters). Supports partial, case-insensitive matching (substring search).
International Civil Aviation Organization (ICAO) airport code (typically 4 characters). Supports partial, case-insensitive matching (substring search).
Airport name. Supports partial matching (substring search).
Airport country. Must be 2-character ISO-2 country code.
Administrative region such as state or province within a country. Supports partial, case-insensitive matching (substring search).
Airport city. Supports partial, case-insensitive matching (substring search).
Airport timezone.
Minimum airport elevation in feet.
Maximum airport elevation in feet.
Airport size. (Allowed: large, medium, small)
Filter by whether the airport has an IATA code. (Allowed: true, false)
Minimum length (in feet) of at least one runway at the airport.
Maximum number of results to return. Must be between 1 and 100. Default is 10. (Default: 10)
Sort order for results. Default is passengers. (Allowed: passengers, name, elevation, runway_length) (Default: passengers)
Sort direction. Default is desc. (Allowed: asc, desc) (Default: desc)
Number of results to offset for pagination. (Default: 0)