GuidesAPI Reference
API Reference

Departures

Lists public transit departures. Discovers subsequent departures using structured or topological queries. The service accepts two types of queries as shown in the table below:

QueryParameterDescription
Departures by IDsidstakes a comma-separated list of station/stop identifiers
Departures by Locationintakes a pair of coordinates to define the center and a radius to define the extent of a circular area where to search for departures

Select a query from one of the options above to visualize the request parameters.

Query Params
boardOptions

Board options

date-time

Specifies the time of earliest departure in RFC 3339, section 5.6 as defined by either date-time or full-date "T" partial-time (for example, 2019-06-24T01:23:45). The requested time is converted to local time at each location. When the optional timezone offset is not specified, time is assumed to be local. If time is not specified, current time at departure place will be used. All Time values in the response are returned in the timezone of each location.

modes
array of objects

Transit mode filter used to determine which modes of transit to include in the response. By default, all supported transit modes are permitted.

Supported modes: highSpeedTrain intercityTrain interRegionalTrain regionalTrain cityTrain bus ferry subway lightRail privateBus inclined aerial busRapid monorail flight spaceship

This parameter also support an exclusion list: It's sufficient to specify each mode to exclude by prefixing it with -. Mixing of inclusive and exclusive transit modes is not allowed.

examples:

  • subway,bus. Returns only subways and busses.
  • -subway,-bus. Returns all modes except subways and busses.
modes
integer
1 to 50
Defaults to 5

The maximum number of subsequent departures per station board the response is to include.

integer | null
1 to 10
Defaults to null

The maximum number of subsequent departures per transport returned in the response. A transport is identified by its name, direction and mode. When not set, all departures are returned, otherwise the first maxPerTransport departures for each transport in chronological order are returned.

string
enum
Defaults to time

Define how the departures are sorted. By default, the departures are returned sorted by scheduled time. When sort=transport, the departures are sorted first by transport and then by scheduled time.

  • sort=time: means sorted by time.
  • sort=transport: means that we sort by name, headsign, mode and time in this order.
Allowed:
integer
1 to 1440
Defaults to null

Limit the subsequent departures to the defined time window and starting from the time provided in the request. When not set, this filter is not applied and a maximum of 24 hours of departures can be returned. The filter will remove all departures outside the interval defined by time and time span.

lang
array of strings
Defaults to en-US

Specifies the list of preferred languages of the response. The first supported language from the list will be used for for the response. The value should comply with the IETF BCP 47.

lang
accessibility
array of strings

Defines accessibility requirements for routes.

  • wheelchair - Select only wheelchair accessible vehicles and stations.
Headers
string

User-provided token that can be used to trace a request or a group of requests sent to the service.

Responses

Language
Credentials
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json