Need to get airport code based on airport name or city name


#1

hello,

I need to get the airport code, what I have in input is airport name or city, how can I get that.


#2

You will need to keep a private database of the airport codes and names, and then perform searches against your database first. This is necessary because typically name matching needs to be done with autocompletion and soundex/approximation matching, which is best done locally for the lowest latency.

That database can be populated using the FlightXML function calls “AllAirports” and “AirportInfo”. Alternatively you can download the data from our subscription service flightaware.com/commercial/data/airports, or construct it yourself from public resources.


#3

This is a useful site: ourairports.com/