oneapi
Sign in
Locations v1 / Proximitate & zone

Localities within a radius

The active localities within a radius (km) around a centre — either a point (lat/lng) or a locality (de=cod_siruta, which is excluded from the result). Ordered by distance, paginated. With ?include=secundare it also returns the hamlets and neighbourhoods in the radius (an unpaginated list, in meta.secundare).

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

Query parameters

NameTypeDescriptionAccepted values
latoptional number | null The latitude of the centre (or use de). -90 – 90
lngoptional number | null The longitude of the centre. -180 – 180
deoptional integer | null The cod_siruta of the centre locality (an alternative to lat/lng). e.g. 54984
raza_kmrequired number The radius, in km. 0.1 – 100
includelistoptional text secundare = hamlets and neighbourhoods within the radius (an unpaginated list, in meta.secundare). secundare

How it behaves

  • The centre is either a point (lat/lng) or a locality (de=cod_siruta, which is excluded from the result).
  • Ordered by distance; distanta_m is the geodesic distance to the centre.

What it is for

  • Working out which towns and communes fall within a warehouse's or shop's delivery radius.
  • „Nearby localities" suggestions when the customer picks their area.
  • Building the catchment area around a point of sale.

Response structure

FieldTypeDescription
data[].cod_siruta integer The SIRUTA code (the entity's public key).
data[].nume string The name of the entity.
data[].tip string Entity type (raw code; the full names are at /nomenclatoare/tipuri).
data[].judet.cod string The county's registration prefix.
data[].judet.nume string The name of the county.
data[].lat number Latitude (WGS 84).
data[].lng number Longitude (WGS 84).
data[].distanta_m integer The distance, in metres.
meta.paginare.pagina integer Pagina curentă.
meta.paginare.per_pagina integer Rezultate pe pagină.
meta.paginare.total integer Total rezultate.
meta.paginare.pagini integer Număr de pagini.
meta.actualizat object Prospețimea datelor pe domenii (dată ISO 8601).
meta.secundare array Hamlets and neighbourhoods within the radius (not paginated, separate from the page in data) — only with include=secundare.
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/aproape?lat=46.77&lng=23.59&raza_km=10
{
    "data": [
        {
            "cod_siruta": 54984,
            "nume": "Cluj-Napoca",
            "tip": "resedinta_municipiu",
            "judet": {
                "cod": "CJ",
                "nume": "Cluj"
            },
            "lat": 46.78,
            "lng": 23.559444444444,
            "distanta_m": 2585
        }
    ],
    "meta": {
        "actualizat": {
            "administrativ": "2026-08-15T16: 39: 14+03: 00",
            "geo": "2026-09-04T21: 24: 20+03: 00"
        },
        "paginare": {
            "pagina": 1,
            "per_pagina": 20,
            "total": 12,
            "pagini": 1
        },
        "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.
404negasitResursa cerută nu există.
422parametri_invalizithe centre or raza_km is missing.
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": "the centre or raza_km is missing.",
        "detalii": {
            "lat": [
                "The value sent does not satisfy the parameter rule."
            ]
        }
    }
}