oneapi
Sign in
Locations v1 / Ierarhie & dropdown-uri

Full locality detail

⭐ Every free section at once (population breakdown + postal codes + alternative names) — the detail page in a single call. No geometry, no streets.

GET
https://oneapi.ro/api/locations/v1/localitati/{cod}/complet

Path parameters

NameTypeDescriptionExample
codrequired string SIRUTA code of the locality (e.g. 54984).

Query parameters

This route accepts no query parameters.

How it behaves

  • All the free sections at once (population breakdown + postal codes + alternative names). No geometry, no streets.

What it is for

  • Rendering a complete detail page with a single call, without assembling the include list by hand.
  • Filling a locality record (population breakdown + postal codes + alternative names) in a reporting backend.
  • Prefetching on locality selection, so the next screen already has every free section.

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.mediu string | null urban or rural.
data.geoname_id integer | null The locality's GeoNames id (an external bridge, not a key of ours).
data.wikidata_qid string | null The locality's Wikidata QID.
data.lat number | null Latitude (WGS 84).
data.lng number | null Longitude (WGS 84).
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.populatie integer | null Population (census).
data.populatie_detaliu object Male/female breakdown by year and source — always present here (not conditional on include).
data.populatie_detaliu.masculin integer | null Male population.
data.populatie_detaliu.feminin integer | null Female population.
data.populatie_detaliu.an integer | null The year of the source census.
data.populatie_detaliu.sursa string | null The population source (e.g. RPL2021).
data.coduri_postale[] string The locality's postal codes.opțional
data.nume_alternative[] array Exonyms and historical names — always present.
data.nume_alternative[].nume string The alternative name (exonym or historical form).
data.nume_alternative[].lang string | null The language of the name, where known.
data.nume_alternative[].tip string | null What kind of name it is: exonym, historical, variant.
data.nume_alternative[].sursa string | null Where the name comes from.
data.nume_alternative[].valabil_pana_la string | null The year the name stopped being official.
data.secundare[] array The hamlets and neighbourhoods attached to the locality (name, type, coordinates, distance to the locality).
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/localitati/54984/complet
{
    "data": {
        "cod_siruta": 54984,
        "nume": "Cluj-Napoca",
        "tip": "resedinta_municipiu",
        "mediu": "urban",
        "geoname_id": 681290,
        "wikidata_qid": "Q16898189",
        "lat": 46.78,
        "lng": 23.559444444444,
        "judet": {
            "cod": "CJ",
            "nume": "Cluj"
        },
        "uat": {
            "cod_siruta": 54975,
            "nume": "Cluj-Napoca",
            "tip": "municipiu"
        },
        "populatie": 286598,
        "populatie_detaliu": {
            "masculin": 134768,
            "feminin": 151830,
            "an": 2021,
            "sursa": "RPL2021"
        },
        "coduri_postale": [
            "400335"
        ],
        "nume_alternative": [
            {
                "nume": "Cluj-Napoca",
                "lang": "ro",
                "tip": "denumire_istorica",
                "sursa": "mfp",
                "valabil_pana_la": "2001-05-10"
            }
        ],
        "secundare": [
            {
                "nume": "Andrei Mureșanu",
                "tip": "cartier",
                "lat": 46.75922,
                "lng": 23.60612,
                "distanta_m": 4248,
                "sursa": "geonames"
            }
        ]
    },
    "meta": {
        "actualizat": {
            "administrativ": "2026-08-15T16: 39: 14+03: 00",
            "geo": "2026-09-04T21: 24: 20+03: 00",
            "populatie": "2026-08-15T16: 40: 07+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.
404negasitThe locality does not exist.
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": "negasit",
        "mesaj": "The locality does not exist."
    }
}