oneapi
Sign in
Mediu v1 / Avertizari

Warnings for a county

The warnings active in a county, with the highest level reached. Use la to ask how things stood on a past date.

GET
https://oneapi.ro/api/mediu/v1/avertizari/judet/{cod}

Path parameters

NameTypeDescriptionExample
codrequired string County code, two letters.

Query parameters

NameTypeDescriptionAccepted values
laoptional string | null The moment you are asking about. Without it, now. e.g. 2026-09-01
sirutaoptional integer | null The SIRUTA code of a locality inside the county, to see only the warnings covering it. 1
niveloptional integer | null Only that exact level (2 yellow, 3 orange, 4 red). 1 – 4
nivel_minoptional integer | null Only from this level upwards — the filter you want for alerting. 1 – 4
tipoptional integer | null The phenomenon type code, from /avertizari/nomenclator. 1 – 20
include_anulateoptional boolean | null 1 also includes withdrawn warnings. Excluded by default. e.g. 1

How it behaves

  • Same response shape as the main route, with the county filter already applied.
  • Warnings are issued PER COUNTY, so this route is the source's real granularity — not an approximation.

What it is for

  • Show the weather state for a customer's county without filtering the whole list yourself.
  • Check whether a delivery scheduled tomorrow enters a county under warning.

Response structure

All fields below live inside data.

FieldTypeDescription
moment string The moment validity was computed against.
acum boolean true if you did not pass la, so the answer is about the present.
inregistrari integer How many warnings cover the county then.
nivel_maxim null The worst level in the county at the requested moment.
avertizari array How many warnings we have captured in total.
observatie string A note on how to read the response: a computation convention or a limit of the data.
sursa object The source: MeteoAlarm (EUMETNET), the channel through which the Romanian meteorological service distributes its warnings in standardised CAP format. Includes issuer and licence.
sursa.nume string Name of the official source.
sursa.url string Public address of the source.
sursa.emitent string The institution that issued the information.
sursa.licenta string The licence under which the source allows reuse.
sursa.observatie string What to know about the source before using the data.
avertizari[].identificator The CAP identifier, globally unique. It is the key you use to request the detail and to follow the same warning across requests.
avertizari[].tip_mesaj Alert, Update or Cancel. A cancellation deletes nothing here — that a warning existed and was withdrawn is itself information.
avertizari[].anulata Whether the warning was withdrawn by a later message.
avertizari[].inlocuieste The identifiers of the warnings this message supersedes.
avertizari[].tip The phenomenon type: numeric code plus the source label (wind, rain, snow-ice…).
avertizari[].nivel The awareness level: code, colour (yellow / orange / red) and the CAP severity. The code is stable, the label is readable — filter on the code.
avertizari[].urgenta How soon the phenomenon is expected (Immediate, Expected, Future).
avertizari[].certitudine How certain it is to occur (Observed, Likely, Possible).
avertizari[].titlu The official headline, in Romanian, exactly as issued by the meteorological service.
avertizari[].descriere The warning text. Neither translated nor altered by us.
avertizari[].instructiuni The issuer's recommendations, where present.
avertizari[].valabilitate.de_la When the phenomenon starts (CAP onset). When the source omits it, the effective time is used.
avertizari[].valabilitate.pana_la When the warning expires.
avertizari[].valabilitate.stare activa, viitoare, incheiata or anulata. COMPUTED on every request against the clock — not a column that could fall behind.
avertizari[].valabilitate.ore_ramase How many hours the warning still has to run; null once it has ended.
avertizari[].judete The counties covered: the source NUTS3 code, its own area name, plus our county with vehicle code and SIRUTA.
avertizari[].emis_la When it was issued by the meteorological service.
avertizari[].emitent Who issued it — ANM.
avertizari[].vazuta_prima_data When WE first captured it. The gap from emis_la shows how quickly we caught it.

Response examples

GEThttps://oneapi.ro/api/mediu/v1/avertizari/judet/CJ
{
    "data": {
        "moment": "2026-10-06T23: 39: 46+03: 00",
        "acum": true,
        "inregistrari": 0,
        "nivel_maxim": null,
        "avertizari": [],
        "observatie": "Nicio avertizare valabilă la momentul cerut. E rezultatul obișnuit: în cele mai multe zile nu există avertizări.",
        "sursa": {
            "nume": "MeteoAlarm (EUMETNET) — avertizări emise de Administrația Națională de Meteorologie",
            "url": "https://meteoalarm.org",
            "emitent": "Administrația Națională de Meteorologie (ANM)",
            "licenta": "MeteoAlarm: CC BY 4.0, cu atribuire către MeteoAlarm și ANM.",
            "observatie": "Avertizarea e emisă de ANM; MeteoAlarm e canalul EUMETNET prin care e distribuită în format CAP standardizat. Textul e cel oficial al ANM, netradus și nemodificat de noi."
        }
    }
}

Error codes

CodeSlugWhen it occurs
401neautentificatToken missing, invalid, expired or revoked.
403feature_indisponibilThe current plan does not include the feature the route depends on.
404negasitNothing exists for the cod in the path.
422validareAn undeclared parameter or a value that fails validation (la, siruta, nivel, nivel_min, tip, include_anulate). The offending field is in detalii.
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": "An undeclared parameter or a value that fails validation (la, siruta, nivel, nivel_min, tip, include_anulate). The offending field is in detalii.",
        "detalii": {
            "cod": [
                "The value sent does not satisfy the parameter rule."
            ]
        }
    }
}