oneapi
Sign in
Locations v1 / Geo & reverse

Reverse geocoding

From a point (lat/lng) → the region, county and administrative unit containing it, plus the nearest locality. With ?complet=1 it adds the nearest street and address (OSM). With ?include=secundare it adds the hamlets and neighbourhoods near the point. A point outside every unit → data null.

GET
https://oneapi.ro/api/locations/v1/reverse

Query parameters

NameTypeDescriptionAccepted values
latrequired number Latitude, WGS 84 (-90…90). -90 – 90
lngrequired number Longitude, WGS 84 (-180…180). -180 – 180
completoptional boolean | null With 1, adds the nearest street and address (OSM). e.g. 1
includelistoptional text secundare = hamlets and neighbourhoods near the point (≤3 km). secundare

How it behaves

  • Point-in-polygon against the official boundaries (ANCPI): it finds the administrative unit containing the point, then the county and region, and the nearest locality.
  • A point outside every unit (at sea, abroad) → data: null, status 200.

What it is for

  • Auto-filling county and locality in a form from a pin dropped on a map.
  • Enriching a lead with its administrative location from its coordinates.
  • Assigning GPS events to a territory (county/unit) for reporting.

Response structure

FieldTypeDescription
data.regiune.cod string The NUTS-2 code of the region.
data.regiune.nume string The name of the region.
data.judet.cod string The county's registration prefix.
data.judet.nume string The name of the county.
data.uat.cod_siruta integer The SIRUTA code of the administrative unit — chainable to /uat/{cod}.
data.uat.nume string The name of the administrative unit.
data.uat.tip string The type of unit (municipality/town/commune).
data.localitate.cod_siruta integer The locality's SIRUTA code — chainable to /localitati/{cod}.
data.localitate.nume string The name of the locality.
data.localitate.tip string The type of locality.
data.localitate.distanta_m integer Distance to the returned locality, in metres.
data.strada_apropiata object Only with complet=1 (an OSM fact).
data.strada_apropiata.id integer The street's internal id — the key for /strazi/{id}.
data.strada_apropiata.nume string The name of the street.
data.strada_apropiata.tip string The thoroughfare type (street, boulevard, way…).
data.strada_apropiata.localitate.cod_siruta integer The locality's SIRUTA code — chainable to /localitati/{cod}.
data.strada_apropiata.localitate.nume string The name of the locality.
data.strada_apropiata.distanta_m integer Distance from the point to the street, in metres.
data.adresa_apropiata object Only with complet=1 (an OSM fact).
data.adresa_apropiata.numar string The house number of the address point.
data.adresa_apropiata.strada.id integer The internal id of the address's street.
data.adresa_apropiata.strada.nume string The name of the address's street.
data.adresa_apropiata.localitate.cod_siruta integer The locality's SIRUTA code — chainable to /localitati/{cod}.
data.adresa_apropiata.localitate.nume string The name of the locality.
data.adresa_apropiata.cod_postal string | null The postal code of the address point.
data.adresa_apropiata.lat number Latitude (WGS 84).
data.adresa_apropiata.lng number Longitude (WGS 84).
data.adresa_apropiata.distanta_m integer Distance from the point to the address, in metres.
data.secundare[] array Hamlets and neighbourhoods near the point — only with include=secundare (distance measured to the point).
data.secundare[].nume string The name of the hamlet or neighbourhood.
data.secundare[].tip string catun or cartier.
data.secundare[].lat number | null Latitude of the secondary place (WGS 84).
data.secundare[].lng number | null Longitude of the secondary place (WGS 84).
data.secundare[].distanta_m integer | null Distance to the parent locality, in metres.
data.secundare[].sursa string Where the secondary place comes from: osm or geonames.
meta.actualizat object Prospețimea datelor pe domenii (dată ISO 8601).
meta.distanta object How the distances in the response are measured. Present on every response that carries a distance.
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/locations/v1/reverse?lat=46.77&lng=23.59
{
    "data": {
        "regiune": {
            "cod": "RO11",
            "nume": "Nord-Vest"
        },
        "judet": {
            "cod": "CJ",
            "nume": "Cluj"
        },
        "uat": {
            "cod_siruta": 54975,
            "nume": "Cluj-Napoca",
            "tip": "municipiu"
        },
        "localitate": {
            "cod_siruta": 54984,
            "nume": "Cluj-Napoca",
            "tip": "resedinta_municipiu",
            "distanta_m": 2585
        }
    },
    "meta": {
        "actualizat": {
            "administrativ": "2026-08-15T16: 39: 14+03: 00",
            "geo": "2026-09-04T21: 24: 20+03: 00"
        },
        "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.
422parametri_invalizilat/lng missing or out of range.
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": "parametri_invalizi",
        "mesaj": "lat/lng missing or out of range.",
        "detalii": {
            "lat": [
                "The value sent does not satisfy the parameter rule."
            ]
        }
    }
}