mapping n-numbers to departure airports

I’m looking for a way to translate the n-numbers (and/or ICAO hex addresses) I get from dump1090 to the flight’s departure/destination airport (e.g. mapping AA1164 to DFW). Does anyone know of a free, programmatic way to do this?

Here’s why I’m asking: I’ve got a pretty standard PiAware setup that I want to modify with a little physical LED display to show the planes that are flying over my house are coming from. (I live near the flight path for planes landing at LaGuardia, so they’re basically all arrivals.) Just as a conversation starter. I can handle all the technical details, but I’m stuck on mapping the data I get from ADS-B transmissions – i.e. N-numbers, ICAO hex addresses and flight numbers – into the flight’s departure airport.

I know I could do this by scraping FlightAware, but I gather that would not be looked upon kindly.

Any ideas?

One hypothetical form this could take would be a downloadable database of recent commercial flights. Does this exist anywhere? (A little bit out of date is okay – if a flight number changes and my little toy is incorrect, it’s no big deal.)

Another possibility is a free flight history API. Looking at FlightAware’s API, it’s a little too pricey for my purpose. With roughly 1,000 flights per day at LGA, that’s 30,000 FlightInfoEx calls @0.001, that’s $30 a month for a toy. (Caching might cut me down a bit there…) Got a lead for something like this?

I don’t particularly want to parse airlines’ PDF timetables, but could probably do so with an okay degree of accuracy.

If I can figure out how to do this, would be happy to share the details.

Thanks y’all, and happy holidays.

It is possible to get flight route databases that may give the information you need. One option is the one planeplotter uses, found here: … utes/files

Virtual Radar Server also has a static database that includes flight route data. See here:

They won’t contain 100% of the flights you see, but do seem to have the majority. They are updated fairly regularly, so you’d have to pull down new versions from time to time.

Thanks, @calus! That database (specifically the Virtual Radar Server one; didn’t try the other) is exactly what I was looking for.