oneapi
Sign in
Locations v1 / Demografie

Demographics of an administrative unit

The population (total + male/female breakdown) and the density (inhabitants per km²) of an administrative unit (cod_siruta).

GET
https://oneapi.ro/api/locations/v1/uat/{cod}/demografie

Path parameters

NameTypeDescriptionExample
codrequired string SIRUTA code of the administrative-territorial unit (e.g. 54975 for Cluj-Napoca).

Query parameters

This route accepts no query parameters.

How it behaves

  • The official RPL2021 population (total + male/female) plus density (inhabitants per km²).

What it is for

  • Showing a commune's or town's population and density on the unit detail page.
  • Urban/rural segmentation by density, for pricing or delivery rules.
  • Weighting indicators per inhabitant at unit level.

Response structure

FieldTypeDescription
data.cod_siruta integer The SIRUTA code (the entity's public key).
data.nume string The name of the entity.
data.populatie.total integer | null Total population.
data.populatie.masculin integer | null Male population.
data.populatie.feminin integer | null Female population.
data.populatie.an integer | null The year of the source census.
data.populatie.sursa string | null The population source (e.g. RPL2021).
data.suprafata_kmp number | null Area, in km².
data.densitate number | null Inhabitants per km² (population / area).
meta.actualizat object Prospețimea datelor pe domenii (dată ISO 8601).

Response examples

GEThttps://oneapi.ro/api/locations/v1/uat/54975/demografie
{
    "data": {
        "cod_siruta": 54975,
        "nume": "Cluj-Napoca",
        "populatie": {
            "total": 286598,
            "masculin": 134768,
            "feminin": 151830,
            "an": 2021,
            "sursa": "RPL2021"
        },
        "suprafata_kmp": 174.8759,
        "densitate": 1638.9
    },
    "meta": {
        "actualizat": {
            "administrativ": "2026-08-15T16: 39: 14+03: 00",
            "populatie": "2026-08-15T16: 40: 07+03: 00"
        }
    }
}

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 administrative unit 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 administrative unit does not exist."
    }
}