API – vehicles

Information on the current locations of public transport vehicles. See also: GTFS.

  • Endpoint: GET https://www.zditm.szczecin.pl/api/v1/vehicles
  • Data type: application/json
  • Update frequency: approx. every 10 seconds

Data structure

{
  "data": [
    {
      "line_id": 1,
      "line_number": "1",
      "line_type": "day",
      "line_subtype": "normal",
      "vehicle_type": "tram",
      "vehicle_id": 253,
      "vehicle_number": "121",
      "vehicle_model": "Tatra KT4Dt",
      "vehicle_low_floor": false,
      "vehicle_ticket_machine": {
        "cards": true,
        "coins": false
      },
      "vehicle_operator": "Tramwaje Szczecińskie",
      "route_variant_number": 12,
      "service": "001-02",
      "direction": "Osiedle Zawadzkiego",
      "previous_stop": "Brama Portowa",
      "next_stop": "Plac Żołnierza Polskiego",
      "latitude": 53.4282798767,
      "longitude": 14.5524597168,
      "bearing": 45,
      "velocity": 10,
      "punctuality": 0,
      "updated_at": "2023-05-27T10:05:41.000000Z"
    },

    ...

  ]
}
  • int line_id – unique line identifier (immutable)
  • string line_number – line designation (number) (may change)
  • string line_type – line type:
    • day – day service
    • night – night service
  • string line_subtype – line subtype:
    • normal – regular service
    • semi-fast – semi‑fast service
    • fast – fast service
    • replacement – replacement service
    • additional – additional service
    • special – special service
    • tourist – tourist service
  • string vehicle_type – vehicle type:
    • skm – SKM train
    • tram – tram
    • bus – bus
  • int vehicle_id – unique vehicle identifier
  • string vehicle_number – fleet number of the vehicle
  • Added string|null vehicle_model – vehicle model name
  • Added bool|null vehicle_low_floortrue if the vehicle is low-floor
  • Added object|null vehicle_ticket_machine – details of the ticket machine installed in the vehicle (if both sub-fields are false, no machine is fitted)
    • bool cards – accepts payment by card
    • bool coins – accepts payment by coins
  • Added string|null vehicle_operator – name of the operator owning the vehicle
  • int route_variant_number – the variant number of the route the vehicle is currently serving
  • string service – code of the duty (shift) the vehicle is operating
  • string|null direction – name of the current journey’s direction
  • string|null previous_stop – name of the previous stop
  • string|null next_stop – name of the next stop
  • float latitude – vehicle’s latitude
  • float longitude – vehicle’s longitude
  • Added int|null bearing – bearing in degrees from 0 to 360 (0 or 360 = north, 90 = east, etc., in 45° increments)
  • int velocity – current speed of the vehicle in km/h
  • int punctuality – deviation from the timetable in minutes (0 = on time; negative = late; positive = early)
  • string updated_at – timestamp of the last data update

General information

  1. The data are provided free of charge under the CC0 1.0 licence, for use in any context, with no prior notification required.
  2. Zarząd Dróg i Transportu Miejskiego w Szczecinie (Roads and Public Transport Authority in Szczecin) does not guarantee the accuracy or completeness of the data and accepts no liability for any loss or decisions made on the basis of this information.
  3. In any product using the data (application, website, publication, etc.), please cite the data source as Zarząd Dróg i Transportu Miejskiego w Szczecinie, or in abbreviated form, ZDiTM Szczecin; although not legally required, this is appreciated.
  4. Where possible, please include a link to this page or to the ZDiTM Szczecin homepage in any product using the data; this is also not a legal obligation.
  5. Clients should recognise and honour the HTTP headers Cache-Control and ETag.
  6. API requests are rate‑limited: 100 requests per minute per IP address across all endpoints. The X-RateLimit-Remaining header shows the number of remaining requests. Once the limit is reached, an HTTP 429 response is returned. The X-RateLimit-Reset header then contains a Unix timestamp for when the limit resets, and the Retry-After header shows the number of seconds until reset.
  7. If possible, please include in your User-Agent header information identifying the entity using the data (e.g. the name of your application, website, or its URL).
  8. In the event of excessive server load, ZDiTM Szczecin reserves the right to partially or fully block access to the API.