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 · no credit card · billed on RapidAPI
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
Perfect 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
Aviation API Documentation
Everything you need to integrate — base URL, auth, and copy-paste examples.
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
https://edge-apis.e9736.workers.devAuthentication
Authenticate every request by passing your API key as the ?apikey= query parameter:
GET /aviation/v1/airports/JFK?apikey=YOUR_KEYRequest & response
GET /aviation/v1/airports/JFK?apikey=YOUR_KEY HTTP/1.1{
"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 --request GET \
--url 'https://edge-apis.e9736.workers.dev/aviation/v1/airports/nearest?lat=40.71&lon=-74.0&limit=2&apikey=YOUR_KEY'Endpoints
GET /aviation/v1/airports/{code}
Look up a single airport by 3-letter IATA or 4-letter ICAO code (case-insensitive).
/aviation/v1/airports/JFK?apikey=YOUR_KEYGET /aviation/v1/airports/search
Partial, case-insensitive search over airport name, city, IATA and ICAO, with optional country/city filters.
/aviation/v1/airports/search?q=kennedy&country=US&apikey=YOUR_KEYGET /aviation/v1/airports/nearest
Returns airports nearest to a lat/lon point, sorted by great-circle (haversine) distance with distance_km.
/aviation/v1/airports/nearest?lat=40.71&lon=-74.0&limit=2&apikey=YOUR_KEYGET /aviation/v1/airlines/{code}
Look up a single airline by 2-letter IATA or 3-letter ICAO code (case-insensitive).
/aviation/v1/airlines/AAL?apikey=YOUR_KEYGET /aviation/v1/airlines/search
Partial, case-insensitive search over airline name, IATA, ICAO and callsign, with optional country/active filters.
/aviation/v1/airlines/search?q=american&active=true&apikey=YOUR_KEYQuery 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.
Aviation API Pricing
Choose the right plan for your airport and airline data needs with flexible pricing options and no hidden fees
Basic
- Full airport & airline datasets
- All endpoints included
- 5 req/s rate limit
Pro
- Full airport & airline datasets
- All endpoints included
- 20 req/s rate limit
Ultra
- Full airport & airline datasets
- All endpoints included
- 50 req/s rate limit
Need higher volume or a custom SLA?
Talk to us about enterprise rates, dedicated support, and compliance docs.
Frequently asked questions
The API includes approximately 7,900 IATA-coded commercial/passenger airports and approximately 5,300 airlines worldwide. Airports are limited to those with an assigned IATA code, so general-aviation airfields and heliports without an IATA code are not included. Airline IATA codes are populated only where known — many airline records carry only an ICAO/primary code — so you should handle null code fields in your integration.
Yes. For airports, a 3-character code resolves IATA first then ICAO, and a 4-character code resolves ICAO first then IATA. For airlines, a 2-character code resolves IATA first and a 3-character code resolves ICAO first with a fallback to the source primary-key map. All code matching is case-insensitive, so 'jfk' and 'JFK', or 'aal' and 'AAL', return the same result.
Send a lat and lon (in decimal degrees, latitude -90 to 90 and longitude -180 to 180) to /aviation/v1/airports/nearest. The API computes the great-circle (haversine) distance from that point to every airport in the dataset and returns the closest airports sorted ascending by distance. Each result includes a precise distance_km value, and the response echoes your origin coordinate. Use the optional limit parameter (default 20, max 100) to control how many airports are returned.
Pass your API key as the ?apikey= query parameter on every request, for example /aviation/v1/airports/JFK?apikey=YOUR_KEY. On the RapidAPI marketplace, authentication is handled with the standard X-RapidAPI-Key and X-RapidAPI-Host headers and your subscription tier governs your monthly quota and rate limit.
Yes. The Basic tier is free with 1,000 requests per month and a 5 req/s rate limit, ideal for prototyping and evaluation. The Pro tier ($12/month) includes 100,000 requests per month at 20 req/s, and the Ultra tier ($49/month) includes 1,000,000 requests per month at 50 req/s. All tiers include the full airport and airline datasets and every endpoint.
The API returns clean, predictable errors. A 400 is returned for a missing or malformed code, when a search endpoint is called without at least one filter (q, country, or city/active), or when lat/lon are missing, non-numeric or out of range. A 404 is returned when no airport or airline matches the supplied code. Each error response contains a descriptive 'error' message you can surface or log.
Absolutely. The partial, case-insensitive search endpoints are designed for this. For airports, query the q parameter against name/city/IATA/ICAO and optionally filter by country or city; for airlines, query q against name/IATA/ICAO/callsign. Request a small limit (for example 10–20) and debounce user input so responses stay fast. Because the data is edge-served and read-only, typical responses return in well under 50ms.
Related APIs & tools
Other services that pair well — all on the same key.
SERP API
Extract structured data from search engine results pages across multiple engines and search types.
Learn more→Whois API
Query domain registration information, ownership details, and registrar data for any domain.
Learn more→Text Analysis API
Comprehensive NLP and pattern detection including named entity recognition and sentiment analysis.
Learn more→Every week you build in-house is a week you don't ship product
2,500+ teams already made the switch. Start with a free tier today, or talk to us about your enterprise needs.
For developers
Free tier, no credit card. Integrate your first API in under 30 minutes.
Get API keys freeRead the docsFor teams and enterprise
Custom volumes, SLA guarantees, dedicated support, and compliance documentation.
Talk to salesor email sales@apicodex.io