Swiss public transport

v1.0.0
ch.opendata/transport Checked 1 day ago Published 12 days ago

Stations, connections and departures of Swiss public transport, with real-time delays.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

find_stations Find stations

Find stations and stops by name. Returns their exact names and ids, best match first.

ParameterTypeDescription
query *stringName or part of a name, e.g. 'Bern' or 'Basel, Bank'.

stations_nearby Stops nearby

The stops closest to a point, with their distance in metres.

ParameterTypeDescription
latitude *numberWGS84 latitude, e.g. 46.9488.
longitude *numberWGS84 longitude, e.g. 7.4391.

connections Connections

Public transport connections from A to B: times, platforms, delays, changes, lines.

ParameterTypeDescription
destination *stringDestination, like origin.
origin *stringStart: station name or id, address or place.
arrive_bybooleanTrue if `time` is the latest arrival rather than departure.
dateYYYY-MM-DD; today if left out.
limitintegerNumber of connections.
timehh:mm, Swiss local time; now if left out.
viaUp to two stations the journey must pass.

departures Departures

The departure (or arrival) board of a station, with platforms, delays and cancellations.

ParameterTypeDescription
station *stringStation name or id.
arrivalsbooleanTrue for arrivals instead of departures.
limitintegerNumber of entries.
when'YYYY-MM-DD hh:mm', Swiss local time; now if left out.