Sum of vehicle counts by stations

This dataset provides aggregated counts of vehicles recorded by traffic counting stations over a selected time period. The result contains the total number of vehicles per station. Optionally, station name and location can be included. The dataset is suitable for traffic analysis, comparing locations, and monitoring traffic intensity trends.

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

{
  "period": "week",
  "itemIds": [
    "67d2fd832f2d1d00016bdf6a"
  ],
  "includeItemDetail": true
}
period (string, optional) – Time period for aggregation. Possible values:
  "day" – last 24 hours (default)
  "week" – last 7 days
  "month" – last 30 days
  "year" – last 12 months
itemIds (array of string, optional) – List of traffic station identifiers. If not provided, data for all available stations is returned.
includeItemDetail (boolean, optional) – If true, the response also includes station name and geographic position.

Note

Data is aggregated as a sum of totalCount values from the source collection.
Results are grouped by itemId (station).
Time range is dynamically calculated based on the period parameter.

Request

POST https://opendata.trnava.sk/api/datasets/v1/traffic-counters/vehicles/stations

Answer

[
    {
        "count": 2296,
        "itemId": "67d2fd832f2d1d00016bdf6a",
        "name": "CYC_Bratislavská",
        "position": {
            "type": "Point",
            "coordinates": [
                17.575643956661228,
                48.35456470935509
            ]
        }
    }
]
itemId (string) – Identifier of the traffic counting station.
count (number) – Total number of recorded vehicles within the selected time period.
name (string) – Name of the traffic station or device. Available only if includeItemDetail is set to true.
position (object) – Geographic location of the station. Available only if includeItemDetail is set to true.
position.type (string) – Geometry type (e.g. "Point").
position.coordinates (array of numbers) – Coordinates in format [longitude, latitude].

Each object in the array represents one station and the total number of vehicles recorded during the specified period.

Request

GET https://opendata.trnava.sk/api/datasets/v1/traffic-counters/vehicles/stations?outputType=csv

Answer

"count","itemId","name","position.type","position.coordinates.0","position.coordinates.1"
2296,"67d2fd832f2d1d00016bdf6a","CYC_Bratislavská","Point",17.575643956661228,48.35456470935509
itemId (string) – Identifier of the traffic counting station.
count (number) – Total number of recorded vehicles within the selected time period.
name (string) – Name of the traffic station or device. Available only if includeItemDetail is set to true.
position (object) – Geographic location of the station. Available only if includeItemDetail is set to true.
position.type (string) – Geometry type (e.g. "Point").
position.coordinates (array of numbers) – Coordinates in format [longitude, latitude].

Each object in the array represents one station and the total number of vehicles recorded during the specified period.

Request

GET https://opendata.trnava.sk/api/datasets/v1/traffic-counters/vehicles/stations?outputType=xml

Answer

<root>
  <item>
    <count>2296</count>
    <itemId>67d2fd832f2d1d00016bdf6a</itemId>
    <name>CYC_Bratislavská</name>
    <position>
      <type>Point</type>
      <coordinates>
        <item>17.575643956661228</item>
        <item>48.35456470935509</item>
      </coordinates>
    </position>
  </item>
</root>
itemId (string) – Identifier of the traffic counting station.
count (number) – Total number of recorded vehicles within the selected time period.
name (string) – Name of the traffic station or device. Available only if includeItemDetail is set to true.
position (object) – Geographic location of the station. Available only if includeItemDetail is set to true.
position.type (string) – Geometry type (e.g. "Point").
position.coordinates (array of numbers) – Coordinates in format [longitude, latitude].

Each object in the array represents one station and the total number of vehicles recorded during the specified period.