Docs › Places and transport
Airports API
Airport codes to airports, and airports by city.
Every airport in the world with an IATA code, plus every Indian airfield and heliport, from OurAirports. Indian airports carry their state code.
Airport for a code
GET/v1/airports/{code}
| Parameter | Description |
|---|---|
codepath, required | IATA code (MAA) or ICAO code (VOMM). |
curl
curl "https://api.dharun.dev/v1/airports/MAA"JavaScript
const response = await fetch("https://api.dharun.dev/v1/airports/MAA");
const body = await response.json();
if (!response.ok) throw new Error(body.error.message);
console.log(body.data);Python
import requests
response = requests.get("https://api.dharun.dev/v1/airports/MAA", timeout=10)
body = response.json()
if not response.ok:
raise RuntimeError(body["error"]["message"])
print(body["data"])Response
{
"data": {
"iata": "MAA",
"icao": "VOMM",
"ident": "VOMM",
"name": "Chennai International Airport",
"type": "large_airport",
"city": "Chennai",
"stateCode": "TN",
"country": "IN",
"countryName": "India",
"latitude": 12.990005,
"longitude": 80.169296,
"elevationFt": 52,
"scheduledService": true,
"wikipedia": "https://en.wikipedia.org/wiki/Chennai_International_Airport"
},
"meta": {
"source": {
"name": "OurAirports",
"url": "https://ourairports.com/data/",
"licence": "Public domain",
"version": "9509 airports kept",
"retrieved": "2026-10-13",
"attribution": "Airport data from OurAirports, released into the public domain."
}
}
}Search airports
GET/v1/airports
By name, city or code; airports with scheduled flights and larger airports first.
| Parameter | Description |
|---|---|
qquery | Name, city or code, 2 or more characters. |
countryquery | Two-letter ISO country code, such as IN. |
statequery | State code or name, for example TN or Tamil Nadu. |
typequery | Kind of airfield. One of: large_airport, medium_airport, small_airport, heliport, seaplane_base. |
limitquery | Results per page, 1 to 100. |
offsetquery | Results to skip. |
curl
curl "https://api.dharun.dev/v1/airports?q=chennai"JavaScript
const response = await fetch("https://api.dharun.dev/v1/airports?q=chennai");
const body = await response.json();
if (!response.ok) throw new Error(body.error.message);
console.log(body.data);Python
import requests
response = requests.get("https://api.dharun.dev/v1/airports?q=chennai", timeout=10)
body = response.json()
if not response.ok:
raise RuntimeError(body["error"]["message"])
print(body["data"])Response, with lists and long text shortened
{
"data": [
{
"iata": "MAA",
"icao": "VOMM",
"ident": "VOMM",
"name": "Chennai International Airport",
"type": "large_airport",
"city": "Chennai",
"stateCode": "TN",
"country": "IN",
"countryName": "India",
"latitude": 12.990005,
"longitude": 80.169296,
"elevationFt": 52,
"scheduledService": true,
"wikipedia": "https://en.wikipedia.org/wiki/Chennai_International_Airport"
},
{
"iata": null,
"icao": null,
"ident": "VOTX",
"name": "Tambaram Air Force Station",
"type": "small_airport",
"city": "Chennai",
"stateCode": "TN",
"country": "IN",
"countryName": "India",
"latitude": 12.9072,
"longitude": 80.121902,
"elevationFt": 90,
"scheduledService": false,
"wikipedia": "https://en.wikipedia.org/wiki/Tambaram_Air_Force_Station"
},
{
"iata": null,
"icao": null,
"ident": "IN-0260",
"name": "Chennai Military Hospital Helipad",
"type": "heliport",
"city": "Chennai",
"stateCode": "TN",
"country": "IN",
"countryName": "India",
"latitude": 13.0196,
"longitude": 80.1976,
"elevationFt": 52,
"scheduledService": false
}
],
"meta": {
"total": 4,
"limit": 20,
"offset": 0,
"source": {
"name": "OurAirports",
"url": "https://ourairports.com/data/",
"licence": "Public domain",
"version": "9509 airports kept",
"retrieved": "2026-10-13",
"attribution": "Airport data from OurAirports, released into the public domain."
}
}
}Data source
OurAirports, 9509 airports kept. Retrieved 2026-10-13. Licence: Public domain. Airport data from OurAirports, released into the public domain.
Using an AI assistant? Connect the MCP server and it can call this API by itself.