API – lines
This is the documentation for version 2 of the API. Documentation for the deprecated version 1.
Information about public transport lines.
- Endpoint:
GET https://www.zditm.szczecin.pl/api/v2/lines?format=json|cbor - Data type: application/json (default) or application/cbor (when
format=cbor) - Update frequency: as required
Data structure
{
"data": [
{
"id": 1,
"number": "1",
"type": "DAY",
"subtype": "NORMAL",
"vehicle_type": "TRAM",
"on_demand": false,
"highlighted": false,
"sort_order": 1,
"updated_at": "2024-07-24T08:58:15.000000Z"
},
...
]
}- int
id– unique line identifier (immutable) - string
number– line designation (number) (may change) - string
type– line type:DAY– day serviceNIGHT– night service
- string
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
- bool
on_demand–trueif the line operates as an on-demand service - bool
highlighted–trueif the line is highlighted in orange on passenger information materials (runs on a diverted route or is a replacement service) - int
sort_order– ordering number to facilitate sorted presentation of lines (the numbering in this field need not be contiguous) - string
updated_at– timestamp of the last data update
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-ControlandETag. - API requests are rate‑limited: 100 requests per minute per IP address across all endpoints. The
X-RateLimit-Remainingheader shows the number of remaining requests. Once the limit is reached, an HTTP429response is returned. TheX-RateLimit-Resetheader then contains a Unix timestamp for when the limit resets, and theRetry-Afterheader shows the number of seconds until reset. - If possible, please include in your
User-Agentheader 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.
Migration from version 1
- Endpoint changed to:
GET https://www.zditm.szczecin.pl/api/v2/lines. - The returned values of the
type,subtype, andvehicle_typefields have changed and are now returned inUPPER_SNAKE_CASEformat. - CBOR format (application/cbor) is additionally supported via the
format=cborparameter.