Transit routing

OTP-compatible transit routing plan (GET)

Returns transit and walking route itineraries between the specified origin and destination. The endpoint accepts parameters to control departure/arrival times, walking distances, transit leg limits, transfer penalties, and more.

get/otp/plan

Request

  • Base URL: https://transit.land/api/v2/routing
  • URL: https://transit.land/api/v2/routing/otp/plan
  • Auth: one of:
    • API key in header apikey
    • API key in query parameter apikey

Query parameters

fromPlacestring required
Example:37.7757,-122.4198

Origin in lat,lon format.

toPlacestring required
Example:37.7857,-122.4064

Destination in lat,lon format.

timestring required
Example:08:30

Time of departure (or arrival if arriveBy is true) in local time. Format: HH:MM or HH:MM:SS, on a 24-hour clock. A 12-hour time such as 8:30am is rejected.

datestring required
Example:2026-08-17

Date of travel in YYYY-MM-DD format. MM-DD-YYYY is also accepted, with the month first.

arriveByboolean

If true, the specified time and date are treated as the target arrival time at the destination rather than the departure time.

maxItinerariesinteger
Example:3

Maximum number of itineraries to return. Also available as numItineraries.

maxWalkingDistancenumber
Example:800

Maximum walking distance (in meters) allowed from the origin to the first transit stop or from the last transit stop to the destination. Also available as maxWalkDistance.

maxTransferWalkingDistancenumber
Example:400

Maximum straight-line distance (in meters) allowed for transfers between stops.

walkingSpeednumber
Example:1

Walking speed in meters per second. (Fixed at 1.0 in the beta release.)

minRideLengthinteger
Example:120

Minimum duration (in seconds) of a transit leg.

maxKinteger
Example:8

Maximum number of transit legs allowed in an itinerary.

maxTripTimeinteger
Example:14400

Maximum total itinerary time (in seconds).

transferTimePenaltyinteger
Example:120

Amount of padding to add (in seconds) when considering a transfer. For example, when alighting from the end of the first transit leg and walking to the departure stop for the next leg, only transfers to new trips departing at least 120s from that moment will be considered

useFallbackDatesboolean

Use "fallback" service dates if the requested date is outside the service period of a given feed. For instance, if a feed only contains service from 2023-01-01 through 2023-01-31, and a date of 2023-05-01 is specified, an equivalent weekday (in this case, Monday) will be selected within the valid service range, such as 2023-01-09.

includeWalkingItineraryboolean

Always include a walking-only itinerary alongside transit results.

fallbackWalkingItineraryboolean

Return a walking-only itinerary if no transit trips are found.

allowWalkingItineraryboolean

Automatically include a walking-only itinerary if the origin and destination are within the maximum walking distance.

includeEarliestArrivalsboolean

Include a table of the earliest arrival times at stops during trip planning.

useTargetStopPruningboolean
Example:true

If true, stops that cannot improve the final arrival time are ignored. Set to false to include all stops, useful for generating isochrones.

Response

Successful routing plan response.

Changes

No recorded changes to this operation across all 1 revision of this API.