Transport

Swiss public transport API

Licenses

The Transport API is free software under the MIT License, © 2012–2026 Opendata.ch: gitlab.com/opendata.ch/Transport.

Data

SourceUsed forTerms
Swiss national timetable (GTFS, GTFS-RT, HRDF)Timetable, real time, operator namesopentransportdata.swiss terms of use
Occupancy forecast of the railways (SBB, BLS, SOB, Thurbo, zb)capacity1st/capacity2nd, occupancy in /ojp20opentransportdata.swiss terms of use
Train formations (Train Formation Service of SKI+)/formation, the trains drawn in the connections exampleopentransportdata.swiss terms of use
National fare service NOVA (OJPFare, beta)Ticket prices of /fareopentransportdata.swiss terms of use
OpenStreetMap, Swiss extract by GeofabrikStreets for walks, tracks on the map, addresses and placesODbL 1.0, © OpenStreetMap contributors
sharedmobility.ch (Swiss Federal Office of Energy)Shared bikes, scooters and cars (GBFS)Open use, must provide the source (BY)
swisstopo national mapsBackground of the map exampleFree geodata of the Swiss Confederation (OGD)

Services beside the API

SoftwareUsed forLicense
MOTISJourney planner behind /connections, map tiles and place searchMIT
PostgreSQLTimetable databasePostgreSQL License
RedisCounters of the statistics pageRSALv2 / SSPLv1 / AGPLv3

In the browser

LibraryUsed forLicense
Leaflet 1.9.4Map exampleBSD-2-Clause
Tabler IconsIcons of the pages and the connection searchMIT
LucideTram icon of the connection searchISC
jQuery 4.1.0Statistics pageMIT
Chart.js 4.6.1, chartjs-plugin-zoom 2.2.0, chartjs-adapter-moment 1.0.1Charts of the statistics pageMIT
Moment.js 2.31.0, Hammer.js 2.0.8Time axis and zoom of the statistics pageMIT

Python packages 47, as installed in the running service

PackageVersionLicense
annotated-doc0.0.7MIT
annotated-types0.8.0MIT
anyio4.16.0MIT
asyncpg0.32.0Apache-2.0
attrs26.1.0MIT
certifi2026.11.20Mozilla Public License 2.0 (MPL 2.0)
cffi2.1.1MIT-0
click8.5.1BSD-3-Clause
cryptography50.0.2Apache-2.0 OR BSD-3-Clause
fastapi0.165.0MIT
gtfs-realtime-bindings3.0.0Apache Software License
h110.16.0MIT License
httpcore1.0.9BSD-3-Clause
httpcore22.16.2BSD-3-Clause
httptools0.9.0MIT
httpx0.28.1BSD License
httpx22.16.2BSD-3-Clause
idna3.20BSD-3-Clause
Jinja23.1.6BSD License
jsonschema4.26.0MIT
jsonschema-specifications2025.9.1MIT
MarkupSafe3.0.4BSD-3-Clause
mcp2.3.0MIT License
mcp-types2.3.0MIT License
opentelemetry-api1.45.2Apache-2.0
pip26.2.2MIT
protobuf7.36.23-Clause BSD License
pycparser3.12BSD-3-Clause
pydantic2.14.4MIT
pydantic_core2.50.5MIT
PyJWT2.15.1MIT
python-dotenv1.2.4BSD-3-Clause
python-multipart0.0.34Apache-2.0
PyYAML6.0.4MIT License
redis8.1.0MIT
referencing0.37.0MIT
rpds-py2026.9.1MIT
sse-starlette3.7.0BSD-3-Clause
starlette1.10.0BSD-3-Clause
transport-api0.1.0MIT
truststore0.10.5MIT
typing-inspection0.4.5MIT
typing_extensions4.16.0PSF-2.0
uvicorn0.54.0BSD-3-Clause
uvloop0.23.0Apache Software License, MIT License
watchfiles1.3.0MIT License
websockets17.4BSD-3-Clause