Locations v1 / Demografie
Ranking
The top localities, administrative units or counties by a criterion. nivel picks the entity, dupa picks the criterion (population by default), judet narrows it, limita = how many (20 by default).
GET
https://oneapi.ro/api/locations/v1/clasament
Query parameters
NameTypeDescriptionAccepted values
nivelrequired
string
The entity being ranked.
localitateuatjudet
dupaoptional
string | null
The ranking criterion.
populatiesuprafatadensitatefirmedensitate_firme
judetoptional
string | null
Narrows to one county (registration prefix).
e.g. CJ
limitaoptional
integer | null
How many results.
1 – 100
How it behaves
- The top localities, administrative units or counties by the criterion in
dupa(population by default), optionally narrowed to one county. - Which criteria are available depends on the level, and the limit is one of the data, not of the route:
densitateanddensitate_firmedo not exist at locality level, because localities have no area in the nomenclature (only units and counties do). A density without a denominator would be an invented figure — hence a 422 listing the criteria possible for the requested level, rather than an approximate value. - Entities with no value for the requested criterion are excluded, not ranked as zero: a locality with no companies does not appear in a ranking by companies, but neither is it listed as „last, with 0".
valoareis the quantity the ranking was made on, andcriteriuandumin the response header say what it is and what it is measured in.populatiestays on every row as a reference point, even when the ranking is by something else.
What it is for
- A „top towns by population" widget on a dashboard or public page.
- Prioritising markets: ordering a county's units by population for expansion.
- Populating a „largest localities" dropdown for quick selection.
Response structure
FieldTypeDescription
data[].pozitie
integer
The rank in the list (1 = the highest value).
data[].cod
string
The key you continue with to that level's detail route: registration prefix for a county, SIRUTA code for a unit or locality.
data[].cod_siruta
integer
The entity's SIRUTA code — present at every level, so the shape does not vary.
data[].nume
string
The name of the entity.
data[].tip
string | null
The type of the ranked entity (municipality/town/commune or locality type);
null for a county.
data[].judet.cod
string
The registration prefix of the entity's county.
data[].judet.nume
string
The name of the entity's county.
data[].populatie
integer | null
The entity's population — a reference point, whatever the criterion.
data[].valoare
number
The value the ranking was made on, in the unit given by
um.
meta.actualizat
object
Prospețimea datelor pe domenii (dată ISO 8601).
Response examples
GEThttps://oneapi.ro/api/locations/v1/clasament?nivel=uat&judet=CJ&limita=5
{
"data": [
{
"pozitie": 1,
"cod": "54975",
"cod_siruta": 54975,
"nume": "Cluj-Napoca",
"tip": "municipiu",
"judet": {
"cod": "CJ",
"nume": "Cluj"
},
"populatie": 286598,
"valoare": 286598
}
],
"meta": {
"criteriu": "populatie",
"um": "locuitori",
"actualizat": {
"administrativ": "2026-08-15T16: 39: 14+03: 00",
"populatie": "2026-08-15T16: 40: 07+03: 00"
}
}
}
GEThttps://oneapi.ro/api/locations/v1/clasament?nivel=localitate&limita=10
{
"data": [
{
"pozitie": 1,
"cod": "179169",
"cod_siruta": 179169,
"nume": "București Sectorul 3",
"tip": "sector",
"judet": {
"cod": "B",
"nume": "București"
},
"populatie": 374737,
"valoare": 374737
}
],
"meta": {
"criteriu": "populatie",
"um": "locuitori",
"actualizat": {
"administrativ": "2026-08-15T16: 39: 14+03: 00",
"populatie": "2026-08-15T16: 40: 07+03: 00"
}
}
}
GEThttps://oneapi.ro/api/locations/v1/clasament?nivel=judet&dupa=densitate&limita=5
{
"data": [
{
"pozitie": 1,
"cod": "B",
"cod_siruta": 403,
"nume": "București",
"tip": null,
"judet": {
"cod": "B",
"nume": "București"
},
"populatie": 1716961,
"valoare": 7184.7
}
],
"meta": {
"criteriu": "densitate",
"um": "locuitori/km²",
"actualizat": {
"administrativ": "2026-08-15T16: 39: 14+03: 00",
"populatie": "2026-08-15T16: 40: 07+03: 00"
}
}
}
GEThttps://oneapi.ro/api/locations/v1/clasament?nivel=judet&dupa=densitate_firme&limita=5
{
"data": [
{
"pozitie": 1,
"cod": "B",
"cod_siruta": 403,
"nume": "București",
"tip": null,
"judet": {
"cod": "B",
"nume": "București"
},
"populatie": 1716961,
"valoare": 3035.1
}
],
"meta": {
"criteriu": "densitate_firme",
"um": "firme/km²",
"actualizat": {
"administrativ": "2026-08-15T16: 39: 14+03: 00",
"populatie": "2026-08-15T16: 40: 07+03: 00"
}
}
}
GEThttps://oneapi.ro/api/locations/v1/clasament?nivel=localitate&dupa=firme&judet=CJ&limita=5
{
"data": [
{
"pozitie": 1,
"cod": "54984",
"cod_siruta": 54984,
"nume": "Cluj-Napoca",
"tip": "resedinta_municipiu",
"judet": {
"cod": "CJ",
"nume": "Cluj"
},
"populatie": 286598,
"valoare": 114118
}
],
"meta": {
"criteriu": "firme",
"um": "firme",
"actualizat": {
"administrativ": "2026-08-15T16: 39: 14+03: 00",
"populatie": "2026-08-15T16: 40: 07+03: 00"
}
}
}
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. |
| 422 | parametri_invalizi | nivel missing or invalid. |
| 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": "parametri_invalizi",
"mesaj": "nivel missing or invalid.",
"detalii": {
"nivel": [
"The value sent does not satisfy the parameter rule."
]
}
}
}