Utile v1 / Aeroporturi
Distance between two airports
The great-circle distance between two airports, in kilometres and nautical miles, from their IATA or ICAO codes. It is the great-circle distance, not the length of the route actually flown.
GET
https://oneapi.ro/api/utile/v1/aeroporturi/distanta
Query parameters
NameTypeDescriptionAccepted values
derequired
string
REQUIRED. Departure airport code (IATA, ICAO or ident).
max 16 car.
larequired
string
REQUIRED. Destination airport code, different from the first.
max 16 car.
How it behaves
- This is great-circle distance — the shortest path over the Earth's surface. It is NOT the actual flight distance: routes skirt closed airspace and follow corridors, and wind changes the time, not the distance.
- It is also given in nautical miles, because that is the unit aviation uses for distance.
- The calculation uses a mean-radius sphere, not the ellipsoid. The error is under 0.5% on intercontinental distances — irrelevant for estimates, but worth knowing if you need geodetic precision.
What it is for
- Estimate the duration or cost of a flight from its distance.
- Compute the carbon footprint of a trip, which is reported per kilometre.
- Compare two alternative routes to the same destination.
Response structure
FieldTypeDescription
data.de
object
The departure airport, with all its fields.
data.de.ident
string
data.de.iata
string
data.de.icao
string
data.de.nume
string
The name, exactly as the source publishes it.
data.de.tip
string
data.de.municipiu
string
The municipality served.
data.de.tara.cod
string
Code from the source code list — the key you filter on.
data.de.tara.nume
string
The name, exactly as the source publishes it.
data.de.regiune.cod
string
Code from the source code list — the key you filter on.
data.de.regiune.nume
string
The name, exactly as the source publishes it.
data.de.continent
string
The continent it is on.
data.de.latitudine
number
Latitude, in decimal degrees (WGS 84).
data.de.longitudine
number
Longitude, in decimal degrees (WGS 84).
data.de.altitudine_ft
integer
data.de.altitudine_m
integer
data.de.curse_regulate
boolean
data.de.wikipedia
string
Address of the Wikipedia article.
data.de.site
string
Address of the official website.
data.la
object
The destination airport.
data.la.ident
string
data.la.iata
string
data.la.icao
string
data.la.nume
string
The name, exactly as the source publishes it.
data.la.tip
string
data.la.municipiu
string
The municipality served.
data.la.tara.cod
string
Code from the source code list — the key you filter on.
data.la.tara.nume
string
The name, exactly as the source publishes it.
data.la.regiune.cod
string
Code from the source code list — the key you filter on.
data.la.regiune.nume
string
The name, exactly as the source publishes it.
data.la.continent
string
The continent it is on.
data.la.latitudine
number
Latitude, in decimal degrees (WGS 84).
data.la.longitudine
number
Longitude, in decimal degrees (WGS 84).
data.la.altitudine_ft
integer
data.la.altitudine_m
integer
data.la.curse_regulate
boolean
data.la.wikipedia
string
Address of the Wikipedia article.
data.la.site
string
Address of the official website.
data.distanta_km
number
Great-circle distance in kilometres.
data.distanta_mile_nautice
number
The same distance in nautical miles.
data.observatie
string
A note on how to read the response: a computation convention or a limit of the data.
data.sursa.nume
string
Name of the official source.
data.sursa.url
string
Public address of the source.
data.sursa.licenta
string
The licence under which the source allows reuse.
meta.distanta.metoda
string
Always
linie_dreapta (straight line): the geodesic distance over the Earth's surface, not by road.
meta.distanta.detaliu
string
The same information, in words.
Response examples
GEThttps://oneapi.ro/api/utile/v1/aeroporturi/distanta?de=CLJ&la=OTP
{
"data": {
"de": {
"ident": "LRCL",
"iata": "CLJ",
"icao": "LRCL",
"nume": "Avram Iancu Cluj International Airport",
"tip": "large_airport",
"municipiu": "Cluj-Napoca",
"tara": {
"cod": "RO",
"nume": "România"
},
"regiune": {
"cod": "RO-CJ",
"nume": "Cluj County"
},
"continent": "EU",
"latitudine": 46.786042,
"longitudine": 23.685733,
"altitudine_ft": 1039,
"altitudine_m": 317,
"curse_regulate": true,
"wikipedia": "https://en.wikipedia.org/wiki/Cluj_International_Airport",
"site": "http://www.airportcluj.ro/"
},
"la": {
"ident": "LROP",
"iata": "OTP",
"icao": "LROP",
"nume": "Bucharest Henri Coandă International Airport",
"tip": "large_airport",
"municipiu": "Otopeni",
"tara": {
"cod": "RO",
"nume": "România"
},
"regiune": {
"cod": "RO-IF",
"nume": "Ilfov County"
},
"continent": "EU",
"latitudine": 44.571792,
"longitudine": 26.103285,
"altitudine_ft": 314,
"altitudine_m": 96,
"curse_regulate": true,
"wikipedia": "https://en.wikipedia.org/wiki/Henri_Coand%C4%83_International_Airport",
"site": "http://www.bucharestairports.ro/en/"
},
"distanta_km": 309.6,
"distanta_mile_nautice": 167.2,
"observatie": "Distanță ortodromică (cerc mare) între cele două puncte. NU e distanța de zbor reală: rutele ocolesc spații aeriene, iar vântul schimbă timpul, nu distanța.",
"sursa": {
"nume": "OurAirports — export public zilnic",
"url": "https://ourairports.com/data/",
"licenta": "Domeniu public („All data is released to the Public Domain\"), fără obligație de atribuire."
}
},
"meta": {
"distanta": {
"metoda": "linie_dreapta",
"detaliu": "Distanţele sunt geodezice, în linie dreaptă pe suprafaţa Pământului (WGS84) — nu pe drum."
}
}
}
GEThttps://oneapi.ro/api/utile/v1/aeroporturi/distanta?de=LRCL&la=LROP
{
"data": {
"de": {
"ident": "LRCL",
"iata": "CLJ",
"icao": "LRCL",
"nume": "Avram Iancu Cluj International Airport",
"tip": "large_airport",
"municipiu": "Cluj-Napoca",
"tara": {
"cod": "RO",
"nume": "România"
},
"regiune": {
"cod": "RO-CJ",
"nume": "Cluj County"
},
"continent": "EU",
"latitudine": 46.786042,
"longitudine": 23.685733,
"altitudine_ft": 1039,
"altitudine_m": 317,
"curse_regulate": true,
"wikipedia": "https://en.wikipedia.org/wiki/Cluj_International_Airport",
"site": "http://www.airportcluj.ro/"
},
"la": {
"ident": "LROP",
"iata": "OTP",
"icao": "LROP",
"nume": "Bucharest Henri Coandă International Airport",
"tip": "large_airport",
"municipiu": "Otopeni",
"tara": {
"cod": "RO",
"nume": "România"
},
"regiune": {
"cod": "RO-IF",
"nume": "Ilfov County"
},
"continent": "EU",
"latitudine": 44.571792,
"longitudine": 26.103285,
"altitudine_ft": 314,
"altitudine_m": 96,
"curse_regulate": true,
"wikipedia": "https://en.wikipedia.org/wiki/Henri_Coand%C4%83_International_Airport",
"site": "http://www.bucharestairports.ro/en/"
},
"distanta_km": 309.6,
"distanta_mile_nautice": 167.2,
"observatie": "Distanță ortodromică (cerc mare) între cele două puncte. NU e distanța de zbor reală: rutele ocolesc spații aeriene, iar vântul schimbă timpul, nu distanța.",
"sursa": {
"nume": "OurAirports — export public zilnic",
"url": "https://ourairports.com/data/",
"licenta": "Domeniu public („All data is released to the Public Domain\"), fără obligație de atribuire."
}
},
"meta": {
"distanta": {
"metoda": "linie_dreapta",
"detaliu": "Distanţele sunt geodezice, în linie dreaptă pe suprafaţa Pământului (WGS84) — nu pe drum."
}
}
}
GEThttps://oneapi.ro/api/utile/v1/aeroporturi/distanta?de=TSR&la=IAS
{
"data": {
"de": {
"ident": "LRTR",
"iata": "TSR",
"icao": "LRTR",
"nume": "Timișoara Traian Vuia International Airport",
"tip": "large_airport",
"municipiu": "Timişoara",
"tara": {
"cod": "RO",
"nume": "România"
},
"regiune": {
"cod": "RO-TM",
"nume": "Timiş County"
},
"continent": "EU",
"latitudine": 45.809898,
"longitudine": 21.3379,
"altitudine_ft": 348,
"altitudine_m": 106,
"curse_regulate": true,
"wikipedia": "https://en.wikipedia.org/wiki/Traian_Vuia_International_Airport",
"site": "http://www.aerotim.ro/"
},
"la": {
"ident": "LRIA",
"iata": "IAS",
"icao": "LRIA",
"nume": "Iaşi International Airport",
"tip": "large_airport",
"municipiu": "Iaşi",
"tara": {
"cod": "RO",
"nume": "România"
},
"regiune": {
"cod": "RO-IS",
"nume": "Iaşi County"
},
"continent": "EU",
"latitudine": 47.179633,
"longitudine": 27.621431,
"altitudine_ft": 411,
"altitudine_m": 125,
"curse_regulate": true,
"wikipedia": "https://en.wikipedia.org/wiki/Ia%C5%9Fi_International_Airport",
"site": "https://www.aeroport-iasi.ro/"
},
"distanta_km": 504.4,
"distanta_mile_nautice": 272.3,
"observatie": "Distanță ortodromică (cerc mare) între cele două puncte. NU e distanța de zbor reală: rutele ocolesc spații aeriene, iar vântul schimbă timpul, nu distanța.",
"sursa": {
"nume": "OurAirports — export public zilnic",
"url": "https://ourairports.com/data/",
"licenta": "Domeniu public („All data is released to the Public Domain\"), fără obligație de atribuire."
}
},
"meta": {
"distanta": {
"metoda": "linie_dreapta",
"detaliu": "Distanţele sunt geodezice, în linie dreaptă pe suprafaţa Pământului (WGS84) — nu pe drum."
}
}
}
GEThttps://oneapi.ro/api/utile/v1/aeroporturi/distanta?de=OTP&la=CDG
{
"data": {
"de": {
"ident": "LROP",
"iata": "OTP",
"icao": "LROP",
"nume": "Bucharest Henri Coandă International Airport",
"tip": "large_airport",
"municipiu": "Otopeni",
"tara": {
"cod": "RO",
"nume": "România"
},
"regiune": {
"cod": "RO-IF",
"nume": "Ilfov County"
},
"continent": "EU",
"latitudine": 44.571792,
"longitudine": 26.103285,
"altitudine_ft": 314,
"altitudine_m": 96,
"curse_regulate": true,
"wikipedia": "https://en.wikipedia.org/wiki/Henri_Coand%C4%83_International_Airport",
"site": "http://www.bucharestairports.ro/en/"
},
"la": {
"ident": "LFPG",
"iata": "CDG",
"icao": "LFPG",
"nume": "Charles de Gaulle International Airport",
"tip": "large_airport",
"municipiu": "Paris (Roissy-en-France, Val-d'Oise)",
"tara": {
"cod": "FR",
"nume": "Franța"
},
"regiune": {
"cod": "FR-IDF",
"nume": "Île-de-France"
},
"continent": "EU",
"latitudine": 49.00896,
"longitudine": 2.554117,
"altitudine_ft": 392,
"altitudine_m": 119,
"curse_regulate": true,
"wikipedia": "https://en.wikipedia.org/wiki/Charles_de_Gaulle_Airport",
"site": "http://www.aeroportsdeparis.fr/"
},
"distanta_km": 1851.1,
"distanta_mile_nautice": 999.5,
"observatie": "Distanță ortodromică (cerc mare) între cele două puncte. NU e distanța de zbor reală: rutele ocolesc spații aeriene, iar vântul schimbă timpul, nu distanța.",
"sursa": {
"nume": "OurAirports — export public zilnic",
"url": "https://ourairports.com/data/",
"licenta": "Domeniu public („All data is released to the Public Domain\"), fără obligație de atribuire."
}
},
"meta": {
"distanta": {
"metoda": "linie_dreapta",
"detaliu": "Distanţele sunt geodezice, în linie dreaptă pe suprafaţa Pământului (WGS84) — nu pe drum."
}
}
}
Error codes
| Code | Slug | When it occurs |
|---|---|---|
| 401 | neautentificat | Token missing, invalid, expired or revoked. |
| 403 | feature_indisponibil | The current plan does not include the feature the route depends on. |
| 404 | negasit | One of the codes does not exist, or the airport has no coordinates in the source. |
| 422 | validare | A parameter failed validation (de, la); detalii says which and why. |
| 429 | cota_depasita | The plan's monthly quota has been exceeded (see Retry-After). |
All errors share the same shape. eroare.cod is stable and is the value you should branch on in code — not the text in mesaj, which may change.
{
"eroare": {
"cod": "validare",
"mesaj": "A parameter failed validation (de, la); detalii says which and why.",
"detalii": {
"de": [
"The value sent does not satisfy the parameter rule."
]
}
}
}