Locations v1 / Profil & comparație
Compare entities
⭐ The same quantities for several entities of the same level, side by side: population, area, density, companies and unemployment. Codes that do not exist are reported in negasite, not silently ignored.
GET
https://oneapi.ro/api/locations/v1/compara
Query parameters
NameTypeDescriptionAccepted values
nivelrequired
string
The level of the entities compared.
localitateuatjudet
codurilistoptional
text
The codes, comma-separated (registration prefix for a county, SIRUTA code for the rest).
e.g. CJe.g. ISe.g. 54975
How it behaves
- ⭐ The same quantities for 2–10 entities of the same level, side by side.
- Unknown codes end up in
negasite, they are not silently ignored — otherwise a mistyped code would vanish from a comparison without anyone noticing. If none of them exists, the response is 404. - At
nivel=localitate,densitateandsomajare absent: localities have no area in the nomenclature, and unemployment is published per unit, not below it. The fields are honestly missing rather than approximated from the parent entity. - INS statistics are deliberately excluded: 19 indicators × N entities would turn a sub-second response into several seconds. For those there are
/judete/{cod}/statistici/insand the county profile.
What it is for
- A comparison table between counties or towns on an analysis page.
- Choosing a location among a few candidates, on the same quantities.
- Checking a hunch („where is economic activity denser?") without N calls.
Response structure
FieldTypeDescription
data.nivel
string
The level requested.
data.entitati[].nivel
string
The entity level (the same for all).
data.entitati[].cod
string
The entity code.
data.entitati[].nume
string
The name of the entity.
data.entitati[].populatie
integer | null
The census population.
data.entitati[].suprafata_kmp
number | null
Area in km²;
null at locality level.
data.entitati[].densitate
number | null
Inhabitants per km²;
null at locality level.
data.entitati[].firme.total
integer
The total number of companies registered in the entity.
data.entitati[].firme.platitori_tva
integer
How many are VAT-registered.
data.entitati[].firme.densitate
number | null
Companies per km²;
null at locality level.
data.entitati[].somaj.numar
number | null
Registered unemployed at the latest month; absent at locality level.
data.entitati[].somaj.pondere
number | null
The share of labour resources, as a percentage.
data.entitati[].somaj.numitor
string | null
What the share is measured against.
data.entitati[].somaj.perioada.an
integer
The year of the latest published month.
data.entitati[].somaj.perioada.luna
integer
The month (1–12).
data.negasite[]
string
The codes that do not exist at the requested level.
meta.actualizat
object
Prospețimea datelor pe domenii (dată ISO 8601).
Response examples
GEThttps://oneapi.ro/api/locations/v1/compara?nivel=judet&coduri[]=CJ&coduri[]=IS
{
"data": {
"nivel": "judet",
"entitati": [
{
"nivel": "judet",
"cod": "CJ",
"nume": "Cluj",
"populatie": 679141,
"suprafata_kmp": 6666.8818,
"densitate": 101.9,
"firme": {
"total": 194068,
"platitori_tva": 26852,
"densitate": 29.11
},
"somaj": {
"numar": 5331,
"pondere": 1.2,
"numitor": "resurse de muncă",
"perioada": {
"an": 2026,
"luna": 7
}
}
}
],
"negasite": []
},
"meta": {
"actualizat": {
"administrativ": "2026-08-15T16: 39: 14+03: 00",
"populatie": "2026-08-15T16: 40: 07+03: 00"
}
}
}
GEThttps://oneapi.ro/api/locations/v1/compara?nivel=uat&coduri[]=54975&coduri[]=179132
{
"data": {
"nivel": "uat",
"entitati": [
{
"nivel": "uat",
"cod": "54975",
"nume": "Cluj-Napoca",
"populatie": 286598,
"suprafata_kmp": 174.8759,
"densitate": 1638.9,
"firme": {
"total": 114118,
"platitori_tva": 16184,
"densitate": 652.57
},
"somaj": {
"numar": 756,
"pondere": 0.4,
"numitor": "resurse de muncă",
"perioada": {
"an": 2026,
"luna": 7
}
}
}
],
"negasite": []
},
"meta": {
"actualizat": {
"administrativ": "2026-08-15T16: 39: 14+03: 00",
"populatie": "2026-08-15T16: 40: 07+03: 00"
}
}
}
GEThttps://oneapi.ro/api/locations/v1/compara?nivel=judet&coduri[]=B&coduri[]=CJ&coduri[]=TM
{
"data": {
"nivel": "judet",
"entitati": [
{
"nivel": "judet",
"cod": "B",
"nume": "București",
"populatie": 1716961,
"suprafata_kmp": 238.9761,
"densitate": 7184.7,
"firme": {
"total": 725317,
"platitori_tva": 101907,
"densitate": 3035.1
},
"somaj": {
"numar": 5404,
"pondere": 0.4,
"numitor": "resurse de muncă",
"perioada": {
"an": 2026,
"luna": 7
}
}
}
],
"negasite": []
},
"meta": {
"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. |
| 404 | negasit | None of the codes exists at the requested level. |
| 422 | validare | Fewer than 2 or more than 10 codes, or an unknown level. |
| 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": "Fewer than 2 or more than 10 codes, or an unknown level.",
"detalii": {
"nivel": [
"The value sent does not satisfy the parameter rule."
]
}
}
}