Swiss Public Transport API
by transport.opendata.ch
Transport
Added on December 1st, 2026
Visit transport.opendata.ch →
What it does
The Transport API from Opendata.ch gives Swiss public transport data: stops, connections from A to B and departure boards with platforms and delays, for example to plan a train trip from Lausanne to Basel. Call its REST endpoints and get JSON. Free, no key needed; there is no fixed rate limit, but frequent repeated requests are throttled. Cache answers and name opentransportdata.swiss as the source of the timetable data. An official MCP server at https://transport.opendata.ch/mcp lets AI agents look up stations, connections and departures.
At a glance
- API key
- Not needed · More APIs with no key
- Pricing
- Free, no key needed; there is no fixed rate limit, but frequent repeated requests are throttled.
- From the browser
- Yes (CORS)
- Formats
- JSON
- Interface
- REST, HTTP-GET, MCP
- Provider
- transport.opendata.ch
More information: https://transport.opendata.ch/docs.html
Is this your service? Show that it is listed
Put this badge on your website or in your README; it links to this page. About the badge
Example request
curl
curl 'https://transport.opendata.ch/v1/connections?from=Lausanne&to=Basel&limit=2'
JavaScript
const response = await fetch("https://transport.opendata.ch/v1/connections?from=Lausanne&to=Basel&limit=2");
const data = await response.json();
console.log(data);
Python
import requests
response = requests.get(
"https://transport.opendata.ch/v1/connections?from=Lausanne&to=Basel&limit=2",
timeout=30,
)
print(response.json())
The JavaScript works in a web page as well as in Node.js 18 or newer.