oneapi
Sign in
Mediu v1 / Mediu

Air quality right now

The latest values from nearby stations, given by siruta or by lat + lng.

GET
https://oneapi.ro/api/mediu/v1/aer/acum

Query parameters

NameTypeDescriptionAccepted values
raza_kmoptional number | null Search radius, in kilometres. Defaults to 25, maximum 300. 1 – 300
limitaoptional integer | null How many stations to return, maximum 50. Defaults to 5. 1 – 50
latoptional number | null Latitude of the point. Requires lng. 41 – 50
lngoptional number | null Longitude of the point. Requires lat. 19 – 32
sirutaoptional integer | null SIRUTA code of the locality or UAT. Alternative to lat + lng. 1

How it behaves

  • Pollutants are not measured at the same stations. PM10 has 171 stations, NO2 149, SO2 116, CO 99, O3 83, and PM2.5 only 78. A ranking or a comparison between two pollutants is in fact comparing two different networks, not just two substances. When comparing counties on PM2.5, remember that some have no station measuring it at all.
  • Read vechime_ore before anything else. Current data is unverified and reaches us with a delay; a station may not have reported for days. The invechita field marks values older than 6 hours.
  • Stations within the radius are returned, ordered by distance, but only those that have values in the imported window. A station active in the metadata with no recent measurement does not appear — it would be an empty promise.
  • The value is measured at the station. A few kilometres away, or next to a busy road, it can be completely different. distanta_km and tip tell you how representative it is for the place you asked about.
  • The point is given either as siruta or as lat + lng — not both. The default radius is 25 km.
  • Do not compare an hourly value with the limit value without checking what the threshold applies to: referinta_legala.se_aplica_la says whether it is the daily mean, the hourly value or the 8-hour maximum.

What it is for

  • Show in an app what is being measured near the user, starting from their locality.
  • Decide whether an outdoor activity is reasonable today, on measured data rather than forecast.
  • Check whether a pollution complaint matches what the nearby stations show.

Response structure

FieldTypeDescription
data.punct object The point used, with its source: coordinates given directly or derived from a SIRUTA code.
data.punct.lat number Latitudinea folosită.
data.punct.lng number Longitudinea folosită.
data.punct.sursa string siruta sau coordonate.
data.punct.cod_siruta integer Codul rezolvat, când s-a dat siruta.
data.punct.nume string Denumirea entității rezolvate.
data.punct.nivel string localitate (punct precis) sau uat_centroid (centrul unei suprafețe).
data.raza_km number Raza aplicată.
data.statii_gasite integer Câte stații cu valori au fost găsite în rază.
data.rezultate[].statie object Stația, cu aceleași câmpuri ca la /aer/statii.
data.rezultate[].distanta_km number Distanța de la punct până la stație.
data.rezultate[].valori[] object Ultimele valori ale stației, cu aceeași structură ca ultimele_valori la /aer/statii/{cod}.
data.observatie string Avertismentul despre reprezentativitate și date neverificate.
data.sursa object Sursa și licența.
data.rezultate[].statie.cod string The European station code.
data.rezultate[].statie.cod_national string The code used by the national network.
data.rezultate[].statie.latitudine number Station latitude.
data.rezultate[].statie.longitudine number Station longitude.
data.rezultate[].statie.altitudine integer Elevation, in metres.
data.rezultate[].statie.tip string Station type: traffic, industrial, background. It matters for comparisons: a traffic station does not compare with a background one.
data.rezultate[].statie.zona string The area: urban, suburban, rural.
data.rezultate[].statie.localitate object The locality the station falls in, linked to the Locations nomenclature.
data.rezultate[].statie.judet string The county.
data.rezultate[].statie.judet_cod string The county vehicle code.
data.rezultate[].statie.prima_observatie string When data for the station begins.
data.rezultate[].statie.ultima_observatie null The last day with data. null means the station has no aggregated daily series.
data.rezultate[].statie.activa boolean Whether the station still reports.
data.rezultate[].valori[].poluant string The pollutant measured.
data.rezultate[].valori[].valoare integer The hourly value.
data.rezultate[].valori[].unitate string The unit of measure.
data.rezultate[].valori[].ora string The hour the value refers to.
data.rezultate[].valori[].vechime_ore integer How many hours old the value is. The source lags — this is not a live reading.
data.rezultate[].valori[].invechita boolean An explicit signal that the value is too old to be treated as "now".
meta.distanta object How the distances in the response are measured. Present on every response that carries a distance.
meta.distanta.metoda string Always linie_dreapta (straight line): the geodesic distance over the Earth's surface, not by road.
meta.distanta.detaliu string The same information, in words.

