Transport for Switzerland

Swiss train connections and schedules, no key needed

🚆 TransportUNMONITORED
AUTH NONECORS AGENT ?HTTPS COMMERCIAL ?

A friendly wrapper over Swiss public-transport timetables that returns connections, departures, and station lookups as JSON. Ask for a route between two towns and get platforms, times, and live delay data back. Keyless and CORS-enabled; throughput is bounded by the underlying timetable.search.ch limits.

HOW IT'S SCORED ⓘ
Status badge · for your READMEshipapis health badge: — · unmonitored
ON PROBE SCHEDULE

We probe a documented GET and expect 2xx JSON — full uptime and health score. Open provider docs ↗

Uptime historystarts after first probe

On our probe schedule. Uptime charts appear after the first check lands.

Example responsefrom provider docs — not verified by us
GET https://transport.opendata.ch/v1/connections?from=Zurich&to=Bern&limit=1

{
  "connections": [
    {
      "from": {
        "station": {
          "id": "8503000",
          "name": "Zürich HB"
        },
        "departure": "2026-07-05T12:32:00+0200",
        "platform": "32"
      },
      "to": {
        "station": {
          "name": "Bern"
        },
        "arrival": "2026-07-05T13:28:00+0200"
      },
      "duration": "00d00:56:00"
    }
  ]
}
Call itcurl · fetch · python
curl "https://transport.opendata.ch/v1/connections?from=Zurich&to=Bern&limit=1"
const res = await fetch("https://transport.opendata.ch/v1/connections?from=Zurich&to=Bern&limit=1");
const data = await res.json();
console.log(data);
import requests

res = requests.get("https://transport.opendata.ch/v1/connections?from=Zurich&to=Bern&limit=1")
print(res.json())
Endpoints · 3On scheduleFULL DOCS ↗
On schedule — GET /connections?from=Zurich&to=Bern&limit=1 awaits first probe
GET/connections?from=Zurich&to=Bern&limit=1PROBED

Swiss train connections and schedules, no key needed

GET/connections?limit=5

Connections — documented GET route.

GET/connections?page=1

Connections — documented GET route.

Machine-readable spec

We probe a documented GET and expect 2xx JSON — full uptime and health score. Export includes every documented route below.

Response-shape history

Not tracked yet. Shape-change history starts once this API joins our probe schedule.

Transport for Switzerland: common questions

Is Transport for Switzerland free to use?

Yes — Transport for Switzerland is a free transport API. Free tier: Free — no key required. Whether the free tier allows commercial use is unclear — check the provider docs.

Does Transport for Switzerland need an API key?

No — Transport for Switzerland needs no API key or signup. You can call it straight away; rate limits still apply (Bounded by timetable.search.ch limits (no fixed number published)).

Can I call Transport for Switzerland from the browser?

Yes — Transport for Switzerland returns CORS headers over HTTPS, so front-end code can fetch it directly with no backend proxy. Use the fetch snippet on this page, or hit "Run live" to try it now.

Is Transport for Switzerland up right now?

Transport for Switzerland is catalogued but not yet on our probe schedule, so we don't publish a live status for it. Check the provider's own status page or docs for its current state.