Traffic peak hours analysis
For the selected period and traffic counters the dataset returns the hour with the highest traffic volume in the morning (6–10), midday (10–15) and afternoon (15–20) peak together with the number of vehicles in that hour. Hours are given in local time and counts are summed over all days and counters in the selected period.
Publisher
Transport Department, 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
{
"itemIds": [
"6544fa3a6290fa000100c229"
],
"from": "2026-10-13T22:00:00.000Z",
"to": "2026-10-14T21:59:59.999Z"
}
from (string, required, ISO 8601) – Start of the time interval.
to (string, required, ISO 8601) – End of the time interval.
itemIds (array of strings, optional) – List of traffic counter identifiers; if omitted, all counters are included.
Request
POST https://opendata.trnava.sk/api/datasets/v2/traffic-counters/peak-traffic-analysis
Answer
[
{
"md": {
"hour": "14:00",
"total": 2244
},
"pm": {
"hour": "15:00",
"total": 2443
},
"am": {
"hour": "07:00",
"total": 2386
}
}
]
am – Morning peak (6:00–10:00).
am.hour – Hour with the highest volume (local time, format HH:00).
am.total – Number of vehicles in that hour (sum over the period and selected counters).
md – Midday peak (10:00–15:00), fields hour and total as for am.
pm – Afternoon peak (15:00–20:00), fields hour and total as for am.
Request
GET https://opendata.trnava.sk/api/datasets/v2/traffic-counters/peak-traffic-analysis?outputType=csv
Answer
"am.hour","am.total","md.hour","md.total","pm.hour","pm.total"
"07:00",2386,"14:00",2244,"15:00",2443
am – Morning peak (6:00–10:00).
am.hour – Hour with the highest volume (local time, format HH:00).
am.total – Number of vehicles in that hour (sum over the period and selected counters).
md – Midday peak (10:00–15:00), fields hour and total as for am.
pm – Afternoon peak (15:00–20:00), fields hour and total as for am.
Request
GET https://opendata.trnava.sk/api/datasets/v2/traffic-counters/peak-traffic-analysis?outputType=xml
Answer
<root>
<item>
<pm>
<hour>15:00</hour>
<total>2443</total>
</pm>
<md>
<hour>14:00</hour>
<total>2244</total>
</md>
<am>
<hour>07:00</hour>
<total>2386</total>
</am>
</item>
</root>
am – Morning peak (6:00–10:00).
am.hour – Hour with the highest volume (local time, format HH:00).
am.total – Number of vehicles in that hour (sum over the period and selected counters).
md – Midday peak (10:00–15:00), fields hour and total as for am.
pm – Afternoon peak (15:00–20:00), fields hour and total as for am.