Route Travel Time History
Returns the history of travel times, delays, average speed and traffic level for a single route between two travel time detectors in Trnava for the specified period. Data are in 5-minute intervals, optionally aggregated by hour, day, week, month or year.
Publisher
Transport Department, City of Trnava
Format
API JSON
License
CC BY 4.0
Update frequency
Continuously updated
Last modified
3. 11. 2026
Download data
- API JSON Sample
- CSV Sample
- XML Sample
- API Documentation
Parameters
{
"id": "c4da32cd-8cb0-43a8-891e-34d21340554c",
"from": "2026-10-14T06:00:00.000Z",
"to": "2026-10-14T06:30:00.000Z"
}
id – route identifier (route.id, e.g. from the Routes – Current Status dataset), required
from – start of the period (ISO 8601, UTC), required
to – end of the period (ISO 8601, UTC), required
period – optional aggregation: hour, day, week, month, year (average values per period, type = Statistics)
Request
POST https://opendata.trnava.sk/api/datasets/v1/travel-time/history/list
Answer
[
{
"_id": "6acf1b0bd7a0198a94c5960c",
"route": {
"id": "c4da32cd-8cb0-43a8-891e-34d21340554c",
"from": "6544f65e6290fa000100b9a7",
"to": "69ef7d11e3a65c0001d21045"
},
"interval": {
"from": "2026-10-14T06:00:00.000Z",
"to": "2026-10-14T06:05:00.000Z",
"minutes": 5
},
"type": "TravelTime",
"idealTime": 18000,
"travelTime": 21000,
"delay": 3000,
"trafficLevel": 1,
"speed": 31.37,
"calculation": {
"min": 21000,
"max": 21000,
"average": 21000,
"median": 21000,
"trips": 1,
"usedTrips": 1,
"vehicles": 0
}
},
{
"_id": "6acf1d4ad7a0198a94c596f5",
"route": {
"id": "c4da32cd-8cb0-43a8-891e-34d21340554c",
"from": "6544f65e6290fa000100b9a7",
"to": "69ef7d11e3a65c0001d21045"
},
"interval": {
"from": "2026-10-14T06:05:00.000Z",
"to": "2026-10-14T06:10:00.000Z",
"minutes": 5
},
"type": "TravelTime",
"idealTime": 18000,
"travelTime": 21000,
"delay": 3000,
"trafficLevel": 1,
"speed": 31.37,
"calculation": {
"min": 21000,
"max": 21000,
"average": 21000,
"median": 21000,
"trips": 1,
"usedTrips": 1,
"vehicles": 0
}
},
{
"_id": "6acf1e91d7a0198a94c597d5",
"route": {
"id": "c4da32cd-8cb0-43a8-891e-34d21340554c",
"from": "6544f65e6290fa000100b9a7",
"to": "69ef7d11e3a65c0001d21045"
},
"interval": {
"from": "2026-10-14T06:15:00.000Z",
"to": "2026-10-14T06:20:00.000Z",
"minutes": 5
},
"type": "TravelTime",
"idealTime": 18000,
"travelTime": 21000,
"delay": 3000,
"trafficLevel": 1,
"speed": 31.37,
"calculation": {
"min": 21000,
"max": 21000,
"average": 21000,
"median": 21000,
"trips": 1,
"usedTrips": 1,
"vehicles": 0
}
}
]
_id – record identifier
route.id – route identifier
route.from – ID of the route start detector
route.to – ID of the route end detector
interval.from – interval start (UTC)
interval.to – interval end (UTC)
interval.minutes – interval length in minutes
type – record type (TravelTime – calculated from vehicle passages, IdealTime – ideal time, Mixed – combined)
idealTime – ideal travel time in free-flow traffic (ms)
travelTime – travel time (ms)
delay – delay compared to the ideal time (ms)
trafficLevel – traffic level (1 – free flow, higher number = worse conditions)
speed – average speed on the route (km/h)
calculation.min – minimum measured travel time (ms)
calculation.max – maximum measured travel time (ms)
calculation.average – average travel time (ms)
calculation.median – median travel time (ms)
calculation.trips – number of recorded trips
calculation.usedTrips – number of trips used in the calculation
calculation.vehicles – number of vehicles
Request
GET https://opendata.trnava.sk/api/datasets/v1/travel-time/history/list?outputType=csv
Answer
"_id","route.id","route.from","route.to","interval.from","interval.to","interval.minutes","type","idealTime","travelTime","delay","trafficLevel","speed","calculation.min","calculation.max","calculation.average","calculation.median","calculation.trips","calculation.usedTrips","calculation.vehicles"
"6acf1b0bd7a0198a94c5960c","c4da32cd-8cb0-43a8-891e-34d21340554c","6544f65e6290fa000100b9a7","69ef7d11e3a65c0001d21045","2026-10-14T06:00:00.000Z","2026-10-14T06:05:00.000Z",5,"TravelTime",18000,21000,3000,1,31.37,21000,21000,21000,21000,1,1,0
"6acf1d4ad7a0198a94c596f5","c4da32cd-8cb0-43a8-891e-34d21340554c","6544f65e6290fa000100b9a7","69ef7d11e3a65c0001d21045","2026-10-14T06:05:00.000Z","2026-10-14T06:10:00.000Z",5,"TravelTime",18000,21000,3000,1,31.37,21000,21000,21000,21000,1,1,0
_id – record identifier
route.id – route identifier
route.from – ID of the route start detector
route.to – ID of the route end detector
interval.from – interval start (UTC)
interval.to – interval end (UTC)
interval.minutes – interval length in minutes
type – record type (TravelTime – calculated from vehicle passages, IdealTime – ideal time, Mixed – combined)
idealTime – ideal travel time in free-flow traffic (ms)
travelTime – travel time (ms)
delay – delay compared to the ideal time (ms)
trafficLevel – traffic level (1 – free flow, higher number = worse conditions)
speed – average speed on the route (km/h)
calculation.min – minimum measured travel time (ms)
calculation.max – maximum measured travel time (ms)
calculation.average – average travel time (ms)
calculation.median – median travel time (ms)
calculation.trips – number of recorded trips
calculation.usedTrips – number of trips used in the calculation
calculation.vehicles – number of vehicles
Request
GET https://opendata.trnava.sk/api/datasets/v1/travel-time/history/list?outputType=xml
Answer
<root>
<item>
<_id>6acf1b0bd7a0198a94c5960c</_id>
<route>
<id>c4da32cd-8cb0-43a8-891e-34d21340554c</id>
<from>6544f65e6290fa000100b9a7</from>
<to>69ef7d11e3a65c0001d21045</to>
</route>
<interval>
<from>2026-10-14T06:00:00.000Z</from>
<to>2026-10-14T06:05:00.000Z</to>
<minutes>5</minutes>
</interval>
<type>TravelTime</type>
<idealTime>18000</idealTime>
<travelTime>21000</travelTime>
<delay>3000</delay>
<trafficLevel>1</trafficLevel>
<speed>31.37</speed>
<calculation>
<min>21000</min>
<max>21000</max>
<average>21000</average>
<median>21000</median>
<trips>1</trips>
<usedTrips>1</usedTrips>
<vehicles>0</vehicles>
</calculation>
</item>
<item>
<_id>6acf1d4ad7a0198a94c596f5</_id>
<route>
<id>c4da32cd-8cb0-43a8-891e-34d21340554c</id>
<from>6544f65e6290fa000100b9a7</from>
<to>69ef7d11e3a65c0001d21045</to>
</route>
<interval>
<from>2026-10-14T06:05:00.000Z</from>
<to>2026-10-14T06:10:00.000Z</to>
<minutes>5</minutes>
</interval>
<type>TravelTime</type>
<idealTime>18000</idealTime>
<travelTime>21000</travelTime>
<delay>3000</delay>
<trafficLevel>1</trafficLevel>
<speed>31.37</speed>
<calculation>
<min>21000</min>
<max>21000</max>
<average>21000</average>
<median>21000</median>
<trips>1</trips>
<usedTrips>1</usedTrips>
<vehicles>0</vehicles>
</calculation>
</item>
<item>
<_id>6acf1e91d7a0198a94c597d5</_id>
<route>
<id>c4da32cd-8cb0-43a8-891e-34d21340554c</id>
<from>6544f65e6290fa000100b9a7</from>
<to>69ef7d11e3a65c0001d21045</to>
</route>
<interval>
<from>2026-10-14T06:15:00.000Z</from>
<to>2026-10-14T06:20:00.000Z</to>
<minutes>5</minutes>
</interval>
<type>TravelTime</type>
<idealTime>18000</idealTime>
<travelTime>21000</travelTime>
<delay>3000</delay>
<trafficLevel>1</trafficLevel>
<speed>31.37</speed>
<calculation>
<min>21000</min>
<max>21000</max>
<average>21000</average>
<median>21000</median>
<trips>1</trips>
<usedTrips>1</usedTrips>
<vehicles>0</vehicles>
</calculation>
</item>
</root>
_id – record identifier
route.id – route identifier
route.from – ID of the route start detector
route.to – ID of the route end detector
interval.from – interval start (UTC)
interval.to – interval end (UTC)
interval.minutes – interval length in minutes
type – record type (TravelTime – calculated from vehicle passages, IdealTime – ideal time, Mixed – combined)
idealTime – ideal travel time in free-flow traffic (ms)
travelTime – travel time (ms)
delay – delay compared to the ideal time (ms)
trafficLevel – traffic level (1 – free flow, higher number = worse conditions)
speed – average speed on the route (km/h)
calculation.min – minimum measured travel time (ms)
calculation.max – maximum measured travel time (ms)
calculation.average – average travel time (ms)
calculation.median – median travel time (ms)
calculation.trips – number of recorded trips
calculation.usedTrips – number of trips used in the calculation
calculation.vehicles – number of vehicles