timetable

Get a trip as itinerary

get/api/v6/trip

Query parameters

tripIdstring required

trip identifier (e.g. from an itinerary leg or stop event)

withScheduledSkippedStopsboolean

Optional. Include intermediate stops where passengers can not alight/board according to schedule.

detailedLegsboolean

Controls if legGeometry is returned for transit legs.

The default value is true.

joinInterlinedLegsboolean

Optional. Default is true.

Controls if a trip with stay-seated transfers is returned:

  • joinInterlinedLegs=false: as several legs (full information about all trip numbers, headsigns, etc.). Legs that do not require a transfer (stay-seated transfer) are marked with interlineWithPreviousLeg=true.
  • joinInterlinedLegs=true (default behavior): as only one joined leg containing all stops
languagestring[]

language tags as used in OpenStreetMap / GTFS (usually BCP-47 / ISO 639-1, or ISO 639-2 if there's no ISO 639-1)

Response

the requested trip as itinerary

durationinteger required

journey duration in seconds

startTimestring date-time required

journey departure time

endTimestring date-time required

journey arrival time

transfersinteger required

The number of transfers this trip has.

idstring required

Experimental (format might change). Opaque itinerary identifier. Pass it as itineraryId to refresh-itinerary endpoint for reconstruction using the new schedule/realtime data.

Changes

Changed in 9 of the 52 revisions of this API.11212

    • added the optional property legs/items/reservation to the response with the 200 status

      response-optional-property-added

    • added the new HGV enum value to the legs/items/from/modes/items/ response property for the response status 200

      response-property-enum-value-added

    • added the new HGV enum value to the legs/items/intermediateStops/items/modes/items/ response property for the response status 200

      response-property-enum-value-added

    • added the new HGV enum value to the legs/items/mode response property for the response status 200

      response-property-enum-value-added

    • added the new HGV enum value to the legs/items/to/modes/items/ response property for the response status 200

      response-property-enum-value-added

    • added the new HGV enum value to the legs/items/tripFrom/modes/items/ response property for the response status 200

      response-property-enum-value-added

    • added the new HGV enum value to the legs/items/tripTo/modes/items/ response property for the response status 200

      response-property-enum-value-added

    • added the optional property legs/items/agencyFareUrl to the response with the 200 status

      response-optional-property-added

    • added the optional property legs/items/ticketUrls to the response with the 200 status

      response-optional-property-added

    • added the optional property legs/items/steps/items/fromOsmNode to the response with the 200 status

      response-optional-property-added

    • added the optional property legs/items/steps/items/toOsmNode to the response with the 200 status

      response-optional-property-added

    • added the optional property legs/items/from/stopCode to the response with the 200 status

      response-optional-property-added

    • added the optional property legs/items/intermediateStops/items/stopCode to the response with the 200 status

      response-optional-property-added

    • added the optional property legs/items/to/stopCode to the response with the 200 status

      response-optional-property-added

    • added the optional property legs/items/tripFrom/stopCode to the response with the 200 status

      response-optional-property-added

    • added the optional property legs/items/tripTo/stopCode to the response with the 200 status

      response-optional-property-added

    • added the new SPECIAL_EVENT enum value to the legs/items/alerts/items/cause response property for the response status 200

      response-property-enum-value-added

    • added the new SPECIAL_EVENT enum value to the legs/items/from/alerts/items/cause response property for the response status 200

      response-property-enum-value-added

    • added the new SPECIAL_EVENT enum value to the legs/items/intermediateStops/items/alerts/items/cause response property for the response status 200

      response-property-enum-value-added

    • added the new SPECIAL_EVENT enum value to the legs/items/to/alerts/items/cause response property for the response status 200

      response-property-enum-value-added

    • added the new SPECIAL_EVENT enum value to the legs/items/tripFrom/alerts/items/cause response property for the response status 200

      response-property-enum-value-added

    • added the new SPECIAL_EVENT enum value to the legs/items/tripTo/alerts/items/cause response property for the response status 200

      response-property-enum-value-added

    • added the required property id to the response with the 200 status

      response-required-property-added

    • endpoint added

      endpoint-added

    • api path removed without deprecation

      api-path-removed-without-deprecation

    This revision also has 30 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog