Historical air quality measurements (hourly averages)
This dataset provides historical data on air quality and related environmental parameters from selected environmental stations. The data are aggregated in hourly intervals and contain average values of concentrations of pollutants, dust particles and other quantities in the specified time range. The dataset is suitable for analytical purposes, long-term trend monitoring and air quality assessment. Graphical data visualization as well as the display of device locations on the map can be found on the public portal.
Publisher
Chief Executive's Office, City of Trnava
Format
API JSON
License
CC BY 4.0
Update frequency
Hourly
Last modified
3. 11. 2026
Download data
- API JSON Sample
- CSV Sample
- XML Sample
- API Documentation
Parameters
{
"itemId": [
"6a6c4a682d0f29b249afb333"
],
"type": "hourly",
"from": "2026-10-07T06:00:00.000Z",
"to": "2026-10-07T12:00:00.000Z"
}
itemId (array of string, required) – List of environmental station identifiers for which historical data should be loaded.
type (string, required) – Data aggregation method. The value "hourly" means hourly averages of measured quantities.
from (string, required, date and time) – Starting time point of the interval from which data should be loaded (inclusive). The format corresponds to date and time in UTC (e.g. "2025-12-09 07:00:00.000Z").
to (string, required, date and time) – End time point of the interval to which data should be loaded (inclusive).
Request
POST https://opendata.trnava.sk/api/datasets/v2/environment-monitoring/history
Answer
[
{
"timestamp": "2026-10-07T06:00:00.000Z",
"airTemperature": 11.6,
"airPressure": 1001.7,
"airHumidity": 66.125,
"airCo2": 457.25,
"roadStatus": [],
"fog": false
},
{
"timestamp": "2026-10-07T07:00:00.000Z",
"airTemperature": 15.475000000000001,
"airPressure": 1001.525,
"airHumidity": 49.25,
"airCo2": 407.75,
"roadStatus": [],
"fog": false
}
]
timestamp (string) – Timestamp to which the aggregated (hourly) measurement values relate.
airCo (number) – Average concentration of carbon monoxide (CO) for a given hour.
airSo2 (number) – Average concentration of sulfur dioxide (SO₂) for a given hour.
airPm1 (number) – Average concentration of PM1 particles for a given hour.
airPm4 (number) – Average concentration of PM4 particles for a given hour.
airPm10 (number) – Average concentration of PM10 particles for a given hour.
airPm25 (number) – Average concentration of PM2.5 particles for a given hour.
airNo2 (number) – Average concentration of nitrogen dioxide (NO₂) for a given hour.
roadStatus (array) – Optional information about the road condition at a given time (the field can be empty if data is not available).
fog (boolean) – Information about the occurrence of fog in the monitored time period (true = fog, false = no fog).
The response can contain multiple objects in the array, each representing one time period (e.g. one hour) in the specified interval.
Request
GET https://opendata.trnava.sk/api/datasets/v2/environment-monitoring/history?outputType=csv
Answer
"timestamp","airTemperature","airPressure","airHumidity","airCo2","roadStatus","fog"
"2026-10-07T06:00:00.000Z",11.6,1001.7,66.125,457.25,,false
"2026-10-07T07:00:00.000Z",15.475000000000001,1001.525,49.25,407.75,,false
timestamp (string) – Timestamp to which the aggregated (hourly) measurement values relate.
airCo (number) – Average concentration of carbon monoxide (CO) for a given hour.
airSo2 (number) – Average concentration of sulfur dioxide (SO₂) for a given hour.
airPm1 (number) – Average concentration of PM1 particles for a given hour.
airPm4 (number) – Average concentration of PM4 particles for a given hour.
airPm10 (number) – Average concentration of PM10 particles for a given hour.
airPm25 (number) – Average concentration of PM2.5 particles for a given hour.
airNo2 (number) – Average concentration of nitrogen dioxide (NO₂) for a given hour.
roadStatus (array) – Optional information about the road condition at a given time (the field can be empty if data is not available).
fog (boolean) – Information about the occurrence of fog in the monitored time period (true = fog, false = no fog).
The response can contain multiple objects in the array, each representing one time period (e.g. one hour) in the specified interval.
Request
GET https://opendata.trnava.sk/api/datasets/v2/environment-monitoring/history?outputType=xml
Answer
<root>
<item>
<timestamp>2026-10-07T06:00:00.000Z</timestamp>
<airTemperature>11.6</airTemperature>
<airPressure>1001.7</airPressure>
<airHumidity>66.125</airHumidity>
<airCo2>457.25</airCo2>
<roadStatus/>
<fog>false</fog>
</item>
<item>
<timestamp>2026-10-07T07:00:00.000Z</timestamp>
<airTemperature>15.475000000000001</airTemperature>
<airPressure>1001.525</airPressure>
<airHumidity>49.25</airHumidity>
<airCo2>407.75</airCo2>
<roadStatus/>
<fog>false</fog>
</item>
</root>
timestamp (string) – Timestamp to which the aggregated (hourly) measurement values relate.
airCo (number) – Average concentration of carbon monoxide (CO) for a given hour.
airSo2 (number) – Average concentration of sulfur dioxide (SO₂) for a given hour.
airPm1 (number) – Average concentration of PM1 particles for a given hour.
airPm4 (number) – Average concentration of PM4 particles for a given hour.
airPm10 (number) – Average concentration of PM10 particles for a given hour.
airPm25 (number) – Average concentration of PM2.5 particles for a given hour.
airNo2 (number) – Average concentration of nitrogen dioxide (NO₂) for a given hour.
roadStatus (array) – Optional information about the road condition at a given time (the field can be empty if data is not available).
fog (boolean) – Information about the occurrence of fog in the monitored time period (true = fog, false = no fog).
The response can contain multiple objects in the array, each representing one time period (e.g. one hour) in the specified interval.