Developers

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

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)"
}

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

Use it from JavaScript

const res = await fetch(
  "https://flycodes.net/api/airport/LHR.json"
);
const airport = await res.json();
console.log(airport.name); // London Heathrow Airport

Notes and fair use

  • Codes are uppercase. Requesting a missing code returns 404.
  • Four codes clash with Windows reserved filenames, so their endpoints take a trailing underscore: /api/airport/AUX_.json (also CON, NUL, PRN). Every other code uses the plain form.
  • 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.

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.