oneapi
Sign in
Utile v1 / Aeroporturi

Nearby airports

The nearest airports to a point, each with its distance. Use raza_km to narrow the search.

GET
https://oneapi.ro/api/utile/v1/aeroporturi/aproape

Query parameters

NameTypeDescriptionAccepted values
latrequired number REQUIRED. Latitude of the point. -90 – 90
lngrequired number REQUIRED. Longitude of the point. -180 – 180
raza_kmoptional number | null Search radius in km (default 150, max 2000). 1 – 2000
limitaoptional integer | null How many results (default 10, max 50). 1 – 50
tipoptional string | null Restrict to one aerodrome category. large_airportmedium_airportsmall_airportheliportseaplane_baseballoonportclosed
cu_iataoptional boolean | null 1 keeps only those with an IATA code. e.g. 1

How it behaves

  • Without cu_iata=1, the list includes heliports and private airstrips, which are often closer than the airport that is actually useful to you. You almost always want the filter.
  • The distance is straight-line from the point to the airport, not travel time. An airport 40 km away across a mountain can be farther in practice than one 90 km away along a motorway.
  • Airports without coordinates in the source never appear here. There are few, and they are generally closed aerodromes.

What it is for

  • Find the nearest commercial airport to a delivery address.
  • Compare two or three airports around a destination, to choose the route.
  • Check whether an area has any air access at all within the radius you accept.

Response structure

FieldTypeDescription
data.punct object The requested point.
data.punct.lat number Latitude, in decimal degrees (WGS 84).
data.punct.lng number Longitude, in decimal degrees (WGS 84).
data.raza_km integer The radius actually used.
data.inregistrari integer How many records the response holds.
data.aeroporturi[].ident string The OurAirports identifier — the only one guaranteed unique.
data.aeroporturi[].iata string The three-letter IATA code, or null.
data.aeroporturi[].icao string The four-letter ICAO code, or null.
data.aeroporturi[].nume string The name, exactly as the source publishes it.
data.aeroporturi[].tip string The aerodrome category.
data.aeroporturi[].municipiu string The municipality served.
data.aeroporturi[].tara.cod string Code from the source code list — the key you filter on.
data.aeroporturi[].tara.nume string The name, exactly as the source publishes it.
data.aeroporturi[].regiune.cod string Code from the source code list — the key you filter on.
data.aeroporturi[].regiune.nume string The name, exactly as the source publishes it.
data.aeroporturi[].continent string The continent it is on.
data.aeroporturi[].latitudine number Latitude, in decimal degrees (WGS 84).
data.aeroporturi[].longitudine number Longitude, in decimal degrees (WGS 84).
data.aeroporturi[].altitudine_ft integer Elevation in feet, as published by the source.
data.aeroporturi[].altitudine_m integer The same elevation converted to metres, so you need not convert it.
data.aeroporturi[].curse_regulate boolean Whether the source declares scheduled service.
data.aeroporturi[].wikipedia string Address of the Wikipedia article.
data.aeroporturi[].site string Address of the official website.
data.aeroporturi[].distanta_km number Great-circle distance from the point, rounded to 0.1 km.
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/aproape?lat=46.77&lng=23.59&cu_iata=1&limita=3
{
    "data": {
        "punct": {
            "lat": 46.77,
            "lng": 23.59
        },
        "raza_km": 150,
        "inregistrari": 3,
        "aeroporturi": [
            {
                "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/",
                "distanta_km": 7.5
            }
        ],
        "observatie": "Distanța e în linie dreaptă de la punct la aeroport, nu timp de drum. Fără `cu_iata=1`, lista include heliporturi și aerodromuri private, care sunt adesea mai apropiate decât aeroportul util.",
        "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.
422validareAn undeclared parameter or a value that fails validation (lat, lng, raza_km, limita, tip, cu_iata). The offending field is in detalii.
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": "An undeclared parameter or a value that fails validation (lat, lng, raza_km, limita, tip, cu_iata). The offending field is in detalii.",
        "detalii": {
            "lat": [
                "The value sent does not satisfy the parameter rule."
            ]
        }
    }
}