Airport Database API - IATA, ICAO, Flight Distance, METAR avatar

Airport Database API - IATA, ICAO, Flight Distance, METAR

Pricing

from $0.70 / 1,000 results

Go to Apify Store
Airport Database API - IATA, ICAO, Flight Distance, METAR

Airport Database API - IATA, ICAO, Flight Distance, METAR

Airport database and flight distance API in one actor. No API key, no login, no proxy: open data (OurAirports, aviationweather.gov). Look up airports by IATA or ICAO code, name or country, find airports near a point, get distance and flight time, plus live METAR/TAF.

Pricing

from $0.70 / 1,000 results

Rating

0.0

(0)

Developer

Martin Petrov

Martin Petrov

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 hours ago

Last modified

Security

Limited permissions

Share

Airport Database API - IATA, ICAO, Flight Distance & METAR Weather

One actor for everything about airports: look up any airport by IATA or ICAO code, search by name, country or type, find airports near a latitude/longitude, get the great-circle distance, bearing and estimated flight duration between airports (JFK-LHR), and read the latest METAR and TAF weather for any station.

Built on open data (OurAirports, public domain) and the official NOAA Aviation Weather Center API. No API key, no login, no scraping of websites. Results come back in seconds, as clean JSON, CSV or Excel.

Who needs it

  • Travel apps and flight comparison sites: autocomplete airports, show distance and flight time on a route page, fill city and country from a code.
  • AI travel agents and chatbots: call it from an agent (MCP) to answer "how far is Varna from London?" or "what is the weather at JFK?".
  • Logistics, aviation and charter teams: runway length, surfaces, elevation, nearest airports to a site, bearing between two points.
  • Data teams: a clean, regularly updated airport table with IATA, ICAO, coordinates, time zone and runways, ready for joins.

Five modes

ModeWhat it does
distanceRoutes like JFK-LHR: kilometers, miles, nautical miles, initial bearing, estimated flight time, time zone difference.
lookupAirport details by IATA or ICAO code.
searchFind airports by text, country (US, BG) and type (large_airport, medium_airport...).
nearbyAirports around a point, sorted by distance (airports with scheduled service by default).
weatherLatest METAR (raw and decoded) and optional TAF forecast.

How to use it (step by step)

  1. Click Try for free.
  2. Pick What to do. The default (distance with three sample routes) works immediately.
  3. Fill the matching field: Routes for distance, Airport codes for lookup and weather, Search text / Country / Types for search, Latitude / Longitude / Radius for nearby.
  4. Click Start and download JSON, CSV or Excel, or call it by API.

API example (copy and paste)

Replace YOUR_APIFY_TOKEN with your token from Apify Console, Settings, Integrations.

curl -s -X POST "https://api.apify.com/v2/acts/martin10291~airports-flight-distance/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"mode":"distance","routes":["JFK-LHR","SOF-VAR","LAX-NRT"]}'

Weather for three airports:

curl -s -X POST "https://api.apify.com/v2/acts/martin10291~airports-flight-distance/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"mode":"weather","codes":["KJFK","EGLL","LBWN"],"includeTaf":true}'

Use it from AI agents (MCP)

