Station board filtering
Station board endpoints (/v1/stations/{id}/departures and /v1/stations/{id}/arrivals) support optional query parameters that let you narrow results to specific operators, platforms, or services calling at a particular station.
These filters can be combined to build precise board views for your application.
Filter by operator
Section titled “Filter by operator”Use the toc parameter to show only services run by a specific Train Operating Company.
GET /v1/stations/KGX/departures?toc=GRThis returns only LNER (code GR) departures from London Kings Cross. You can find the full list of operator codes via the Operators API.
Filter by platform
Section titled “Filter by platform”Use the platform parameter to restrict results to a single platform.
GET /v1/stations/KGX/arrivals?platform=1This returns only arrivals at platform 1. Platform identifiers match the values returned in the station profile’s platforms array.
Filter by calling point
Section titled “Filter by calling point”Use the calling_at parameter to show only services that call at a specific station. The value should be a TIPLOC code.
GET /v1/stations/KGX/departures?calling_at=YORKThis returns departures from Kings Cross that call at York. This is useful for building “trains to…” views.
Combining filters
Section titled “Combining filters”Filters can be combined freely. For example, to find LNER departures from platform 1 that call at York:
GET /v1/stations/KGX/departures?toc=GR&platform=1&calling_at=YORKExpanding service detail
Section titled “Expanding service detail”Use the expand parameter to embed the full service detail — downstream calling points with timing, formation, and associations — directly in each board row, instead of fetching /v1/services/{id} separately per service.
GET /v1/stations/KGX/departures?expand=trueWith expand=true, every BoardService row gains a service object. Without it (the default), the service key is absent and responses are unchanged. If a service cannot be resolved at expansion time, its row is still returned with service: null.
Expansion is available on all four board endpoints: /departures, /arrivals, /board, and /next. It combines freely with the filters above. Note that expanded responses are substantially larger — prefer the default behaviour when you only render top-level board rows.
Pagination
Section titled “Pagination”Board results are controlled by the limit parameter (default 20, maximum 100). Filtering is applied before the limit, so you always receive up to limit matching services.