I need to find the distance (as the Airbus A320 flies, not super accurate) between two airports, preferably using IATA codes (PHX, LAX, CLT for example).

I see many websites that do this but I need to find an API (Google Maps, Bing Maps?) that I could use to calculate the distances with. I'm aware that I might have to geo code the IATA codes, but I'd like to avoid that (I know that using Google maps you can specify the IATA code+Airport and it will get the location)

Any suggestions?