Mediu v1 / Avertizari
Warning statistics
How often and how severe: warning counts by county, phenomenon and level over an interval. For comparing one area's exposure against another's.
GET
https://oneapi.ro/api/mediu/v1/avertizari/statistici
Query parameters
NameTypeDescriptionAccepted values
de_laoptional
string | null
Start of the interval (ISO 8601). Defaults to 30 days ago.
e.g. 2026-01-01e.g. 2024-06-15
pana_laoptional
string | null
End of the interval. Defaults to now.
e.g. 2024-06-15
judetoptional
string | null
The county vehicle code (e.g.
CJ).
max 4 car.
sirutaoptional
integer | null
The SIRUTA code of an administrative unit — resolved to its county.
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. true
How it behaves
- The product that emerges from ACCUMULATION: the source has no history, so it cannot answer "how many times".
zile_cumulateis not "how many days the county was under warning". It sums the validity windows clipped to the requested interval, so two simultaneous warnings in one day count as two. It is accumulated warning time, not distinct calendar days.- Windows are clipped at the interval edges: a warning starting before
de_lacontributes only the part inside. portocalii_sau_mai_rauis the useful risk figure: yellow is frequent and rarely operational.
What it is for
- Compare counties by how often they are under warning, for operational risk assessment.
- Document an area's exposure to severe weather in a study or an insurance policy.
- See which phenomenon type dominates a season's warnings.
Response structure
All fields below live inside data.
FieldTypeDescription
de_la
string
Start of the interval.
pana_la
string
End of the interval.
pe_judet[].judet_cod
string
The county vehicle code.
pe_judet[].judet
string
The county name.
pe_judet[].avertizari
integer
How many distinct warnings covered it.
pe_judet[].portocalii_sau_mai_rau
integer
How many were level 3 or worse.
pe_judet[].nivel_maxim
integer
The worst level reached in the interval.
pe_judet[].zile_cumulate
number
Accumulated warning time, in days. See the note — these are not distinct calendar days.
pe_tip[].tip_cod
integer
The phenomenon type code.
pe_tip[].tip
string
The type label.
pe_tip[].nivel_cod
integer
The level code.
pe_tip[].nivel
string
The level colour.
pe_tip[].avertizari
integer
How many warnings of that type and level occurred in the interval.
observatie
string
A note on how to read the response: a computation convention or a limit of the data.
acoperire
object
When our history begins. There is nothing before it: the source keeps no archive and we accumulate from the first import.
acoperire.istoricul_incepe_la
string
acoperire.observatie
string
A note on how to read the value next to it.
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.
Response examples
GEThttps://oneapi.ro/api/mediu/v1/avertizari/statistici
{
"data": {
"de_la": "2026-09-06 20: 39: 45",
"pana_la": "2026-10-06 20: 39: 45",
"pe_judet": [
{
"judet_cod": "CV",
"judet": "Covasna",
"avertizari": 2,
"portocalii_sau_mai_rau": 0,
"nivel_maxim": 2,
"zile_cumulate": 0.03
}
],
"pe_tip": [
{
"tip_cod": 1,
"tip": "wind",
"nivel_cod": 2,
"nivel": "yellow",
"avertizari": 2
}
],
"observatie": "`zile_cumulate` însumează ferestrele de valabilitate tăiate la intervalul cerut, deci DOUĂ avertizări simultane într-o zi contează ca două. Nu e „câte zile a fost județul sub avertizare\", ci cât timp de avertizare s-a acumulat.",
"acoperire": {
"istoricul_incepe_la": "2026-09-07 01: 57: 40+03",
"observatie": "Nu există date înainte de această dată: sursa nu păstrează arhivă, iar noi acumulăm de la primul import."
},
"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."
}
}
}
GEThttps://oneapi.ro/api/mediu/v1/avertizari/statistici?nivel_min=3&de_la=2026-01-01
{
"data": {
"de_la": "2025-12-31 22: 00: 00",
"pana_la": "2026-10-06 20: 39: 45",
"pe_judet": [],
"pe_tip": [],
"observatie": "`zile_cumulate` însumează ferestrele de valabilitate tăiate la intervalul cerut, deci DOUĂ avertizări simultane într-o zi contează ca două. Nu e „câte zile a fost județul sub avertizare\", ci cât timp de avertizare s-a acumulat.",
"acoperire": {
"istoricul_incepe_la": "2026-09-07 01: 57: 40+03",
"observatie": "Nu există date înainte de această dată: sursa nu păstrează arhivă, iar noi acumulăm de la primul import."
},
"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."
}
}
}
GEThttps://oneapi.ro/api/mediu/v1/avertizari/statistici?de_la=2024-06-15
{
"data": {
"de_la": "2024-06-14 21: 00: 00",
"pana_la": "2026-10-06 20: 39: 45",
"pe_judet": [
{
"judet_cod": "HR",
"judet": "Harghita",
"avertizari": 3,
"portocalii_sau_mai_rau": 0,
"nivel_maxim": 2,
"zile_cumulate": 1.38
}
],
"pe_tip": [
{
"tip_cod": 1,
"tip": "wind",
"nivel_cod": 2,
"nivel": "yellow",
"avertizari": 3
}
],
"observatie": "`zile_cumulate` însumează ferestrele de valabilitate tăiate la intervalul cerut, deci DOUĂ avertizări simultane într-o zi contează ca două. Nu e „câte zile a fost județul sub avertizare\", ci cât timp de avertizare s-a acumulat.",
"acoperire": {
"istoricul_incepe_la": "2026-09-07 01: 57: 40+03",
"observatie": "Nu există date înainte de această dată: sursa nu păstrează arhivă, iar noi acumulăm de la primul import."
},
"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."
}
}
}
GEThttps://oneapi.ro/api/mediu/v1/avertizari/statistici?pana_la=2024-06-15
{
"data": {
"de_la": "2026-09-06 20: 39: 45",
"pana_la": "2024-06-14 21: 00: 00",
"pe_judet": [],
"pe_tip": [],
"observatie": "`zile_cumulate` însumează ferestrele de valabilitate tăiate la intervalul cerut, deci DOUĂ avertizări simultane într-o zi contează ca două. Nu e „câte zile a fost județul sub avertizare\", ci cât timp de avertizare s-a acumulat.",
"acoperire": {
"istoricul_incepe_la": "2026-09-07 01: 57: 40+03",
"observatie": "Nu există date înainte de această dată: sursa nu păstrează arhivă, iar noi acumulăm de la primul import."
},
"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
| 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. |
| 422 | validare | An undeclared parameter or a value that fails validation (de_la, pana_la, judet, siruta, nivel, nivel_min, tip, include_anulate). The offending field is in detalii. |
| 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": "An undeclared parameter or a value that fails validation (de_la, pana_la, judet, siruta, nivel, nivel_min, tip, include_anulate). The offending field is in detalii.",
"detalii": {
"de_la": [
"The value sent does not satisfy the parameter rule."
]
}
}
}