Public Transit API Developer's Guide

Connection

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.

has_alt - Boolean Returns 1 if a realtime alternative for this connection exists.

The default is 0.

alt - Boolean Returns 1 if the connection is a real-time alternative to another connection that is not feasable due to delays. This connection will take into account real-time information.

The default is 0.

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.

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.