Free airport code API
Every airport and airline is a static JSON file. No API key, no rate limit, no sign up. Just fetch a URL. 8,803 airport endpoints and 1,108 airline endpoints.
Get an airport by IATA code
Request /api/airport/<IATA>.json with an uppercase 3-letter code:
curl https://flycodes.net/api/airport/JFK.json
Get an airline by IATA code
Request /api/airline/<IATA>.json with an uppercase 2-character code:
curl https://flycodes.net/api/airline/BA.json
Response:
{
"iata": "BA",
"icao": "BAW",
"name": "British Airways",
"callsign": "Speedbird",
"country": "United Kingdom",
"active": true,
"url": "https://flycodes.net/airline/BA",
"source": "OpenFlights"
}List all codes
Two index endpoints return every code so you can enumerate or build a local cache:
curl https://flycodes.net/api/airports.json curl https://flycodes.net/api/airlines.json
Copy-paste examples in five languages
Same request in each: the airport record for LHR. Every one of these runs as printed, with no key and no headers.
curl
curl -s https://flycodes.net/api/airport/LHR.json
JavaScript (fetch, browser or Node)
const res = await fetch( "https://flycodes.net/api/airport/LHR.json" ); const airport = await res.json(); console.log(airport.name); // London Heathrow Airport
Python (requests)
import requests
airport = requests.get(
"https://flycodes.net/api/airport/LHR.json"
).json()
print(airport["name"]) # London Heathrow AirportPHP
<?php
$airport = json_decode(
file_get_contents("https://flycodes.net/api/airport/LHR.json"),
true
);
echo $airport["name"]; // London Heathrow AirportGo
package main
import (
"encoding/json"
"fmt"
"net/http"
)
func main() {
res, err := http.Get("https://flycodes.net/api/airport/LHR.json")
if err != nil {
panic(err)
}
defer res.Body.Close()
var airport struct{ Name string }
json.NewDecoder(res.Body).Decode(&airport)
fmt.Println(airport.Name) // London Heathrow Airport
}Response
{
"iata": "JFK",
"icao": "KJFK",
"name": "John F. Kennedy International Airport",
"city": "New York",
"country": "US",
"countryName": "United States",
"continent": "North America",
"lat": 40.63975,
"lon": -73.778925,
"elevationFt": 13,
"type": "Large airport",
"scheduledService": true,
"runways": [ /* ... */ ],
"url": "https://flycodes.net/airport/JFK",
"source": "OurAirports (public domain)"
}OpenAPI specification
The whole API is described at /api/openapi.json (OpenAPI 3.1), so you can generate a client, load it into an HTTP tool, or hand it to an agent instead of this page.
The four reserved codes: AUX, CON, NUL and PRN
These four IATA codes are also reserved device names on Windows, where a file cannot be called AUX.json. Their endpoints therefore carry a trailing underscore:
curl -s https://flycodes.net/api/airport/AUX_.json # Araguaina, Brazil curl -s https://flycodes.net/api/airport/CON_.json # Concord, United States curl -s https://flycodes.net/api/airport/NUL_.json # Nulato, United States curl -s https://flycodes.net/api/airport/PRN_.json # Prishtina, Kosovo
Every other code uses the plain form. If you mirror this API to disk on Windows, you will hit the same wall, which is why it is documented rather than hidden.
Knowing when the data changed
The current dataset is version 1.1, generated on . Every regeneration is listed in the changelog, which is also available as JSON and as an Atom feed, so you can watch for changes without an account and without giving us an email address.
Notes and fair use
- Codes are uppercase. Requesting a missing code returns 404.
- Four codes clash with Windows reserved filenames and take a trailing underscore; see the reserved codes below.
- Files are static and cached at the edge, so they are fast and safe to call at scale.
- CORS is enabled (
Access-Control-Allow-Origin: *), so you can fetch these endpoints straight from a browser app on any domain, no proxy needed. - The data comes from open sources listed on the data page. Please credit FlyCodes and the original sources.
- No authentication is required and none is accepted.
Building a travel product? The same data powers our embeddable lookup widget, which you can drop into a page with one snippet.
Get told when the data changes
There is no mailing list, because there is no server here to run one on and no reason to ask you for an address to send four notices a year. The same job is done by a feed: /data/changelog/feed.xml gains an entry every time the dataset is regenerated, with the counts that changed. Point a reader, a CI job or a webhook at it. The machine version of the same information is /api/changelog.json, and every response carries the generation date, so you can also just compare that field against the last one you saw.
Who builds this
FlyCodes is built and maintained by FusionStudios, a Dutch web agency. The API is free and stays free: there is no key to lose, no plan to outgrow and nothing to sign. If you need something like it built for your own data, that is what the agency does.
Try it now
These are live example links you can open in a new tab: /api/airport/JFK.json, /api/airport/AMS.json, /api/airline/BA.json.