API – line trajectories
Information on the geographic routes of public transport lines.
Data is returned only for lines that operate services on the given day – and only for the route variants in force that day. Data is reset each day at 04:00.
- Endpoint:
GET https://www.zditm.szczecin.pl/api/v1/trajectories/{lineId}
(the{lineId}
parameter can be obtained via the Lines API – theid
field) - Data type: application/json (GeoJSON)
- Update frequency: once a day
Data structure
{
"type": "FeatureCollection",
"attributes": {
"line_id": 1,
"line_number": "1",
"line_type": "day",
"line_subtype": "normal",
"vehicle_type": "tram",
"updated_at": "2023-06-02T19:29:07.463152Z"
},
"features": [
{
"type": "Feature",
"properties": {
"route_variant_number": 11,
"route_variant_type": "default"
},
"geometry": {
"type": "LineString",
"coordinates": [
[
14.4884117153,
53.4571634728
],
...
]
}
},
...
]
}
- string
type
– alwaysFeatureCollection
- object
attributes
– object containing information about the line- int
line_id
– line identifier (immutable) - string
line_number
– line designation (number) (may change) - string
line_type
– line type:day
– day servicenight
– night service
- string
line_subtype
– line subtype:normal
– regular servicesemi-fast
– semi-fast servicefast
– fast servicereplacement
– replacement serviceadditional
– additional servicespecial
– special servicetourist
– tourist service
- string
vehicle_type
– vehicle type:skm
– SKM traintram
– trambus
– bus
- string
updated_at
– timestamp of the last data update
- int
- array
features
– array containing each route variant’s geometry- string
type
– alwaysFeature
- object
properties
– object with details of this variant:- int
route_variant_number
– variant number (odd = outbound, even = return) - string
route_variant_type
– variant type:default
– default (primary) routenormal
– regular routeother
– other route (depot access or diversion)
- int
- object
geometry
– object containing the route’s coordinates:- string
type
– alwaysLineString
- array
coordinates
– array of [longitude, latitude] pairs for each point along the route
- string
- string
General information
- The data are provided free of charge under the CC0 1.0 licence, for use in any context, with no prior notification required.
- 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.
- 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.
- 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.
- Clients should recognise and honour the HTTP headers
Cache-Control
andETag
. - 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 HTTP429
response is returned. TheX-RateLimit-Reset
header then contains a Unix timestamp for when the limit resets, and theRetry-After
header shows the number of seconds until reset. - 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). - In the event of excessive server load, ZDiTM Szczecin reserves the right to partially or fully block access to the API.