An Itinerary is one complete way of getting from the start location to the end location.
name | data type | description |
---|---|---|
duration | number | Duration of the trip on this itinerary, in seconds. |
startTime | number | Time that the trip departs. |
endTime | number | Time that the trip arrives. |
walkTime | number | How much time is spent walking, in seconds. |
transitTime | number | How much time is spent on transit, in seconds. |
waitingTime | number | How much time is spent waiting for transit to arrive, in seconds. |
walkDistance | number | How far the user has to walk, in meters. |
walkLimitExceeded | boolean | Indicates that the walk limit distance has been exceeded for this itinerary when true. |
elevationLost | number | How much elevation is lost, in total, over the course of the trip, in meters. As an example, a trip that went from the top of Mount Everest straight down to sea level, then back up K2, then back down again would have an elevationLost of Everest + K2. |
elevationGained | number | How much elevation is gained, in total, over the course of the trip, in meters. See elevationLost. |
transfers | number | The number of transfers this trip has. |
fare | Fare | The cost of this trip |
leg | array of Leg | A list of Legs. Each Leg is either a walking (cycling, car) portion of the trip, or a transit trip on a particular vehicle. So a trip where the use walks to the Q train, transfers to the 6, then walks to their destination, has four legs. |
tooSloped | boolean | This itinerary has a greater slope than the user requested (but there are no possible itineraries with a good slope). |
Example
{ "duration" : 12345, "startTime" : 12345, "endTime" : 12345, "walkTime" : 12345, "transitTime" : 12345, "waitingTime" : 12345, "walkDistance" : 12345.0, "walkLimitExceeded" : true, "elevationLost" : 12345.0, "elevationGained" : 12345.0, "transfers" : 12345, "fare" : { "fare" : { "property1" : "...", "property2" : "..." } }, "leg" : [ { "startTime" : 12345, "endTime" : 12345, "departureDelay" : 12345, "arrivalDelay" : 12345, "realTime" : true, "isNonExactFrequency" : true, "headway" : 12345, "distance" : 12345.0, "pathway" : true, "mode" : "...", "route" : "...", "agencyName" : "...", "agencyUrl" : "...", "agencyTimeZoneOffset" : 12345, "routeColor" : "...", "routeType" : 12345, "routeId" : { "id" : "...", "agencyId" : "..." }, "routeTextColor" : "...", "interlineWithPreviousLeg" : true, "tripShortName" : "...", "tripBlockId" : "...", "headsign" : "...", "agencyId" : "...", "tripId" : { "id" : "...", "agencyId" : "..." }, "serviceDate" : "...", "from" : { "name" : "...", "stopId" : { }, "stopCode" : "...", "platformCode" : "...", "lon" : 12345.0, "lat" : 12345.0, "arrival" : 12345, "departure" : 12345, "orig" : "...", "zoneId" : "...", "stopIndex" : 12345, "stopSequence" : 12345, "vertexType" : "BIKEPARK", "bikeShareId" : "..." }, "to" : { "name" : "...", "stopId" : { }, "stopCode" : "...", "platformCode" : "...", "lon" : 12345.0, "lat" : 12345.0, "arrival" : 12345, "departure" : 12345, "orig" : "...", "zoneId" : "...", "stopIndex" : 12345, "stopSequence" : 12345, "vertexType" : "BIKEPARK", "bikeShareId" : "..." }, "intermediateStops" : [ { "name" : "...", "stopId" : { }, "stopCode" : "...", "platformCode" : "...", "lon" : 12345.0, "lat" : 12345.0, "arrival" : 12345, "departure" : 12345, "orig" : "...", "zoneId" : "...", "stopIndex" : 12345, "stopSequence" : 12345, "vertexType" : "NORMAL", "bikeShareId" : "..." }, { "name" : "...", "stopId" : { }, "stopCode" : "...", "platformCode" : "...", "lon" : 12345.0, "lat" : 12345.0, "arrival" : 12345, "departure" : 12345, "orig" : "...", "zoneId" : "...", "stopIndex" : 12345, "stopSequence" : 12345, "vertexType" : "BIKESHARE", "bikeShareId" : "..." } ], "legGeometry" : { "points" : "...", "levels" : "...", "length" : 12345 }, "steps" : [ { "distance" : 12345.0, "relativeDirection" : "UTURN_LEFT", "streetName" : "...", "absoluteDirection" : "SOUTHWEST", "exit" : "...", "stayOn" : true, "area" : true, "bogusName" : true, "lon" : 12345.0, "lat" : 12345.0, "alerts" : [ { }, { } ], "elevation" : "..." }, { "distance" : 12345.0, "relativeDirection" : "HARD_LEFT", "streetName" : "...", "absoluteDirection" : "EAST", "exit" : "...", "stayOn" : true, "area" : true, "bogusName" : true, "lon" : 12345.0, "lat" : 12345.0, "alerts" : [ { }, { } ], "elevation" : "..." } ], "alerts" : [ { "alertHeaderText" : "...", "alertDescriptionText" : "...", "alertUrl" : "...", "effectiveStartDate" : 12345 }, { "alertHeaderText" : "...", "alertDescriptionText" : "...", "alertUrl" : "...", "effectiveStartDate" : 12345 } ], "routeShortName" : "...", "routeLongName" : "...", "boardRule" : "...", "alightRule" : "...", "rentedBike" : true, "transitLeg" : true, "duration" : 12345.0 }, { "startTime" : 12345, "endTime" : 12345, "departureDelay" : 12345, "arrivalDelay" : 12345, "realTime" : true, "isNonExactFrequency" : true, "headway" : 12345, "distance" : 12345.0, "pathway" : true, "mode" : "...", "route" : "...", "agencyName" : "...", "agencyUrl" : "...", "agencyTimeZoneOffset" : 12345, "routeColor" : "...", "routeType" : 12345, "routeId" : { "id" : "...", "agencyId" : "..." }, "routeTextColor" : "...", "interlineWithPreviousLeg" : true, "tripShortName" : "...", "tripBlockId" : "...", "headsign" : "...", "agencyId" : "...", "tripId" : { "id" : "...", "agencyId" : "..." }, "serviceDate" : "...", "from" : { "name" : "...", "stopId" : { }, "stopCode" : "...", "platformCode" : "...", "lon" : 12345.0, "lat" : 12345.0, "arrival" : 12345, "departure" : 12345, "orig" : "...", "zoneId" : "...", "stopIndex" : 12345, "stopSequence" : 12345, "vertexType" : "NORMAL", "bikeShareId" : "..." }, "to" : { "name" : "...", "stopId" : { }, "stopCode" : "...", "platformCode" : "...", "lon" : 12345.0, "lat" : 12345.0, "arrival" : 12345, "departure" : 12345, "orig" : "...", "zoneId" : "...", "stopIndex" : 12345, "stopSequence" : 12345, "vertexType" : "BIKEPARK", "bikeShareId" : "..." }, "intermediateStops" : [ { "name" : "...", "stopId" : { }, "stopCode" : "...", "platformCode" : "...", "lon" : 12345.0, "lat" : 12345.0, "arrival" : 12345, "departure" : 12345, "orig" : "...", "zoneId" : "...", "stopIndex" : 12345, "stopSequence" : 12345, "vertexType" : "NORMAL", "bikeShareId" : "..." }, { "name" : "...", "stopId" : { }, "stopCode" : "...", "platformCode" : "...", "lon" : 12345.0, "lat" : 12345.0, "arrival" : 12345, "departure" : 12345, "orig" : "...", "zoneId" : "...", "stopIndex" : 12345, "stopSequence" : 12345, "vertexType" : "BIKESHARE", "bikeShareId" : "..." } ], "legGeometry" : { "points" : "...", "levels" : "...", "length" : 12345 }, "steps" : [ { "distance" : 12345.0, "relativeDirection" : "DEPART", "streetName" : "...", "absoluteDirection" : "SOUTHEAST", "exit" : "...", "stayOn" : true, "area" : true, "bogusName" : true, "lon" : 12345.0, "lat" : 12345.0, "alerts" : [ { }, { } ], "elevation" : "..." }, { "distance" : 12345.0, "relativeDirection" : "SLIGHTLY_LEFT", "streetName" : "...", "absoluteDirection" : "SOUTHEAST", "exit" : "...", "stayOn" : true, "area" : true, "bogusName" : true, "lon" : 12345.0, "lat" : 12345.0, "alerts" : [ { }, { } ], "elevation" : "..." } ], "alerts" : [ { "alertHeaderText" : "...", "alertDescriptionText" : "...", "alertUrl" : "...", "effectiveStartDate" : 12345 }, { "alertHeaderText" : "...", "alertDescriptionText" : "...", "alertUrl" : "...", "effectiveStartDate" : 12345 } ], "routeShortName" : "...", "routeLongName" : "...", "boardRule" : "...", "alightRule" : "...", "rentedBike" : true, "transitLeg" : true, "duration" : 12345.0 } ], "tooSloped" : true }