oneapi
Sign in
Locations v1 / Educatie

Schools of a locality

The educational establishments in the requested locality itself — useful where a unit has schools across several villages and the question is about just one.

GET
https://oneapi.ro/api/locations/v1/localitati/{cod}/educatie

Path parameters

NameTypeDescriptionExample
codrequired string SIRUTA code of the locality (e.g. 54984).

Query parameters

NameTypeDescriptionAccepted values
per_paginaoptional text How many institutions the list returns (50 by default, 200 at most). e.g. 50
paginaoptional text The page, counted from 1. e.g. 1

How it behaves

  • Unlike the unit-level route, the counts here are strictly for the requested locality — useful because in a commune with several villages the institutions are not spread evenly.
  • The same rules apply: sumar separates institutions with legal personality from subordinate structures, and unitati is paginated.

What it is for

  • Finding out which schools exist in the requested village or locality itself, not across the whole commune.
  • Checking whether a village has its own kindergarten or the children travel to the neighbouring locality.

Response structure

FieldTypeDescription
data.localitate object The locality queried (SIRUTA code, name).
data.localitate.cod_siruta integer SIRUTA code of the territorial unit.
data.localitate.nume string The name, exactly as the source publishes it.
data.uat.cod_siruta integer SIRUTA code of the territorial unit.
data.uat.nume string The name, exactly as the source publishes it.
data.uat.tip string The type of unit (municipality/town/commune).
data.judet.cod_siruta integer SIRUTA code of the territorial unit.
data.judet.nume string The name, exactly as the source publishes it.
data.judet.cod_auto string Vehicle registration prefix of the county.
data.sumar object The counts for the locality: {unitati_pj, structuri_arondate, total}.
data.sumar.unitati_pj integer Institutions with legal personality (the school as an entity).
data.sumar.structuri_arondate integer Subordinate structures (premises, attached kindergartens).
data.sumar.total integer
data.pe_tip[].tip string
data.pe_tip[].nr integer Number of items in this group.
data.pe_mediu.urban integer
data.unitati[] array The paginated list of institutions in the locality.
data.unitati[].denumire string The name, exactly as the source publishes it.
data.unitati[].cod_siiir string
data.unitati[].cui integer Tax identification number, without the RO prefix.
data.unitati[].statut string The state the item is in at the source.
data.unitati[].tip string
data.unitati[].mediu string Area of residence (urban or rural).
data.unitati[].adresa string The address, in the form published by the source.
data.unitati[].an_scolar string
data.unitati[].localitate.nume string The name, exactly as the source publishes it.
data.unitati[].localitate.cod_siruta integer SIRUTA code of the territorial unit.
meta.paginare.pagina integer Current page, counted from 1.
meta.paginare.per_pagina integer How many records a page holds.
meta.paginare.total integer Total matching records, beyond the current page.
meta.paginare.pagini integer How many pages the list has.

Response examples

GEThttps://oneapi.ro/api/locations/v1/localitati/54984/educatie
{
    "data": {
        "localitate": {
            "cod_siruta": 54984,
            "nume": "Cluj-Napoca"
        },
        "uat": {
            "cod_siruta": 54975,
            "nume": "Cluj-Napoca",
            "tip": "municipiu"
        },
        "judet": {
            "cod_siruta": 127,
            "nume": "Cluj",
            "cod_auto": "CJ"
        },
        "sumar": {
            "unitati_pj": 147,
            "structuri_arondate": 53,
            "total": 200
        },
        "pe_tip": [
            {
                "tip": "Unitate de învățământ",
                "nr": 192
            }
        ],
        "pe_mediu": {
            "urban": 200
        },
        "unitati": [
            {
                "denumire": "COLEGIUL TERȚIAR NONUNIVERSITAR AL USAMV CLUJ-NAPOCA",
                "cod_siiir": "1262105561",
                "cui": 4288381,
                "statut": "AR",
                "tip": "Unitate de învățământ",
                "mediu": "urban",
                "adresa": "Calea Mănăștur nr. 3-5",
                "an_scolar": "2025-2026",
                "localitate": {
                    "nume": "Cluj-Napoca",
                    "cod_siruta": 54984
                }
            }
        ]
    },
    "meta": {
        "paginare": {
            "pagina": 1,
            "per_pagina": 50,
            "total": 200,
            "pagini": 4
        }
    }
}

Error codes

CodeSlugWhen it occurs
401neautentificatToken missing, invalid, expired or revoked.
403feature_indisponibilThe current plan does not include the feature the route depends on.
404negasitNo locality exists for the given SIRUTA code.
422validareA parameter failed validation (per_pagina, pagina); detalii says which and why.
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": "validare",
        "mesaj": "A parameter failed validation (per_pagina, pagina); detalii says which and why.",
        "detalii": {
            "cod": [
                "The value sent does not satisfy the parameter rule."
            ]
        }
    }
}