DEV Community

Cover image for Building an Aviation Hub API: Airports, Airlines, Live Flights & Weather From Six Keyless Sources
Oaida Adrian
Oaida Adrian

Posted on

Building an Aviation Hub API: Airports, Airlines, Live Flights & Weather From Six Keyless Sources

The aviation niche looks impenetrable at first: proprietary flight feeds, licensing fees, and a wall of "contact sales" forms. But most of the data people actually pay for is already public — it's just scattered across six or seven government and community sources that nobody bothered to stitch together.

So I built an aviation hub actor that does exactly that: one input, six keyless upstreams, six output modes.

The gap

The reference actor in this niche did the same job, but its live mode returned zero rows in our trial — its single ADS-B feed was empty at the time. One feed, no fallback, no resilience. Ours ships six modes:

  • Airports — 85K+ entries from OurAirports (public domain), including runways
  • Airlines — the OpenFlights registry with country and callsign data
  • Routes — geocoded endpoints plus great-circle distance in kilometres
  • Live — adsb.lol community ADS-B with an OpenSky anonymous fallback, so live never returns empty when either feed has coverage
  • Weather — NOAA METAR JSON from aviationweather.gov
  • Digest — a market summary: busiest airports, biggest airlines, most common aircraft types

Reverse-engineering

The trickiest part was the route mode: OpenFlights gives you source/destination pairs, but not coordinates. I geocode both ends and compute great-circle distance — one formula, no API key, works for every pair in the registry.

The live mode needed the fallback architecture: try adsb.lol first, and if the feed is thin or empty, flip to OpenSky's anonymous endpoint. The reference's single-feed design was its weakness; the fallback is the whole point.

The smoke test

Six modes, six cloud runs, all non-zero:

  • airports — Romanian airports (Bacău, Belfast shapes correct)
  • airlines — Tarom returned with country + callsign
  • routes — OTP→LHR, American Airlines at 5,539.8 km great-circle
  • live — BAW416 (G-DBCA, A319) tracked near EGLL via adsb.lol
  • weather — LROP METAR, VFR conditions
  • digest — 85,892 airports, matching the reference digest total exactly

The honest bits

  • Live coverage depends on community ADS-B volunteers; the OpenSky fallback helps but isn't a paid-quality feed
  • METAR is aviation weather only — no TAF long-range forecasts in this mode
  • Route distances are great-circle, not flight-path

Try it

👉 Aviation Hub on Apify Store

More from me

While you're here, these might be worth a read:

Top comments (0)