New The MCP server is live: all 45 APIs in Claude, Cursor or any MCP client. Connect your agent

Airports & airlines reference data, served from the edge in milliseconds

Aviation API

The Aviation API gives you instant, reliable access to a curated database of ~7,900 IATA-coded commercial airports and ~5,300 airlines worldwide. Resolve any airport by its IATA (3-letter) or ICAO (4-letter) code, or any airline by its IATA (2-letter) or ICAO (3-letter) code — all case-insensitive, with sensible fallbacks so you get a hit even when you only have one of the two code systems.

Beyond simple lookups, the API does the geospatial work for you: the nearest-airports endpoint runs a great-circle (haversine) calculation across the entire dataset and returns the closest airports to any latitude/longitude, each annotated with a precise distance_km. Powerful partial-text search lets you build typeahead pickers, booking flows, flight trackers and logistics dashboards without shipping a multi-megabyte dataset in your own bundle.

Free tier included, no credit card required. One key works across every API.

At a glance

Aviation API

1 credit / call
Free calls / month
1,000
Airports
7,900+
Airlines
5,300+
Response Time
<50ms
Get your free API key

1,000 free calls on the free plan

Key features

  • Airport lookup by IATA (3-letter) or ICAO (4-letter) code, case-insensitive
  • Airline lookup by IATA (2-letter) or ICAO (3-letter) code, case-insensitive
  • Partial search across airport name, city, IATA and ICAO
  • Partial search across airline name, callsign, IATA and ICAO
  • Nearest-airport search by lat/lon with great-circle distance_km
  • Country and city filters with a configurable limit (default 20, max 100)
  • Bundled, read-only datasets with strict input validation and clean 400/404 errors

Built for

  • Airport and airline typeahead pickers in booking flows
  • Flight trackers and aviation dashboards
  • Logistics and freight routing applications
  • Travel and itinerary planning apps
  • Resolving IATA/ICAO codes to human-readable names
  • Finding the closest airport to a user or shipment location
  • Enriching flight or ticket records with airport metadata
  • Mapping and geospatial visualizations of air routes

MCP · for your agent

Hand the Aviation API to your agent

Connect Claude, Cursor or any MCP client once, then ask in plain words. Your agent finds this API, reads its docs and makes the call: 1 credit per call, the same as REST, from your team's balance.

Plan travel to an offsite venue

“Our offsite is near Sintra, Portugal (38.80, -9.38). Which airports are closest, and what do nearby hotels cost Oct 14-17?”

list_apis · get_api_docsfree

api_request GET /aviation/v1/airports/nearest?lat=38.80&lon=-9.38&limit=3 1 cr

+ Travel Data API25 cr

The three closest airports with codes and distance in km, plus hotel prices for your dates.

Decode airport codes in an itinerary

“Our booking export only has codes like SAW, ESB and ADB. Turn them into airport names, cities and time zones.”

list_apis · get_api_docsfree

api_request GET /aviation/v1/airports/SAW 1 cr

Full airport name, city, country and time zone for each code, added back to the export.

Standardize airline names

“Our expense data lists one airline as 'PC', 'Pegasus' and 'Pegasus Airlines'. Map them all to one name and code.”

list_apis · get_api_docsfree

api_request GET /aviation/v1/airlines/search?q=pegasus&active=true 1 cr

The matching active airline with its IATA and ICAO codes, so every row maps to one carrier.

$ claude mcp add --transport http apicodex https://mcp.apicodex.io

Illustrative asks; the calls and prices are real. Claude, Cursor, VS Code and Windsurf setup: mcp.apicodex.io

Try it

Build the request for your data

Edit the parameters below and see the exact request and curl command you'd send. No key required to preview.

GET /aviation/v1/airports/JFK
Open in Playground

Parameters

Request · HTTP
GET /aviation/v1/airports/JFK?apikey=YOUR_KEY HTTP/1.1
Host: api.apicodex.io
Response · JSON 200 OK
{
"airport": {
  "icao": "KJFK",
  "iata": "JFK",
  "name": "John F Kennedy International Airport",
  "city": "New York",
  "state": "New York",
  "country": "US",
  "lat": 40.639751,
  "lon": -73.778925,
  "elevation": 13,
  "tz": "America/New_York"
}
}

Documentation

Aviation API Documentation

