Locations v1 / Ierarhie & dropdown-uri
Administrative unit detail
An administrative unit by cod_siruta, with the parent county, the seat (chainable) and the number of localities. Expandable with ?include=localitati,populatie,secundare (secundare = the hamlets and neighbourhoods in the unit). No geospatial data and no tax id here — those have dedicated routes.
GET
https://oneapi.ro/api/locations/v1/uat/{cod}
Path parameters
NameTypeDescriptionExample
codrequired
string
SIRUTA code of the administrative-territorial unit (e.g.
54975 for Cluj-Napoca).
Query parameters
NameTypeDescriptionAccepted values
includelistoptional
text
Expandable sections, comma-separated.
localitatipopulatiesecundare
How it behaves
- When
resedintaisnull,resedinta_notasays why. There are three cases, all genuine quirks of the administrative organisation rather than gaps in the data: Bucharest as a county and as a municipality (it is its own seat, and at locality level it has only its six districts), and Ilfov county, whose seat — Bucharest — lies outside it. - 227 of the 13,755 localities (1.65%) have no population figure — near-abandoned villages for which the 2021 census published no value (the smallest figure published anywhere in the country is 3). This is not a missing link: all 227 exist, with geometry and with a GeoNames identifier. County and administrative-unit figures are unaffected — they come from their own census rows, not from summing localities. Anyone who sums the localities themselves loses, nationwide, 96 people out of 19,053,815.
{cod}is the unit'scod_siruta.- No tax id and no geospatial data here — those live on dedicated routes (
/uat/{cod}/primarie,/uat/{cod}/geometrie). include=secundare(hamlets and neighbourhoods from OSM/GeoNames) has partial coverage and can come back empty for units with no such places on record.geoname_idandwikidata_qidare bridges to other datasets — the public key stayscod_siruta. The reverse trip (external identifier → entity) is at/referinte/{sursa}/{id}.
What it is for
- The detail page of a commune or town with its county, seat and population
- Resolving a cod_siruta into the full unit for display and labelling
- Loading the component localities in a single call (
include=localitati)
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 (stored as SIRUTA code 1/3).
data.geoname_id
integer | null
The unit's GeoNames id (an external bridge, not a key of ours).
data.wikidata_qid
string | null
The unit's Wikidata QID.
data.judet
object
The parent county (link upwards).
data.judet.cod
string
The county's registration prefix.
data.judet.nume
string
The name of the county.
data.resedinta
object
The seat, chainable.
data.resedinta.nume
string
The name of the seat locality.
data.resedinta.cod_siruta
integer
The SIRUTA code of the seat — chainable to /localitati/{cod}.
data.resedinta_nota
string | null
Why there is no seat. Appears only when
resedinta is null.
data.populatie
integer | null
Population (census).
data.suprafata_kmp
number | null
Area, in km².
data.nr_localitati
integer
How many localities the unit has.
data.populatie_detaliu
object
Present only with include=populatie.
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.localitati[]
array
Present only with include=localitati.
data.localitati[].cod_siruta
integer
The SIRUTA code of the component locality.
data.localitati[].nume
string
The name of the component locality.
data.localitati[].tip
string
The type of the component locality.
data.localitati[].populatie
integer | null
The population of the component locality.
data.secundare[]
array
Hamlets and neighbourhoods in the unit (name, type, coordinates, distance) — only with include=secundare.
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/uat/54975
{
"data": {
"cod_siruta": 54975,
"nume": "Cluj-Napoca",
"tip": "municipiu",
"mediu": "urban",
"geoname_id": 681290,
"wikidata_qid": "Q100188",
"judet": {
"cod": "CJ",
"nume": "Cluj"
},
"resedinta": {
"nume": "Cluj-Napoca",
"cod_siruta": 54984
},
"resedinta_nota": null,
"populatie": 286598,
"suprafata_kmp": 174.8759,
"nr_localitati": 1
},
"meta": {
"actualizat": {
"administrativ": "2026-08-15T16: 39: 14+03: 00",
"populatie": "2026-08-15T16: 40: 07+03: 00"
}
}
}
GEThttps://oneapi.ro/api/locations/v1/uat/54975?include=localitati,populatie
{
"data": {
"cod_siruta": 54975,
"nume": "Cluj-Napoca",
"tip": "municipiu",
"mediu": "urban",
"geoname_id": 681290,
"wikidata_qid": "Q100188",
"judet": {
"cod": "CJ",
"nume": "Cluj"
},
"resedinta": {
"nume": "Cluj-Napoca",
"cod_siruta": 54984
},
"resedinta_nota": null,
"populatie": 286598,
"suprafata_kmp": 174.8759,
"nr_localitati": 1,
"populatie_detaliu": {
"masculin": 134768,
"feminin": 151830,
"an": 2021,
"sursa": "RPL2021"
},
"localitati": [
{
"cod_siruta": 54984,
"nume": "Cluj-Napoca",
"tip": "resedinta_municipiu",
"populatie": 286598
}
]
},
"meta": {
"actualizat": {
"administrativ": "2026-08-15T16: 39: 14+03: 00",
"populatie": "2026-08-15T16: 40: 07+03: 00"
}
}
}
GEThttps://oneapi.ro/api/locations/v1/uat/54975?include=secundare
{
"data": {
"cod_siruta": 54975,
"nume": "Cluj-Napoca",
"tip": "municipiu",
"mediu": "urban",
"geoname_id": 681290,
"wikidata_qid": "Q100188",
"judet": {
"cod": "CJ",
"nume": "Cluj"
},
"resedinta": {
"nume": "Cluj-Napoca",
"cod_siruta": 54984
},
"resedinta_nota": null,
"populatie": 286598,
"suprafata_kmp": 174.8759,
"nr_localitati": 1,
"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",
"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
| Code | Slug | When it occurs |
|---|---|---|
| 401 | neautentificat | Token missing, invalid, expired or revoked. |
| 403 | feature_indisponibil | The current plan does not include the feature the route depends on. |
| 404 | negasit | The administrative unit does not exist. |
| 422 | validare | A parameter failed validation (include); detalii says which and why. |
| 429 | cota_depasita | The 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 (include); detalii says which and why.",
"detalii": {
"cod": [
"The value sent does not satisfy the parameter rule."
]
}
}
}