Public Transit API v3 Developer's Guide


Connection contains all available information about a complete route between a departure and a destination.

Table 1. Connection Type Attributes
Attribute Always Included Type Description
id Yes String Identifier of the connection.
duration Yes TimeDelta Expected duration of the journey.
transfers Yes Integer Number of transport changes to reach the destination.
ridable - Boolean If false, then the connection based on realtime situation is not possible.

The default is 1.

first_last_mile - Boolean If 0 this connection does not include the first and/or the last part of the trip, but only the long distance sections in between. This normally happens for providers that do not support first and last mile (such as BlaBlaCar). Also it can be set to 0, if the user specified first_last_mile=0 in the request.

The default is 1.

rt_aware - Boolean Returns 1 if this connection is real-time aware, i.e. if it's considering real-time information to plan the route.

A real-time aware connection always considers the real-time arrival time of a section to calculate the departure time of the following section. So for a proper visualization the user have to consume the times in the RT element when present and fallback to Dep@time and Arr@time otherwise. Be aware that also the attribute Journey@duration will get calculated based on the real-time departure and arrival time.

The default is 0.

Table 2. Connection Type Elements
Element Always Included Type Description
Dep Yes Dep Contains information about a departure and includes time, station, address, platform and real time information if available. The Transport attributes provide information about the transport that need to be used for this departure.
Arr Yes Arr Contains destination of the current section/connection. Include an Address or a Station. If available real time information will also be provided.
Sections Yes Sections Specifies a list of connection segments, using different transport modes.
Tariff - Tariff Specifies a list of various possible fare combinations a user can buy/pay for the requested connection.