Contents
Documentation
Transit routing (OTP-compatible)
Available on the following API tiers:
The Transitland Routing API plans routes from an origin/start location to a destination/stop location by transit and other modes of travel.
The Transitland Routing API is powered by the same archive of GTFS archives as the other Transitland v2 APIs. Users can combine itineraries from the Transitland Routing API with queries performed against other Transitland v2 APIs.
For definitions of journeys, itineraries, and legs, see Journeys and Itineraries.
Online vs. batch usage
The public Transitland Routing API is intended for "online" purposes such as interactive web or mobile applications.
Geographic coverage
For beta release, coverage is all current operators in the United States.
In the future, we expect to increase routing coverage to match worldwide coverage offered by other Transitland v2 APIs.
Modes of travel
Transitland Routing APIs support travel by transit and walking.
In the future, additional modes of travel may be supported.
Features and benefits
The beta release of Transitland Routing API provides the following features and benefits:
- Broad coverage in one routing engine: Transit routing across all locations in the United States where Transitland has GTFS source feed coverage (to be expanded worldwide in the future). No need to maintain separate routing engines for each metro region.
- Rapidly updating schedules: When the Transitland platform receives new versions of source feeds, the new routing graph tiles are rapidly created behind the scenes. Transitland Routing API switches to using the new source feed version's service schedules within minutes. No need to wait hours or days for the routing engine to rebuild.
- Compatible APIs: Transitland Routing API beta is released with an API endpoint that is compatible with OpenTripPlanner. We may add additional compatibility modes in the future, such as a Google Directions API compatibility endpoint.
Known limitations
Transitland Routing API is a beta release and is under ongoing development. The following are known limitations:
- Journey itineraries:
- Pedestrian legs include a shape, origin, and destination, which is sufficient for plotting on a map; pedestrian legs do not include detailed street names or maneuver routing for narrative instructions.
- Itineraries do not include fares.
- Stops and routes:
pickup_typeordrop_off_type> 0 not supported.continuous_pickupandcontinuous_drop_offnot supported- Loop routes not well supported.
- Timezones:
- Trips spanning multiple timezones are not well supported.
- Transfers:
- Transitland Routing API doesn't make use of
transfers.txtwhen calculating transfers.
- Transitland Routing API doesn't make use of
- GTFS Realtime:
- Transitland Routing API doesn't make use of GTFS Realtime TripUpdates or VehiclePositions.
- Performance:
- Users of the beta may intentionally be slowed or rate limited in their use.
The following are previous limitations that have since been resolved:
- Transfers after midnight are now supported.
block_idintrips.txtis now used when calculating transfers.
OTP-compatible API endpoint
The beta release of the Transitland Routing API provides an endpoint that supports the main request options and response type as OpenTripPlanner's plan REST API.
Software libraries designed to work with the OTP REST API will also likely work with the Transitland Routing API.
Endpoint
Submit requests to
https://transit.land/api/v2/routing/otp/plan
Requests may use GET or POST methods.
Transit routing or stop departures?
This endpoint plans a journey from an origin to a destination. It selects stops, routes, and transfers, and returns itineraries with walking legs and timings.
To list departures from a known stop, use the REST API stop departures endpoint. It returns the trips serving a stop in a time window, with real-time estimates where a feed provides them.
Request and response
GEThttps://transit.land/api/v2/routing/otp/plan
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.
Request
fromPlace
stringOrigin in
lat,lon format.Example37.7757,-122.4198
toPlace
stringDestination in
lat,lon format.Example37.7857,-122.4064
time
stringTime 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.
Example08:30
date
stringDate of travel in
YYYY-MM-DD format. MM-DD-YYYY is also accepted — note the month comes first, so 17-08-2026 is not a valid way to write 17 August.
Example2026-08-17
arriveBy
booleanIf true, the specified
time and date are treated as the target arrival time at the destination rather than the departure time.
maxItineraries
integerMaximum number of itineraries to return. Also available as
numItineraries.Example3
maxWalkingDistance
numberMaximum 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.
Example800
maxTransferWalkingDistance
numberMaximum straight-line distance (in meters) allowed for transfers between stops.
Example400
walkingSpeed
numberWalking speed in meters per second. (Fixed at 1.0 in the beta release.)
Example1
minRideLength
integerMinimum duration (in seconds) of a transit leg.
Example120
maxK
integerMaximum number of transit legs allowed in an itinerary.
Example8
maxTripTime
integerMaximum total itinerary time (in seconds).
Example14400
transferTimePenalty
integerAmount 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
Example120
useFallbackDates
booleanUse "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.
includeWalkingItinerary
booleanAlways include a walking-only itinerary alongside transit results.
fallbackWalkingItinerary
booleanReturn a walking-only itinerary if no transit trips are found.
allowWalkingItinerary
booleanAutomatically include a walking-only itinerary if the origin and destination are within the maximum walking distance.
includeEarliestArrivals
booleanInclude a table of the earliest arrival times at stops during trip planning.
useTargetStopPruning
booleanIf true, stops that cannot improve the final arrival time are ignored. Set to false to include all stops, useful for generating isochrones.
Exampletrue
Example request
curl "https://transit.land/api/v2/routing/otp/plan?fromPlace=37.7757%2C-122.4198&toPlace=37.7857%2C-122.4064&time=08%3A30&date=2026-08-17" \
-H "apikey: YOUR_API_KEY"Response
earliestArrivals
objectEarliest arrival time at each reachable stop, keyed by stop. Present only when
includeEarliestArrivals is true.
plan
objectdate
integerEpoch timestamp (in milliseconds) representing the date of the plan.
from
objectitineraries
array: objectCandidate trips, best first. Empty when no trip was found.
to
objectExample response
Show response
{
"plan": {
"date": 1786980600000,
"from": {
"lat": 37.7757,
"lon": -122.4198,
"name": "Origin"
},
"itineraries": [
{
"distance": 1840.6016926765926,
"duration": 491,
"endTime": 1786981112000,
"legs": [
{
"distance": 159.23557715082868,
"duration": 159,
"endTime": 1786980780000,
"from": {
"departure": 1786980621000,
"lat": 37.7757,
"lon": -122.4198,
"name": ""
},
"legGeometry": {
"length": 15,
"points": "caqeFvbejV??_@BCg@CS??|ASZETCPALCOOACC@??"
},
"mode": "WALK",
"startTime": 1786980621000,
"steps": [],
"to": {
"departure": 1786980780000,
"lat": 37.77513,
"lon": -122.41925,
"name": "Metro Van Ness Station",
"stopCode": "15419",
"stopId": "15419",
"stopOnestopId": "s-9q8yykc00d-metrovannessstation"
},
"transitLeg": false
},
{
"agencyId": "SF",
"agencyName": "San Francisco Municipal Transportation Agency",
"block_id": "SF:9504_M21",
"distance": 1504.2311526571011,
"duration": 155,
"endTime": 1786980935000,
"feedId": "f-sf~bay~area~rg",
"feedVersionSha1": "3aea27cbde2ce8cb05696e3a19b22db08a145e63",
"from": {
"departure": 1786980780000,
"lat": 37.77513,
"lon": -122.41925,
"name": "Metro Van Ness Station",
"stopCode": "15419",
"stopId": "15419",
"stopIndex": 19,
"stopOnestopId": "s-9q8yykc00d-metrovannessstation",
"stopSequence": 19
},
"headsign": "Embarcadero Station",
"intermediateStops": [
{
"departure": 1786980855000,
"lat": 37.77971,
"lon": -122.41335,
"name": "Metro Civic Center Station/Downtn",
"stopCode": "15727",
"stopId": "15727",
"stopIndex": 20,
"stopOnestopId": "s-9q8yymt6f0-metrociviccenterstation~downtn",
"stopSequence": 20
}
],
"legGeometry": {
"length": 15,
"points": "u}peFl_ejVwAqB_EmF}DqF{@gAwDmFoEeGoCuDuAkBw@eAqEkGqEkGmCoDkCsDCE"
},
"mode": "RAIL",
"routeColor": "942D83",
"routeId": "SF:L",
"routeLongName": "TARAVAL",
"routeOnestopId": "r-9q8yv-l",
"routeShortName": "L",
"routeTextColor": "FFFFFF",
"routeType": 0,
"startTime": 1786980780000,
"steps": [],
"to": {
"departure": 1786980935000,
"lat": 37.78465,
"lon": -122.40709,
"name": "Metro Powell Station/Downtown",
"stopCode": "15417",
"stopId": "15417",
"stopIndex": 21,
"stopOnestopId": "s-9q8yyw3zs1-metropowellstation~downtown",
"stopSequence": 21
},
"transitLeg": true,
"tripId": "SF:12083617_M21"
},
{
"distance": 177.13496286866288,
"duration": 177,
"endTime": 1786981112000,
"from": {
"departure": 1786980935000,
"lat": 37.78465,
"lon": -122.40709,
"name": "Metro Powell Station/Downtown",
"stopCode": "15417",
"stopId": "15417",
"stopOnestopId": "s-9q8yyw3zs1-metropowellstation~downtown"
},
"legGeometry": {
"length": 17,
"points": "ayreFhsbjV??FEa@i@cB}BSYILCDEDSVCEO@??AL?@A???"
},
"mode": "WALK",
"startTime": 1786980935000,
"steps": [],
"to": {
"departure": 1786981112000,
"lat": 37.7857,
"lon": -122.4064,
"name": ""
},
"transitLeg": false
}
],
"startTime": 1786980621000,
"transfers": 0,
"transitDistance": 1504.2311526571011,
"transitTime": 155,
"waitingTime": 0,
"walkDistance": 336.37054001949156,
"walkTime": 336
}
],
"to": {
"lat": 37.7857,
"lon": -122.4064,
"name": "Destination"
}
}
}See the Routing Platform overview for API access and the machine-readable schema.