Swiss public transport
v1.0.0Stations, 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.
| Parameter | Type | Description |
|---|---|---|
query * | string | Name 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.
| Parameter | Type | Description |
|---|---|---|
latitude * | number | WGS84 latitude, e.g. 46.9488. |
longitude * | number | WGS84 longitude, e.g. 7.4391. |
connections Connections
Public transport connections from A to B: times, platforms, delays, changes, lines.
| Parameter | Type | Description |
|---|---|---|
destination * | string | Destination, like origin. |
origin * | string | Start: station name or id, address or place. |
arrive_by | boolean | True if `time` is the latest arrival rather than departure. |
date | YYYY-MM-DD; today if left out. | |
limit | integer | Number of connections. |
time | hh:mm, Swiss local time; now if left out. | |
via | Up to two stations the journey must pass. |
departures Departures
The departure (or arrival) board of a station, with platforms, delays and cancellations.
| Parameter | Type | Description |
|---|---|---|
station * | string | Station name or id. |
arrivals | boolean | True for arrivals instead of departures. |
limit | integer | Number of entries. |
when | 'YYYY-MM-DD hh:mm', Swiss local time; now if left out. |