Locations v1 / Ierarhie & dropdown-uri
Localities of an administrative unit
The paginated list of active localities in an administrative unit (identified by cod_siruta), ordered by population, optionally filtered by tip.
GET
https://oneapi.ro/api/locations/v1/uat/{uat}/localitati
Path parameters
NameTypeDescriptionExample
uatrequired
string
SIRUTA code of the administrative-territorial unit.
Query parameters
NameTypeDescriptionAccepted values
tipoptional
string
Filters on the locality type.
e.g. sate.g. resedinta_municipiue.g. sector
How it behaves
- 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.
- The unit's active localities, ordered by population descending (the seat comes first).
- The rows do NOT carry the
uatcontext (you know it from the path) — that appears only in the county-level shortcut. tipis a raw code; the readable names come from/nomenclatoare/tipuri. Filter with?tip=.
What it is for
- Populating the second „locality" dropdown once the user has picked the unit (commune or town).
- Listing the component villages of a commune for an administrative form.
- With
?tip=sat, listing only the component villages, excluding the seat.
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
Raw code for the locality type (village, seat…); the names are at /nomenclatoare/tipuri.
data[].populatie
integer | null
The locality's population — the sort key of the list.
data[].lat
number | null
Latitude (WGS 84) of the locality's point; polygons remain premium.
data[].lng
number | null
Longitude (WGS 84).
data[].nr_firme
integer
How many companies were ever registered here (equal to
total from the summary route).
data[].nr_firme_functiune
integer
How many exist NOW. ⚠️ The figure to put next to the name:
nr_firme also includes struck-off companies, 48.8% of the total.
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.
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).
Response examples
GEThttps://oneapi.ro/api/locations/v1/uat/55473/localitati?per_pagina=20
{
"data": [
{
"cod_siruta": 55491,
"nume": "Aghireșu-Fabrici",
"tip": "sat",
"populatie": 2622,
"lat": 46.866878,
"lng": 23.270057,
"nr_firme": 281,
"nr_firme_functiune": 137
}
],
"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"
},
"paginare": {
"pagina": 1,
"per_pagina": 20,
"total": 11,
"pagini": 1
}
}
}
GEThttps://oneapi.ro/api/locations/v1/uat/54975/localitati
{
"data": [
{
"cod_siruta": 54984,
"nume": "Cluj-Napoca",
"tip": "resedinta_municipiu",
"populatie": 286598,
"lat": 46.78,
"lng": 23.559444444444,
"nr_firme": 114118,
"nr_firme_functiune": 50565
}
],
"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"
},
"paginare": {
"pagina": 1,
"per_pagina": 20,
"total": 1,
"pagini": 1
}
}
}
GEThttps://oneapi.ro/api/locations/v1/uat/179132/localitati
{
"data": [
{
"cod_siruta": 179169,
"nume": "București Sectorul 3",
"tip": "sector",
"populatie": 374737,
"lat": 44.43527778,
"lng": 26.10277778,
"nr_firme": 141268,
"nr_firme_functiune": 58137
}
],
"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"
},
"paginare": {
"pagina": 1,
"per_pagina": 20,
"total": 6,
"pagini": 1
}
}
}
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 (tip); 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 (tip); detalii says which and why.",
"detalii": {
"uat": [
"The value sent does not satisfy the parameter rule."
]
}
}
}