OpenTripPlanner API

/plan

The following operations are supported on this resource:

GET

This is the primary entry point for the web service and is used for requesting trip plans. All parameters are passed in the query string. Some parameters may not be honored by the trip planner for some or all itineraries. For example, maxWalkDistance may be relaxed if the alternative is to not provide a route.

Parameters

name description type default
fromPlace The start location -- either latitude, longitude pair in degrees or a Vertex label. For example, 40.714476,-74.005966 or mtanyctsubway_A27_S. query
toPlace The end location (see fromPlace for format). query
intermediatePlaces An unordered list of intermediate locations to be visited (see the fromPlace for format). query
intermediatePlacesOrdered (no documentation provided) query false
date The date that the trip should depart (or arrive, for requests where arriveBy is true). query
time The time that the trip should depart (or arrive, for requests where arriveBy is true). query
routerId Router ID used when in multiple graph mode. Unused in singleton graph mode. query
arriveBy Whether the trip should depart or arrive at the specified date and time. query false
wheelchair Whether the trip must be wheelchair accessible. query false
maxWalkDistance The maximum distance (in meters) the user is willing to walk. Defaults to approximately 1/2 mile. query 800
walkSpeed The user's walking speed in meters/second. Defaults to approximately 3 MPH. query
triangleSafetyFactor For bike triangle routing, how much safety matters (range 0-1). query
triangleSlopeFactor For bike triangle routing, how much slope matters (range 0-1). query
triangleTimeFactor For bike triangle routing, how much time matters (range 0-1). query
optimize The set of characteristics that the user wants to optimize for. @See OptimizeType query QUICK
mode The set of modes that a user is willing to use. query TRANSIT,WALK
minTransferTime The minimum time, in seconds, between successive trips on different vehicles. This is designed to allow for imperfect schedule adherence. This is a minimum; transfers over longer distances might use a longer time. query 240
numItineraries The maximum number of possible itineraries to return. query 3
showIntermediateStops Whether intermediate stops -- those that the itinerary passes in a vehicle, but does not board or alight at -- should be returned in the response. For example, on a Q train trip from Prospect Park to DeKalb Avenue, whether 7th Avenue and Atlantic Avenue should be included. query false
preferredRoutes The list of preferred routes. The format is agency_route, so TriMet_100. query
unpreferredRoutes The list of unpreferred routes. The format is agency_route, so TriMet_100. query
bannedRoutes The list of banned routes. The format is agency_route, so TriMet_100. query
transferPenalty An additional penalty added to boardings after the first. The value is in OTP's internal weight units, which are roughly equivalent to seconds. Set this to a high value to discourage transfers. Of course, transfers that save significant time or walking will still be taken. query 0
maxTransfers The maximum number of transfers (that is, one plus the maximum number of boardings) that a trip will be allowed. Larger values will slow performance, but could give better routes. This is limited on the server side by the MAX_TRANSFERS value in org.opentripplanner.api.ws.Planner. query 2

Output Payload

element produceable content type(s)
(custom)
  • application/xml
  • application/json
  • text/xml
description
Returns either an XML or a JSON document, depending on the HTTP Accept header of the client making the request.