The Aviation API provides edge-served reference data for airports and airlines. Look up airports by IATA or ICAO code, search by name/city/country, find the nearest airports to any coordinate via great-circle (haversine) distance, and resolve airlines by IATA or ICAO code. All datasets are bundled and read-only, with strict input validation.

Base URL

url
https://api.apicodex.io/aviation

Authentication

Authenticate every request by passing your API key as the ?apikey= query parameter:

headers
GET /aviation/v1/airports/JFK?apikey=YOUR_KEY

Request and response

Illustrative values. Confirm current endpoint behavior, quotas, and data freshness in the API documentation before production use.

request · http
GET /aviation/v1/airports/JFK?apikey=YOUR_KEY HTTP/1.1
Host: api.apicodex.io
response · json
{
"airport": {
  "icao": "KJFK",
  "iata": "JFK",
  "name": "John F Kennedy International Airport",
  "city": "New York",
  "state": "New York",
  "country": "US",
  "lat": 40.639751,
  "lon": -73.778925,
  "elevation": 13,
  "tz": "America/New_York"
}
}

Code examples

cURL
curl --request GET \
  --url 'https://api.apicodex.io/aviation/v1/airports/nearest?lat=40.71&lon=-74.0&limit=2&apikey=YOUR_KEY'

Endpoints

GET /v1/airports/{code}

Look up a single airport by 3-letter IATA or 4-letter ICAO code (case-insensitive).

/v1/airports/JFK?apikey=YOUR_KEY

GET /v1/airports/search

Partial, case-insensitive search over airport name, city, IATA and ICAO, with optional country/city filters.

/v1/airports/search?q=kennedy&country=US&apikey=YOUR_KEY

GET /v1/airports/nearest

Returns airports nearest to a lat/lon point, sorted by great-circle (haversine) distance with distance_km.

/v1/airports/nearest?lat=40.71&lon=-74.0&limit=2&apikey=YOUR_KEY

GET /v1/airlines/{code}

Look up a single airline by 2-letter IATA or 3-letter ICAO code (case-insensitive).

/v1/airlines/AAL?apikey=YOUR_KEY

GET /v1/airlines/search

Partial, case-insensitive search over airline name, IATA, ICAO and callsign, with optional country/active filters.

/v1/airlines/search?q=american&active=true&apikey=YOUR_KEY

Query Parameters

Required parameters

  • apikey Your API key, passed as a query parameter on every request.
  • code Path parameter for the lookup endpoints: a 3/4-character airport code or 2/3-character airline code.
  • lat Latitude in decimal degrees (-90 to 90). Required for the nearest endpoint.
  • lon Longitude in decimal degrees (-180 to 180). Required for the nearest endpoint.

Optional parameters

  • q Partial match against name/city/IATA/ICAO (airports) or name/IATA/ICAO/callsign (airlines).
  • country Exact country filter (ISO code for airports, country name for airlines), case-insensitive.
  • city Partial city match for airport search (case-insensitive).
  • active Filter airlines by active status. Accepts true/1 or false/0.
  • limit Maximum results to return for list endpoints. Default 20, max 100.

Pricing

Aviation API Pricing

This API costs 1 credit per request. Credits are shared across every API on your plan.

Cost estimator

requests per month → cheapest plan that covers it

Estimate your monthly cost

Drag the slider to match your expected request volume. We'll recommend the cheapest plan that covers it.

10,000

Recommended plan

Starter

$29.99 /month

Credits used
Credits included
Cost per 1K requests
Choose Starter

Free

Free
1,000 credits · ~1,000 requests/mo · 2 rps
  • All APIs included
  • No credit card required
  • Full documentation and examples
  • MCP server for your AI agents
  • Up to 5 active API keys
Start for free

Starter

Popular
$29.99 /month
50,000 credits · ~50,000 requests/mo · 10 rps
  • All APIs included
  • Email support
  • Usage dashboard and analytics
  • MCP server for your AI agents
  • Up to 5 active API keys
Start with Starter

Pro

$99.99 /month
250,000 credits · ~250,000 requests/mo · 25 rps
  • All APIs included
  • Priority support
  • MCP server for your AI agents
  • Up to 5 active API keys
Start with Pro

Need a different plan?

Tell us about your API, volume, or support requirements.

Contact us

FAQ

Frequently asked questions

Ready to integrate Aviation?