oneapi
Sign in
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."
        }
    }
}

Error codes

CodeSlugWhen it occurs
401neautentificatToken missing, invalid, expired or revoked.
403feature_indisponibilThe current plan does not include the feature the route depends on.
404negasitOne of the codes does not exist, or the airport has no coordinates in the source.
422validareA parameter failed validation (de, la); detalii says which and why.
429cota_depasitaThe 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."
            ]
        }
    }
}