Add this actor as a tool through the Apify MCP server (https://mcp.apify.com), for example in Claude Desktop, Cursor or any MCP client:

{
"mcpServers": {
"apify": {
"url": "https://mcp.apify.com?tools=martin10291/airports-flight-distance",
"headers": { "Authorization": "Bearer YOUR_APIFY_TOKEN" }
}
}
}

Then ask your agent: "Distance and flight time from Sofia to Varna?" or "Current METAR at Heathrow?".

Input

FieldTypeDescription
modestringdistance, lookup, search, nearby or weather.
routesarrayDistance mode: pairs like JFK-LHR (IATA or ICAO).
codesarrayLookup and weather mode: IATA or ICAO codes.
querystringSearch mode: text in name, city, code or keywords.
countrystringSearch mode: two-letter ISO country code.
typesarraySearch and nearby: airport types to keep.
latitude, longitudenumberNearby mode: center point.
radiusKmintegerNearby mode: radius in km.
scheduledServiceOnlybooleanNearby mode: only airports with scheduled flights (default on).
includeTafbooleanWeather mode: also return the TAF forecast.
onlyNewbooleanMonitoring: only new or changed results.
monitorIdstringSeparate memory per watch list.
maxItemsintegerHard limit on results saved (and paid for).

Output examples

distance

{
"route": "JFK-LHR",
"from": {"iata": "JFK", "icao": "KJFK", "name": "John F. Kennedy International Airport", "city": "New York", "countryCode": "US", "latitude": 40.639447, "longitude": -73.779317},
"to": {"iata": "LHR", "icao": "EGLL", "name": "London Heathrow Airport", "city": "London", "countryCode": "GB", "latitude": 51.470748, "longitude": -0.459909},
"greatCircleKm": 5539.8,
"miles": 3442.3,
"nauticalMiles": 2991.3,
"initialBearingDeg": 51.4,
"initialBearingCompass": "NE",
"estimatedFlightMinutes": 430,
"estimatedFlightTime": "7h 10m",
"estimateAssumptions": "Estimate only: block time = distance / 830 km/h + 30 min taxi/climb/descent overhead. Not a schedule.",
"fromTimezone": "America/New_York",
"toTimezone": "Europe/London",
"timezoneDifferenceHours": 5.0
}

lookup / search / nearby

{
"iata": "JFK", "icao": "KJFK", "name": "John F. Kennedy International Airport", "type": "large_airport",
"city": "New York", "region": "New York", "countryCode": "US", "country": "United States", "continent": "NA",
"latitude": 40.639447, "longitude": -73.779317, "elevationFt": 13,
"timezone": "America/New_York", "utcOffsetHours": -5.0, "scheduledService": true,
"runways": {"count": 4, "longestFt": 14511, "longestM": 4423, "surfaces": ["ASP", "PEM"]},
"wikipedia": "https://en.wikipedia.org/wiki/John_F._Kennedy_International_Airport",
"homeLink": "https://www.jfkairport.com/"
}

Nearby mode adds distanceKm and bearingDeg to every airport.

weather

{
"icao": "EGLL",
"observedAt": "2026-11-01T21:50:00Z",
"rawMetar": "METAR EGLL 012150Z AUTO 35004KT 310V030 9999 SCT027 09/06 Q1035",
"windDirectionDeg": 350, "windSpeedKt": 4, "windGustKt": null,
"visibilitySm": "6+", "temperatureC": 9, "dewpointC": 6,
"altimeterHpa": 1035, "altimeterInHg": 30.56,
"flightCategory": "VFR",
"clouds": [{"cover": "SCT", "base": 2700}],
"rawTaf": "TAF AMD EGLL 011733Z 0118/0224 ..."
}

Monitoring and alerts

Turn on Only new or changed results and set a Monitor ID. In weather mode only METARs that changed since the last run are returned (and paid for), so a schedule every 30 minutes behaves like a weather alert feed. In the other modes only airports or routes not seen before for that Monitor ID are returned. Connect Slack, email, Google Sheets, Zapier, Make or a webhook in Apify Console.

Pricing

Pay per result: $1.00 per 1,000 results (one result = one airport, one route or one weather report). The sample input costs a fraction of a cent. Use Max results to cap spending.

Data sources and attribution

  • Airports, runways, countries and regions: OurAirports, public domain. Downloaded at run time and cached for 7 days.
  • Weather: NOAA Aviation Weather Center Data API, official US government data, no key. Requests are kept modest and sent with an honest User-Agent.
  • Time zones are derived from airport coordinates with the open-source timezonefinder library.

FAQ

Is the flight duration exact? No. It is an estimate: distance divided by a typical cruise speed of 830 km/h plus 30 minutes for taxi, climb and descent. Real flights vary with winds, routing, aircraft and airline schedules.

Does it track live flights or give timetables and prices? No. It does not provide live flight positions, schedules, delays or fares. It covers airport data, distances and weather.

Which codes work? 3-letter IATA codes (JFK) and 4-character ICAO codes (EGLL). For weather, any ICAO station code works, even if it is not in the airport table.

How fresh is the airport data? OurAirports is community maintained and updated frequently. The actor refreshes its cached copy every 7 days.

Why is a code not found? Many small airfields have no IATA code. Try the ICAO code, or use search mode. Missing codes are listed in the run summary and are not charged.

What is in the run summary? The RUN_SUMMARY record in the default key-value store lists counts, codes not found and lastError.