oneapi
Sign in
Mediu v1 / Avertizari

Warnings at a point

Which warning is active at a specific point rather than county-wide — useful where a warning covers only the mountainous part of a county.

GET
https://oneapi.ro/api/mediu/v1/avertizari/langa

Query parameters

NameTypeDescriptionAccepted values
latoptional number | null Latitude of the point (with lng). 43 – 49
lngoptional number | null Longitude of the point (with lat). 20 – 30
sirutaoptional integer | null The SIRUTA code of the place. Mutually exclusive with lat+lng. 1
laoptional string | null The moment you are asking about. Without it, now. e.g. 2024-06-15

How it behaves

  • Warnings are issued per COUNTY, not per point. The route resolves the point to the county it falls in and returns what is active there. The result holds for the whole county, not the exact spot — and the response says so, lest anyone assume we have a resolution the source does not.
  • The place is given in exactly one of two forms: siruta, OR lat+lng. Both at once is rejected.

What it is for

  • Find out whether a customer's address is in an area under warning, starting from coordinates.
  • Check a site identified by SIRUTA code, without knowing which county it is in.

Response structure

All fields below live inside data.

FieldTypeDescription
punct object The point used, with its source (coordinates given directly or derived from SIRUTA).
punct.lat number Latitude, in decimal degrees (WGS 84).
punct.lng number Longitude, in decimal degrees (WGS 84).
punct.sursa string siruta sau coordonate.
judet object The county the point falls in — the level warnings are actually issued at.
judet.cod string Code from the source code list — the key you filter on.
judet.nume string The name, exactly as the source publishes it.
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 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/langa?lat=45.70&lng=27.18
{
    "data": {
        "punct": {
            "lat": 45.7,
            "lng": 27.18,
            "sursa": "coordonate"
        },
        "judet": {
            "cod": "VN",
            "nume": "Vrancea"
        },
        "moment": "2026-10-06T23: 39: 45+03: 00",
        "acum": true,
        "inregistrari": 0,
        "nivel_maxim": null,
        "avertizari": [],
        "observatie": "Avertizările se emit pe JUDEȚ, nu pe punct. Punctul a fost rezolvat la județul în care cade, iar rezultatul e valabil pentru tot județul — nu pentru locul exact.",
        "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.
404negasitThe point falls in no county, or the SIRUTA code does not exist.
422validareNo place given, or both forms at once.
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": "No place given, or both forms at once.",
        "detalii": {
            "lat": [
                "The value sent does not satisfy the parameter rule."
            ]
        }
    }
}