Response examples

GEThttps://oneapi.ro/api/mediu/v1/aer/acum?siruta=54984
{
    "data": {
        "punct": {
            "lat": 46.78,
            "lng": 23.559444444444,
            "sursa": "siruta",
            "cod_siruta": 54984,
            "nume": "Cluj-Napoca",
            "nivel": "localitate"
        },
        "raza_km": 25,
        "statii_gasite": 5,
        "rezultate": [
            {
                "statie": {
                    "cod": "RO0075A",
                    "cod_national": "RO-CJ-3",
                    "latitudine": 46.765425,
                    "longitudine": 23.550258,
                    "altitudine": 346,
                    "tip": "background",
                    "zona": "suburban",
                    "localitate": {
                        "cod_siruta": 54975,
                        "nume": "Cluj-Napoca"
                    },
                    "judet": "Cluj",
                    "judet_cod": "CJ",
                    "prima_observatie": "2006-01-01",
                    "ultima_observatie": null,
                    "activa": true,
                    "date": {
                        "are": false,
                        "zile": 0,
                        "prima_zi": null,
                        "ultima_zi": null,
                        "poluanti": []
                    }
                },
                "distanta_km": 1.8,
                "valori": [
                    {
                        "poluant": "CO",
                        "valoare": 0,
                        "unitate": "mg/m³",
                        "ora": "2025-02-14 22: 00: 00+02",
                        "vechime_ore": 14377,
                        "invechita": true,
                        "referinta_legala": {
                            "prag": 10,
                            "se_aplica_la": "maxim_8h",
                            "observatie": "Pragul se aplică maximului mediilor pe 8 ore, nu acestei valori izolate — decât dacă e chiar o valoare orară."
                        }
                    }
                ]
            }
        ],
        "observatie": "Valorile sunt măsurate la STAȚIE, nu în localitate: la câțiva kilometri, sau lângă o arteră aglomerată, pot fi complet diferite. Datele din fereastra curentă sunt NEVERIFICATE — operatorul le poate corecta sau invalida ulterior. Mediile zilnice se publică doar când ziua are cel puțin 18 ore valide; `ore_valide` spune întotdeauna pe ce se sprijină cifra. O zi cu `masurare: zilnica` e o probă de laborator pe 24 de ore (PM10/PM2,5 gravimetric): media e chiar proba, fără minim, maxim ori ore.",
        "sursa": {
            "nume": "European Environment Agency — Air Quality Download Service (date raportate de România prin RNMCA/ANPM)",
            "url": "https://eeadmz1-downloads-webapp.azurewebsites.net/",
            "licenta": "Politica de reutilizare a EEA — reutilizare permisă cu indicarea sursei."
        }
    },
    "meta": {
        "distanta": {
            "metoda": "linie_dreapta",
            "detaliu": "Distanţele sunt geodezice, în linie dreaptă pe suprafaţa Pământului (WGS84) — nu pe drum."
        }
    }
}

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 SIRUTA code could not be resolved to a coordinate.
422validareNo point given, both forms given at once, or one coordinate without its pair.
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 point given, both forms given at once, or one coordinate without its pair.",
        "detalii": {
            "raza_km": [
                "The value sent does not satisfy the parameter rule."
            ]
        }
    }
}