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


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

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, or construct it yourself from public resources.

This is a useful site: