Routes – Current Travel Times

Returns the current status of the selected routes between travel time detectors in Trnava: the latest travel time, ideal time, delay, average speed and traffic level. Only routes with data from the last 7.5 minutes are returned.

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

Parameters

{
  "ids": [
    "c4da32cd-8cb0-43a8-891e-34d21340554c",
    "22017359-8b07-453f-be3b-8f68cee4fabc",
    "18b95a8c935-691001841181001406725"
  ]
}
ids – array of route identifiers (route.id), required

Request

POST https://opendata.trnava.sk/api/datasets/v1/travel-time/routes/list

Answer

[
  {
    "_id": "6ad0c776d7a0198a94c6abc4",
    "route": {
      "id": "c4da32cd-8cb0-43a8-891e-34d21340554c",
      "from": "6544f65e6290fa000100b9a7",
      "to": "69ef7d11e3a65c0001d21045"
    },
    "interval": {
      "from": "2026-10-15T12:30:00.000Z",
      "to": "2026-10-15T12:35:00.000Z",
      "minutes": 5
    },
    "type": "TravelTime",
    "idealTime": 18000,
    "travelTime": 22000,
    "delay": 4000,
    "trafficLevel": 1,
    "speed": 29.95,
    "calculation": {
      "min": 22000,
      "max": 22000,
      "average": 22000,
      "median": 22000,
      "trips": 1,
      "usedTrips": 1,
      "vehicles": 0
    }
  },
  {
    "_id": "6ad0c65db157642bf86f57ac",
    "route": {
      "id": "18b95a8c935-691001841181001406725",
      "from": "6544f9886290fa000100c197",
      "to": "6544f37c6290fa000100b478"
    },
    "interval": {
      "from": "2026-10-15T12:20:00.000Z",
      "to": "2026-10-15T12:25:00.000Z"
    },
    "type": "Mixed",
    "idealTime": 345000,
    "travelTime": 355000,
    "delay": 10000,
    "trafficLevel": 1,
    "speed": 32.96
  },
  {
    "_id": "6ad0c776d7a0198a94c6abc3",
    "route": {
      "id": "22017359-8b07-453f-be3b-8f68cee4fabc",
      "from": "69ef7d12e3a65c0001d2107f",
      "to": "6544f69c6290fa000100badc"
    },
    "interval": {
      "from": "2026-10-15T12:30:00.000Z",
      "to": "2026-10-15T12:35:00.000Z",
      "minutes": 5
    },
    "type": "TravelTime",
    "idealTime": 201000,
    "travelTime": 231000,
    "delay": 30000,
    "trafficLevel": 1,
    "speed": 31.96,
    "calculation": {
      "min": 231000,
      "max": 231000,
      "average": 231000,
      "median": 231000,
      "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/routes/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"
"6ad0ca03d7a0198a94c6ad92","c4da32cd-8cb0-43a8-891e-34d21340554c","6544f65e6290fa000100b9a7","69ef7d11e3a65c0001d21045","2026-10-15T12:40:00.000Z","2026-10-15T12:45:00.000Z",5,"TravelTime",18000,23000,5000,1,28.64,23000,23000,23000,23000,1,1,0
"6ad0c9e2b157642bf86fadc2","18b95a8c935-691001841181001406725","6544f9886290fa000100c197","6544f37c6290fa000100b478","2026-10-15T12:35:00.000Z","2026-10-15T12:40:00.000Z",,"Mixed",345000,360500,15500,1,32.45,,,,,,,
_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/routes/list?outputType=xml

Answer

<root>
  <item>
    <_id>6ad0c776d7a0198a94c6abc4</_id>
    <route>
      <id>c4da32cd-8cb0-43a8-891e-34d21340554c</id>
      <from>6544f65e6290fa000100b9a7</from>
      <to>69ef7d11e3a65c0001d21045</to>
    </route>
    <interval>
      <from>2026-10-15T12:30:00.000Z</from>
      <to>2026-10-15T12:35:00.000Z</to>
      <minutes>5</minutes>
    </interval>
    <type>TravelTime</type>
    <idealTime>18000</idealTime>
    <travelTime>22000</travelTime>
    <delay>4000</delay>
    <trafficLevel>1</trafficLevel>
    <speed>29.95</speed>
    <calculation>
      <min>22000</min>
      <max>22000</max>
      <average>22000</average>
      <median>22000</median>
      <trips>1</trips>
      <usedTrips>1</usedTrips>
      <vehicles>0</vehicles>
    </calculation>
  </item>
  <item>
    <_id>6ad0c65db157642bf86f57ac</_id>
    <route>
      <id>18b95a8c935-691001841181001406725</id>
      <from>6544f9886290fa000100c197</from>
      <to>6544f37c6290fa000100b478</to>
    </route>
    <interval>
      <from>2026-10-15T12:20:00.000Z</from>
      <to>2026-10-15T12:25:00.000Z</to>
    </interval>
    <type>Mixed</type>
    <idealTime>345000</idealTime>
    <travelTime>355000</travelTime>
    <delay>10000</delay>
    <trafficLevel>1</trafficLevel>
    <speed>32.96</speed>
  </item>
  <item>
    <_id>6ad0c776d7a0198a94c6abc3</_id>
    <route>
      <id>22017359-8b07-453f-be3b-8f68cee4fabc</id>
      <from>69ef7d12e3a65c0001d2107f</from>
      <to>6544f69c6290fa000100badc</to>
    </route>
    <interval>
      <from>2026-10-15T12:30:00.000Z</from>
      <to>2026-10-15T12:35:00.000Z</to>
      <minutes>5</minutes>
    </interval>
    <type>TravelTime</type>
    <idealTime>201000</idealTime>
    <travelTime>231000</travelTime>
    <delay>30000</delay>
    <trafficLevel>1</trafficLevel>
    <speed>31.96</speed>
    <calculation>
      <min>231000</min>
      <max>231000</max>
      <average>231000</average>
      <median>231000</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