BYTETOOLS

IATAGeo API

Free airport coordinate lookup with no key: turn an IATA or ICAO airport code into latitude, longitude and airport name, or find the nearest airport to a point. Tested example included.

No API key requiredCORS enabledHTTPSFree tier

Endpoint tested and returned HTTP 200 on 2026-08-21

What is the IATAGeo API?

IATAGeo is a free, key-free API that converts airport codes to coordinates. Given an IATA three-letter or ICAO four-letter code it returns the airport's latitude, longitude and full name, and it can also work backwards to find the nearest airport to a coordinate.

This does one small job and does it without ceremony. Flight itineraries, booking exports and airline schedules identify airports by code, and turning JFK into 40.639447, -73.779317 is the step between that data and any map, distance calculation or route drawing. Most APIs that offer it bundle it with a paid aviation data product; this one is a single path segment.

Note that latitude and longitude come back as strings rather than numbers, so cast them before doing arithmetic — a great-circle distance computed on string values silently produces nonsense in loosely typed languages. Coverage follows the published IATA and ICAO code lists, which means scheduled commercial airports are reliable while small private strips and heliports may not be present at all.

Quick facts

Base URL
https://iatageo.com
Authentication
No key or account. Free public service; attribution is appreciated when results are republished.
Rate limit
No published quota. Airport coordinates never change, so cache them permanently rather than querying repeatedly.
Pricing
Free.
CORS
Enabled — callable directly from browser JavaScript
Official docs
Read the docs

How to use the IATAGeo API

Every request below was executed against the live API on 2026-08-21, and the response shown is the real body it returned — not an illustration.

1. Get coordinates for an airport by IATA code

GET https://iatageo.com/getLatLng/JFK

curl
curl 'https://iatageo.com/getLatLng/JFK'
JavaScript (fetch)
const res = await fetch("https://iatageo.com/getLatLng/JFK");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://iatageo.com/getLatLng/JFK", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200
{
  "latitude": "40.639447",
  "longitude": "-73.779317",
  "code": "JFK",
  "name": "John F Kennedy International Airport"
}

Parameters

ParameterTypeRequiredDescription
codepathRequired`/getLatLng/{code}` accepts an IATA three-letter or ICAO four-letter airport code. JFK
(reverse)pathOptional`/getCode/{lat}/{lng}` returns the nearest airport to a coordinate. 40.64/-73.78

Response fields

codestring
The airport code that was resolved, echoed back.
namestring
Full airport name, for example "John F Kennedy International Airport".
latitudestring
Latitude in decimal degrees — as a string, not a number.
longitudestring
Longitude in decimal degrees, likewise a string.

What you can build with the IATAGeo API

  • Plot a flight itinerary on a map from airport codes alone
  • Calculate great-circle distance between two airports
  • Draw route lines between origin and destination
  • Find the nearest airport to a customer or delivery address
  • Enrich a booking or expense dataset with airport locations

Common errors and how to fix them

404 for a valid-looking code

The code is a city code rather than an airport code, or the airport is not in the dataset.

Fix: City codes such as LON and NYC cover several airports and are not resolvable to one point. Use the specific airport code — LHR, JFK — instead.

Distance calculations return NaN

Latitude and longitude are strings.

Fix: Cast both to numbers before any arithmetic. This is the single most common mistake with this API.

A small aerodrome is missing

Coverage follows published IATA and ICAO lists, which exclude many private strips and heliports.

Fix: For general aviation coverage you need a dedicated aeronautical database. Scheduled commercial airports are the reliable subset here.

The nearest-airport lookup returns something implausible

It measures straight-line distance with no regard for whether the airport serves the area.

Fix: Filter the result yourself — proximity is not the same as usefulness when a cargo-only or military field happens to be closer.

IATAGeo API — frequently asked questions

Is IATAGeo free?

Yes, free with no key or registration. Airport coordinates are effectively static, so cache what you fetch rather than calling it repeatedly for the same code.

Does it accept ICAO codes as well as IATA?

Yes, both. IATA codes are the three-letter ones on your boarding pass; ICAO codes are four letters and used operationally. Either resolves to the same airport.

Can I find the nearest airport to a coordinate?

Yes, through the `/getCode/{lat}/{lng}` path. It returns the closest airport by straight-line distance, which is not always the one that actually serves the location.

Why are the coordinates strings?

It is simply how the service serialises them. Cast them to numbers before using them in distance or bearing calculations, or you will get string concatenation instead of arithmetic.

Tools that pair with this API

IATAGeo is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-21; always check the official documentation before relying on this API in production, as terms and limits can change.