LOGBOOK

HELP

Quiz Entry - updated: 2026.07.14

How does the Open Transport API /stationboard endpoint work, and how do station, id, and limit interact?

/stationboard returns the next connections leaving a given station — you identify the station by name or by id, and limit caps how many departures come back.

This is the display step: once the user picked a station, you fetch its upcoming departures.

http://transport.opendata.ch/v1/stationboard?station=Zurich&limit=15
Parameter Required Meaning
station required (or id) station name, e.g. Aarau
id optional alternative station id; if both are given, id wins
limit optional how many departures to return (the slide uses 15)

Two subtleties from the docs:

  • limit is a soft cap, not exact. If several connections leave at the same time it may return all of them, so you can get slightly more than limit.
  • The response is a stationboard array; each entry has the train's category and name, its destination (to), and a stop object with the scheduled and predicted departure times — that's where delays come from.

From Quiz: WEBT / External Webservices | Updated: Jul 14, 2026