Airport Coordinates API

Put airports on the map in your travel product. Retrieve latitude and longitude alongside airport codes and names, or download the directory to support airport maps and location-based search.

  • Latitude and longitude
  • Lookup by IATA or ICAO code
  • JSON, XML and CSV

Look up an airport’s coordinates

Pass LHR in the iata parameter to retrieve London Heathrow Airport and its latitude and longitude. Replace YOUR_API_KEY with your assigned key.

Request · cURL

curl --get 'https://content.airhex.com/api/v3.7.10/airports/' \
  --data-urlencode 'apikey=YOUR_API_KEY' \
  --data-urlencode 'iata=LHR'

Response · JSON excerpt

[
  {
    "airhex_id": "53779",
    "iata": "LHR",
    "icao": "EGLL",
    "name": "London Heathrow Airport",
    "latitude": "51.469603",
    "longitude": "-0.453566",
    ...
  }
]

Abbreviated response. The ellipsis (…) represents additional airport fields omitted here and is not part of the actual JSON response.

View the full Airports API reference →

Request parameters

Look up a specific airport, find airports by location, or export the directory with these query parameters.

ParameterRequiredDefaultDescription
apikey YesNoneYour assigned API key. Get a free test API key.
iata ConditionalNoneThree-letter IATA airport code, such as LHR.
icao ConditionalNoneFour-letter ICAO airport code, such as EGLL.
city_code ConditionalNoneThree-letter IATA city code, such as LON, to find airports associated with a city.
country_code ConditionalNoneTwo-letter ISO country code, such as GB, to find airports in a country.
name ConditionalNoneAirport name or partial name, such as Heathrow.
dump Conditional0Set to 1 to export the database. Overrides the other lookup parameters; coverage filters still apply.
show_disabled No0Set to 1 to include inactive or disabled records. By default, only active records are returned.
response_type NoJSONResponse format: JSON, XML or CSV. CSV triggers a file download.
major_only No0Set to 1 to include only airports with commercial flights.

Provide at least one of iata, icao, city_code, country_code, name, or dump=1. Setting dump=1 overrides the other lookup parameters.

View all request parameters →

Available data

Use latitude and longitude together to position an airport, and retain its identifiers and name for matching records and labeling map markers.

FieldTypeExampleDescription
airhex_id Identifier53779Permanent Airhex record identifier for maintaining your local airport directory.
iata StringLHRThree-letter airport code for matching locations from booking data.
icao StringEGLLFour-letter airport identifier for matching aviation data sources.
name StringLondon Heathrow AirportAirport name for map labels, search results and itineraries.
latitude Numeric string51.469603Geographic latitude in decimal degrees. Convert to a number before passing it to mapping or distance-calculation code.
longitude Numeric string-0.453566Geographic longitude in decimal degrees. Preserve the sign when parsing or storing the value.

View all available data →

Common implementation tasks

Download coordinates for your airport map

Export active airports with commercial flights as CSV. Retain latitude, longitude, codes and names to build map markers from a local directory. Use major_only=0 if your product also needs other location types.

curl --get 'https://content.airhex.com/api/v3.7.10/airports/' \
  --data-urlencode 'apikey=YOUR_API_KEY' \
  --data-urlencode 'dump=1' \
  --data-urlencode 'major_only=1' \
  --data-urlencode 'response_type=CSV' \
  --output airport-coordinates.csv

Find coordinates for airports in a city

Use city_code=LON to retrieve airports associated with London. Read latitude and longitude from each record to show the individual airport locations, rather than placing every airport at the city center.

curl --get 'https://content.airhex.com/api/v3.7.10/airports/' \
  --data-urlencode 'apikey=YOUR_API_KEY' \
  --data-urlencode 'city_code=LON' \
  --data-urlencode 'major_only=1'

Retrieve coordinates using an ICAO code

Use icao when your data source identifies airports with four-letter codes. EGLL resolves to the same Heathrow record as an IATA lookup for LHR.

curl --get 'https://content.airhex.com/api/v3.7.10/airports/' \
  --data-urlencode 'apikey=YOUR_API_KEY' \
  --data-urlencode 'icao=EGLL'

What you can build

Airport maps and destination guides

Show where departure and arrival airports are located, with recognizable names and codes beside each marker.

Nearby-airport discovery

Use a local coordinate directory with your own distance calculations to help travelers explore airports near a selected destination.

Trip planning and location context

Compare airport locations with hotels or other trip destinations in your mapping tools, helping travelers understand where each part of their journey takes place.

Frequently asked questions

What format are the coordinates returned in?

latitude and longitude are separate fields containing decimal-degree values. In the JSON example they are numeric strings. Parse them as numbers when your mapping library requires numeric inputs, and preserve negative signs and the available decimal precision.

Which coordinate should I pass first to my map library?

Check the library’s expected order. Some interfaces take latitude followed by longitude, while others expect longitude followed by latitude. The API returns named fields so you can map each value explicitly instead of relying on an array order.

Does this endpoint find the nearest airport?

No. It looks up airports by the documented identifiers, name or location filters, or exports the directory. To find nearby airports, store the coordinates and perform a distance or spatial query in your application. There is no radius or nearest-airport request parameter on this endpoint.

Can I use the coordinates to estimate travel time to a hotel?

The coordinates can be inputs to your mapping or routing service. A straight-line distance is not a road distance or journey time. Use an appropriate routing provider and the relevant pickup or drop-off location when estimating a ground transfer.

Do the coordinates identify a terminal, gate or pickup point?

These fields describe the airport location. Do not treat them as terminal, gate, runway or passenger pickup coordinates. Use more specific location data when your product needs directions within an airport or a transfer meeting point.

How do I limit my map to airports with commercial flights?

Set major_only=1. Only active records are returned by default; show_disabled=1 includes inactive or disabled records if you need them. The full response includes major_airport, sub_type and active to help your application distinguish records before displaying them.

What should I do if a coordinate is missing or invalid?

Check both fields before creating a marker. Reject missing, blank or non-numeric values, and validate latitude between -90 and 90 and longitude between -180 and 180. Do not turn an empty field into zero; zero itself can be a valid coordinate. Keep unresolved records available for review instead of placing them at a guessed location.

Can I keep an airport coordinate directory in my own database?

Yes, with an appropriate GEO Essentials license. Use dump=1 and choose JSON, XML or CSV with response_type. Retain airhex_id and updated from the full response, and refresh your local records periodically so code, name and coordinate changes can be applied to the same airport identity.

Help travelers see where their journey begins and ends

Add clear airport locations to maps, destination search and trip planning, without maintaining your own airport coordinate directory.

Airports API →

Explore the complete airport dataset, including IATA and ICAO codes, names, city and country identifiers, time zones, coordinates, operational status and contact details. View all request parameters, coverage filters and response fields, with individual lookups and bulk exports in JSON, XML and CSV.

Airport IATA Codes API →

Look up airport IATA codes, match codes to airport names, cities and ICAO identifiers, or export an airport code directory with the Airhex API.

Airport ICAO Codes API →

Look up airport ICAO codes, match them to airport names and IATA codes, or export a directory to connect aviation and travel data with the Airhex API.

Airport Time Zone API →

Look up airport time zones by IATA or ICAO code. Retrieve time zone identifiers and UTC offsets to support local-time displays in your travel product.