GET/v1/airports
Find airports by IATA or ICAO code, country, or a word in the name or city
At least one filter is required; results are capped by limit. Large airports with scheduled service sort first.
PARAMETERS
- iataquery · string
- IATA codee.g. JFK
- icaoquery · string
- ICAO codee.g. KJFK
- countryquery · string
- ISO 3166-1 alpha-2e.g. US
- qquery · string
- Substring of the airport name or citye.g. new york
- typequery · enum
- Airport size classone of: large, medium, small
- limitquery · integer
- Maximum resultse.g. 20
REQUEST
curl "https://api.apialmanac.com/v1/airports" \ -H "X-API-Key: YOUR_KEY"
import requests
r = requests.get("https://api.apialmanac.com/v1/airports", headers={"X-API-Key": "YOUR_KEY"})
print(r.status_code, r.headers.get("X-Gw-Remaining"))
print(r.json())
const r = await fetch("https://api.apialmanac.com/v1/airports", {
headers: { "X-API-Key": "YOUR_KEY" }
});
console.log(r.status, r.headers.get("X-Gw-Remaining"));
console.log(await r.json());
RESPONSE
200OK
{
"count": 1,
"total": 1,
"airports": [
{
"iata": "JFK",
"icao": "KJFK",
"name": "John F Kennedy International Airport",
"type": "large",
"city": "New York",
"country": "US",
"region": "US-NY",
"continent": "NA",
"lat": 40.63975,
"lon": -73.77893,
"elevation_ft": 13,
"scheduled_service": true
}
]
}