Directions API

POST
Optimized Route

The Optimized Route function is designed to help you find the most optimal route given a set of locations.

Optimized routes will help reorder all your stops and provide the most optimal route for your needs.

Resource URL

http://www.mapquestapi.com/directions/v2/optimizedroute

Resource Information

Response Formats JSON, XML
Authentication Yes (Requires Key)
Rate Limited Yes

Request Parameters

Request Parameter Description Required?
key
String
The API Key, which is needed to make requests to MapQuest services. Yes
inFormat Specifies the format of the request body. Must be one of the following, if supplied:
  • json
  • xml
Default: json
No
outFormat Specifies the format of the response. Must be one of the following, if supplied:
  • json
  • xml
Default: json
No
callback A JavaScript function name. The JSON-formatted response will be wrapped in a call to the supplied callback function name to provide JSONP functionality. This functionality might be needed to do cross-site scripting. See the Wikipedia.org entry for JSON for more details. No

Body Parameters

Parameter Description Required?
locations A set of at least two locations specifying the route origin and destination. Refer to the Locations documentation on how to properly form locations in all formats. Yes

Please refer to the normal Route documentation for the full list of acceptable Advanced Parameters.

Response

The table below describes the Optimized Route response objects that are returned in addition to a normal Route response.

Response Field Description
Optimized Route Response Fields
locationSequence Returns a sequence array that can be used to determine the index in the original location object list.
locations Returns a collection of locations in the form of an address. The origin and destination locations remain fixed, but the intermediate locations are reordered as appropriate.
Route Response Fields
bestFit If a mapState is set, the directions service will compute and return new scale, zoom level, and center values that "best fit" the route shape. The best fit response will contain the original mapState height, width and scale as well as a new scale, new center and new level/zoom. It will use original mapState to calculate the new scale, new center and new level/zoom.
hasTollRoad A route attribute flag that is set per route and per leg. Per route, it returns true if at least one leg contains a Toll Road attribute, otherwise it returns false. Per leg, it returns true if at least one maneuver contains a Toll Road attribute, otherwise it returns false.
hasFerry A route attribute flag that is set per route and per leg. Per route, it returns true if at least one leg contains a Ferry attribute, otherwise it returns false. Per leg, it returns true if at least one maneuver contains a Ferry attribute, otherwise it returns false.
hasHighway A route attribute flag that is set per route and per leg. Per route, it returns true if at least one leg contains a Limited Access/Highway attribute, otherwise it returns false. Per leg, it returns true if at least one maneuver contains a Limited Access/Highway attribute, otherwise it returns false.
hasSeasonalClosure A route attribute flag that is set per route and per leg. Per route, it returns true if at least one leg contains a Seasonal Closure attribute, otherwise it returns false. Per leg, it returns true if at least one maneuver contains a Seasonal Closure attribute, otherwise it returns false.
hasUnpaved A route attribute flag that is set per route and per leg. Per route, it returns true if at least one leg contains an Unpaved attribute, otherwise it returns false. Per leg, it returns true if at least one maneuver contains an Unpaved attribute, otherwise it returns false.
hasCountryCross A route attribute flag that is set per route and per leg. Per route, it returns true if at least one leg contains a Country Crossing attribute, otherwise it returns false. Per leg, it returns true if at least one maneuver contains a Country Crossing attribute, otherwise it returns false.
boundingBox Returns lat/lng bounding rectangle of all points in the latlng collection; Returns the best-fit for route shape.
  • ul - a lat/lng representing the upper-left lat/lng
  • lr - a lat/lng representing the lower-right lat/lng
time Returns the calculated elapsed time in seconds for the route.
realTime Returns the estimated route time in seconds over the route path using current traffic conditions and speeds (where available) along with historical traffic conditions. On longer routes, real-time conditions are only applied to the beginning of the route and historical conditions are used afterwards. The realTime estimate can produce a shorter time than the standard route time when traffic conditions reflect higher speeds than the speed limit. Also, real-time speeds are not available on all roads and as such may not always reflect true conditions. The realTime estimate is most useful on short routes where current conditions produce a higher percentage impact to the total route time.

If any road along the route path is currently closed, the time will be greater than 10000000 (an absurdly long time for a route).
formattedTime Returns the calculated elapsed time as formatted text in HH:MM:SS format.
distance Returns the calculated distance of the route.
fuelUsed The estimated amount of fuel used during the route.
legs A collection of leg objects, one for each "leg" of the route.
leg Describes one "leg" of a route. It contains the maneuvers describing how to get from one location to the next location.

Each leg will contain a variety of information, including index, time, distance, and formattedTime.
Collapsed Narrative Parameters The origin parameters are used if the user is familiar with the area and wants to collapse/hide the first few steps of the Route Narrative. The destination parameters are used if the user is familiar with the area and wants to collapse/hide the last few steps of the Route Narrative. Please note that this is currently only in the json response, not xml. An example of this is displayed on www.mapquest.com. See/Click the "I know the area, hide the first few steps" or "I know the area, hide the last few steps".
  • origIndex - The origin index is the index of the first non-collapsed maneuver.
  • origNarrative - The rephrased origin narrative string for the first non-collapsed maneuver.
  • destIndex - The destination index is the index of the last non-collapsed maneuver.
  • destNarrative - The rephrased destination narrative string for the destination maneuver.
maneuvers A collection of Maneuver objects.
maneuver Describes one step in a route narrative. Contains narrative, street names, m_shape, linkIds, route type, turnType, m_distance, m_time, direction, attributes, signs. See descriptions below.
signs Returns text name, extra text, type (road shield), and direction present for a particular maneuver. Also returns the URLs for the sign images.
mapUrl Returns a URL to a static map of this maneuver.
narrative Returns textual driving directions for a particular maneuver.
maneuverNotes A collection of maneuverNote objects, one for each maneuver.

Note: In order to view the proper maneuver note styles, the narrativeType needs to be set to microformat. Microformat uses HTML span tags with class attributes to allow parts of the narrative to be easily styled via CSS. Read more.
ruleId A unique ID that is assigned to a particular maneuver note. This rule ID is used to determine the order that the maneuver notes will be displayed in the narrative. When enhancedNarrative=true, the possible return values are:
  • 1 - Previous Intersection
  • 2,3 - Place holders for future notes
  • 4 - Next Intersection/Gone Too Far
  • 5 - Timed Restrictions
When enhancedNarrative=false, the possible return values are:
  • Timed Restrictions = 1
manNote Returns the maneuver note for a particular maneuver. Maneuver notes can exist for Timed Turn Restrictions, Timed Access Roads, HOV Roads, Seasonal Closures, and Timed Direction of Travel. Please Note: When the enhancedNarrative flag is set to true, additional maneuver notes may be displayed (see Route Option: enhancedNarrative).
manNoteType Used to specify the type of maneuver note. Possible return values are:
  • 24 - Previous Intersection
  • 25 - Next Intersection
  • 26 - Gone Too Far End
  • 10-14 - Timed Restrictions
direction Returns the direction associated to a particular maneuver. Possible return values are:
  • 0 - none
  • 1 - north
  • 2 - northwest
  • 3 - northeast
  • 4 - south
  • 5 - southeast
  • 6 - southwest
  • 7 - west
  • 8 - east
streets Returns the collection of street names this maneuver applies to.
attributes Returns the attributes associated to a particular maneuver. Possible return values are:
  • 0 - none
  • 1 - portions toll
  • 2 - portions unpaved
  • 4 - possible seasonal road closure
  • 8 - gate
  • 16 - ferry
  • 32 - avoid ID
  • 64 - country crossing
  • 128 - limited access (highways)
turnType Returns the turn type associated to a particular maneuver. Possible return values are:
  • 0 - straight
  • 1 - slight right
  • 2 - right
  • 3 - sharp right
  • 4 - reverse
  • 5 - sharp left
  • 6 - left
  • 7 - slight left
  • 8 - right u-turn
  • 9 - left u-turn
  • 10 - right merge
  • 11 - left merge
  • 12 - right on ramp
  • 13 - left on ramp
  • 14 - right off ramp
  • 15 - left off ramp
  • 16 - right fork
  • 17 - left fork
  • 18 - straight fork
  • 19 - take transit
  • 20 - transfer transit
  • 21 - port transit
  • 22 - enter transit
  • 23 - exit transit
startPoint Returns the 1st shape point latLng for a particular maneuver. This will allow for zoomed street functionality for a maneuver.
location Returns a collection of locations in the form of an address. See the Specifying locations as JSON/XML section for more detail on the format of a Location object.
sessionId Returns a unique identifier used to refer to a session. An existing session id will be used if provided, otherwise a new one will be created. The route stored in the session will be automatically updated if the session id is provided. Expires after 30 minutes.
mapState Used to get the route shape from a session.
shapeFormat The shape format options:
  • raw - shape is represented as float pairs
  • cmp - shape is represented as a compressed path string
  • none - No shape will be returned. In this case, the generalize parameter will be ignored.
shape A collection of latitude/longitude coordinates or shape points for the entire route highlight based on the original mapState and/or the generalize option. Shape is an alternated array of lat/lngs. Evens are latitudes and odds are longitudes.

Also included will be:
  • legIndexes - an array of the starting index of each leg
  • maneuverIndexes - an array of the starting index for each maneuver
Each leg and maneuver object in the Route response has an index attribute which corresponds to the entry in the legIndexes/maneuverIndexes array.
legIndexes Returns an array of the shape point index for each specific route segment. The shape point index of the end of the segment is legIndex-1 of the next legIndex. Note that there is always one extra legIndex (the number of legIndexes = number of legs + 1) to account for the last shape point of the final segment.
maneuverIndexes Returns an array of the starting index for each maneuver.
shapePoints Shape points for the route (clipped and generalized) will be returned if mapState is given. Shape points is an alternated array of lat/lngs. Evens are latitudes and odds are longitudes. The index of a specific shape point is i/2.
options Returns route options.
avoids Attribute flags of roads to try to avoid. The available attribute flags depend on the data set. This does not guarantee roads with these attributes will be avoided if alternate route paths are too lengthy or not possible or roads that contain these attributes are very short.
mustAvoidLinkIds Returns link Ids of roads that will be absolutely avoided. May cause some routes to fail.
tryAvoidLinkIds Returns link Ids of roads that we will try to avoid during route calculation. Does not guarantee these roads will be avoided if alternate route paths are too lengthy or not possible.
routeType Returns the route type.
locale Returns the locale.
unit Specifies the type of units to use when calculating distance.
info This field contains information about the response.

The statuscode subfield is an integer return value. See the Status Codes page for more details on our status codes and error messages.

The messages subfield is an array of error messages which describe the status.
transportMode This is a string indicating the mode of transportation used for the maneuver. Values include:
  • AUTO
  • WALKING
  • BICYCLE
  • RAIL
  • BUS (future use)
filterZoneFactor This is returned in the response as part of the options and represents an internal route options used in alternate routes. It cannot be set as an input by the application but can be used to differentiate 2 alternate route results.

See the Status Codes page for more details on our status codes and error messages.

Example Request

POST

http://www.mapquestapi.com/directions/v2/optimizedroute?key=KEY

Example Request Body

{
  "locations": [
    "Denver,CO",
    "Westminster,CO",
    "Boulder,CO"
  ]
}

Example Response

{
  "route": {
    "hasTollRoad": false,
    "hasBridge": true,
    "computedWaypoints": [],
    "fuelUsed": 1.35,
    "hasTunnel": false,
    "hasUnpaved": false,
    "hasHighway": true,
    "realTime": 2709,
    "boundingBox": {
      "ul": {
        "lng": -105.279266,
        "lat": 40.01583
      },
      "lr": {
        "lng": -104.982322,
        "lat": 39.738452
      }
    },
    "distance": 30.113,
    "time": 2364,
    "locationSequence": [
      0,
      1,
      2
    ],
    "hasSeasonalClosure": false,
    "sessionId": "57ab59ca-03d9-0002-02b7-3f82-00163e0300b8",
    "locations": [
      {
        "latLng": {
          "lng": -104.984853,
          "lat": 39.738453
        },
        "adminArea4": "Denver County",
        "adminArea5Type": "City",
        "adminArea4Type": "County",
        "adminArea5": "Denver",
        "street": "",
        "adminArea1": "US",
        "adminArea3": "CO",
        "type": "s",
        "displayLatLng": {
          "lng": -104.984855,
          "lat": 39.738452
        },
        "linkId": 50092422,
        "postalCode": "",
        "sideOfStreet": "N",
        "dragPoint": false,
        "adminArea1Type": "Country",
        "geocodeQuality": "CITY",
        "geocodeQualityCode": "A5XAX",
        "adminArea3Type": "State"
      },
      {
        "latLng": {
          "lng": -105.050335,
          "lat": 39.863462
        },
        "adminArea4": "City and County of Broomfield",
        "adminArea5Type": "City",
        "adminArea4Type": "County",
        "adminArea5": "Westminster",
        "street": "",
        "adminArea1": "US",
        "adminArea3": "CO",
        "type": "s",
        "displayLatLng": {
          "lng": -105.050338,
          "lat": 39.86346
        },
        "linkId": 50128780,
        "postalCode": "",
        "sideOfStreet": "N",
        "dragPoint": false,
        "adminArea1Type": "Country",
        "geocodeQuality": "CITY",
        "geocodeQualityCode": "A5XAX",
        "adminArea3Type": "State"
      },
      {
        "latLng": {
          "lng": -105.27927,
          "lat": 40.015831
        },
        "adminArea4": "Boulder County",
        "adminArea5Type": "City",
        "adminArea4Type": "County",
        "adminArea5": "Boulder",
        "street": "",
        "adminArea1": "US",
        "adminArea3": "CO",
        "type": "s",
        "displayLatLng": {
          "lng": -105.279266,
          "lat": 40.01583
        },
        "linkId": 50200512,
        "postalCode": "",
        "sideOfStreet": "N",
        "dragPoint": false,
        "adminArea1Type": "Country",
        "geocodeQuality": "CITY",
        "geocodeQualityCode": "A5XAX",
        "adminArea3Type": "State"
      }
    ],
    "hasCountryCross": false,
    "legs": [
      {
        "hasTollRoad": false,
        "index": 0,
        "hasBridge": true,
        "hasTunnel": false,
        "roadGradeStrategy": [
          []
        ],
        "hasHighway": true,
        "hasUnpaved": false,
        "distance": 13.053,
        "time": 1075,
        "origIndex": 2,
        "hasSeasonalClosure": false,
        "origNarrative": "Go west on E Colfax Ave/I-70 Bus W/US-40 W/US-287 N.",
        "hasCountryCross": false,
        "formattedTime": "00:17:55",
        "destNarrative": "Proceed to WESTMINSTER, CO.",
        "destIndex": 6,
        "maneuvers": [
          {
            "signs": [],
            "index": 0,
            "maneuverNotes": [],
            "direction": 8,
            "narrative": "Start out going east on E 14th Ave toward Grant St.",
            "iconUrl": "http://content.mapquest.com/mqsite/turnsigns/icon-dirs-start_sm.gif",
            "distance": 0.135,
            "time": 23,
            "linkIds": [],
            "streets": [
              "E 14th Ave"
            ],
            "attributes": 0,
            "transportMode": "AUTO",
            "formattedTime": "00:00:23",
            "directionName": "East",
            "mapUrl": "http://www.mapquestapi.com/staticmap/v4/getmap?key=KEY&type=map&size=225,160&pois=purple-1,39.738451999999995,-104.984855,0,0|purple-2,39.738451999999995,-104.982322,0,0|&center=39.738451999999995,-104.9835885&zoom=13&rand=1046061572&session=57ab59ca-03d9-0002-02b7-3f82-00163e0300b8",
            "startPoint": {
              "lng": -104.984855,
              "lat": 39.738452
            },
            "turnType": 0
          },
          {
            "signs": [],
            "index": 1,
            "maneuverNotes": [],
            "direction": 1,
            "narrative": "Turn left onto Logan St.",
            "iconUrl": "http://content.mapquest.com/mqsite/turnsigns/rs_left_sm.gif",
            "distance": 0.11,
            "time": 25,
            "linkIds": [],
            "streets": [
              "Logan St"
            ],
            "attributes": 0,
            "transportMode": "AUTO",
            "formattedTime": "00:00:25",
            "directionName": "North",
            "mapUrl": "http://www.mapquestapi.com/staticmap/v4/getmap?key=KEY&type=map&size=225,160&pois=purple-2,39.738451999999995,-104.982322,0,0|purple-3,39.740047,-104.982337,0,0|&center=39.7392495,-104.98232949999999&zoom=12&rand=1046061572&session=57ab59ca-03d9-0002-02b7-3f82-00163e0300b8",
            "startPoint": {
              "lng": -104.982322,
              "lat": 39.738452
            },
            "turnType": 6
          },
          {
            "signs": [
              {
                "text": "70",
                "extraText": "BUS",
                "direction": 7,
                "type": 5,
                "url": "http://icons.mqcdn.com/icons/rs5.png?n=70&d=WEST&v=BUS"
              },
              {
                "text": "40",
                "extraText": "",
                "direction": 7,
                "type": 2,
                "url": "http://icons.mqcdn.com/icons/rs2.png?n=40&d=WEST"
              },
              {
                "text": "287",
                "extraText": "",
                "direction": 1,
                "type": 2,
                "url": "http://icons.mqcdn.com/icons/rs2.png?n=287&d=NORTH"
              }
            ],
            "index": 2,
            "maneuverNotes": [],
            "direction": 7,
            "narrative": "Turn left onto E Colfax Ave/I-70 Bus W/US-40 W/US-287 N.",
            "iconUrl": "http://content.mapquest.com/mqsite/turnsigns/rs_left_sm.gif",
            "distance": 0.867,
            "time": 138,
            "linkIds": [],
            "streets": [
              "E Colfax Ave",
              "I-70 Bus W",
              "US-40 W",
              "US-287 N"
            ],
            "attributes": 0,
            "transportMode": "AUTO",
            "formattedTime": "00:02:18",
            "directionName": "West",
            "mapUrl": "http://www.mapquestapi.com/staticmap/v4/getmap?key=KEY&type=map&size=225,160&pois=purple-3,39.740047,-104.982337,0,0|purple-4,39.740187999999996,-104.998153,0,0|&center=39.7401175,-104.990245&zoom=10&rand=1046061572&session=57ab59ca-03d9-0002-02b7-3f82-00163e0300b8",
            "startPoint": {
              "lng": -104.982337,
              "lat": 39.740047
            },
            "turnType": 6
          },
          {
            "signs": [],
            "index": 3,
            "maneuverNotes": [],
            "direction": 2,
            "narrative": "Turn right onto Speer Blvd.",
            "iconUrl": "http://content.mapquest.com/mqsite/turnsigns/rs_right_sm.gif",
            "distance": 1.219,
            "time": 180,
            "linkIds": [],
            "streets": [
              "Speer Blvd"
            ],
            "attributes": 1024,
            "transportMode": "AUTO",
            "formattedTime": "00:03:00",
            "directionName": "Northwest",
            "mapUrl": "http://www.mapquestapi.com/staticmap/v4/getmap?key=KEY&type=map&size=225,160&pois=purple-4,39.740187999999996,-104.998153,0,0|purple-5,39.754343999999996,-105.01035999999999,0,0|&center=39.747265999999996,-105.0042565&zoom=9&rand=1046061572&session=57ab59ca-03d9-0002-02b7-3f82-00163e0300b8",
            "startPoint": {
              "lng": -104.998153,
              "lat": 39.740188
            },
            "turnType": 2
          },
          {
            "signs": [
              {
                "text": "25",
                "extraText": "",
                "direction": 1,
                "type": 1,
                "url": "http://icons.mqcdn.com/icons/rs1.png?n=25&d=NORTH"
              },
              {
                "text": "87",
                "extraText": "",
                "direction": 1,
                "type": 2,
                "url": "http://icons.mqcdn.com/icons/rs2.png?n=87&d=NORTH"
              }
            ],
            "index": 4,
            "maneuverNotes": [],
            "direction": 1,
            "narrative": "Merge onto I-25 N/US-87 N toward Ft Collins.",
            "iconUrl": "http://content.mapquest.com/mqsite/turnsigns/rs_merge_right_sm.gif",
            "distance": 5.156,
            "time": 328,
            "linkIds": [],
            "streets": [
              "I-25 N",
              "US-87 N"
            ],
            "attributes": 1152,
            "transportMode": "AUTO",
            "formattedTime": "00:05:28",
            "directionName": "North",
            "mapUrl": "http://www.mapquestapi.com/staticmap/v4/getmap?key=KEY&type=map&size=225,160&pois=purple-5,39.754343999999996,-105.01035999999999,0,0|purple-6,39.821101999999996,-104.982513,0,0|&center=39.787723,-104.99643649999999&zoom=7&rand=1046061572&session=57ab59ca-03d9-0002-02b7-3f82-00163e0300b8",
            "startPoint": {
              "lng": -105.01036,
              "lat": 39.754344
            },
            "turnType": 10
          },
          {
            "signs": [
              {
                "text": "36",
                "extraText": "",
                "direction": 7,
                "type": 2,
                "url": "http://icons.mqcdn.com/icons/rs2.png?n=36&d=WEST"
              },
              {
                "text": "217A",
                "extraText": "",
                "direction": 0,
                "type": 1001,
                "url": "http://icons.mqcdn.com/icons/rs1001.png?n=217A&d=LEFT"
              }
            ],
            "index": 5,
            "maneuverNotes": [],
            "direction": 7,
            "narrative": "Merge onto US-36 W/Denver Boulder Tpke W via EXIT 217A on the left toward Boulder.",
            "iconUrl": "http://content.mapquest.com/mqsite/turnsigns/rs_merge_left_sm.gif",
            "distance": 4.975,
            "time": 311,
            "linkIds": [],
            "streets": [
              "US-36 W",
              "Denver Boulder Tpke W"
            ],
            "attributes": 1152,
            "transportMode": "AUTO",
            "formattedTime": "00:05:11",
            "directionName": "West",
            "mapUrl": "http://www.mapquestapi.com/staticmap/v4/getmap?key=KEY&type=map&size=225,160&pois=purple-6,39.821101999999996,-104.982513,0,0|purple-7,39.85707,-105.05324499999999,0,0|&center=39.839085999999995,-105.017879&zoom=8&rand=1046061572&session=57ab59ca-03d9-0002-02b7-3f82-00163e0300b8",
            "startPoint": {
              "lng": -104.982513,
              "lat": 39.821102
            },
            "turnType": 11
          },
          {
            "signs": [],
            "index": 6,
            "maneuverNotes": [],
            "direction": 1,
            "narrative": "Take the Sheridan Blvd/CO-95 exit toward 92nd Avenue.",
            "iconUrl": "http://content.mapquest.com/mqsite/turnsigns/rs_gr_exitright_sm.gif",
            "distance": 0.153,
            "time": 16,
            "linkIds": [],
            "streets": [],
            "attributes": 0,
            "transportMode": "AUTO",
            "formattedTime": "00:00:16",
            "directionName": "North",
            "mapUrl": "http://www.mapquestapi.com/staticmap/v4/getmap?key=KEY&type=map&size=225,160&pois=purple-7,39.85707,-105.05324499999999,0,0|purple-8,39.85926,-105.053596,0,0|&center=39.858165,-105.05342049999999&zoom=12&rand=1046061572&session=57ab59ca-03d9-0002-02b7-3f82-00163e0300b8",
            "startPoint": {
              "lng": -105.053245,
              "lat": 39.85707
            },
            "turnType": 14
          },
          {
            "signs": [],
            "index": 7,
            "maneuverNotes": [],
            "direction": 1,
            "narrative": "Keep right to take the Sheridan Blvd N/92nd Ave E ramp.",
            "iconUrl": "http://content.mapquest.com/mqsite/turnsigns/rs_ramp_sm.gif",
            "distance": 0.089,
            "time": 11,
            "linkIds": [],
            "streets": [],
            "attributes": 0,
            "transportMode": "AUTO",
            "formattedTime": "00:00:11",
            "directionName": "North",
            "mapUrl": "http://www.mapquestapi.com/staticmap/v4/getmap?key=KEY&type=map&size=225,160&pois=purple-8,39.85926,-105.053596,0,0|purple-9,39.860476999999996,-105.05375599999999,0,0|&center=39.8598685,-105.053676&zoom=13&rand=1046061572&session=57ab59ca-03d9-0002-02b7-3f82-00163e0300b8",
            "startPoint": {
              "lng": -105.053596,
              "lat": 39.85926
            },
            "turnType": 12
          },
          {
            "signs": [],
            "index": 8,
            "maneuverNotes": [],
            "direction": 3,
            "narrative": "Keep left at the fork in the ramp.",
            "iconUrl": "http://content.mapquest.com/mqsite/turnsigns/rs_fork_left2_sm.gif",
            "distance": 0.033,
            "time": 5,
            "linkIds": [],
            "streets": [],
            "attributes": 0,
            "transportMode": "AUTO",
            "formattedTime": "00:00:05",
            "directionName": "Northeast",
            "mapUrl": "http://www.mapquestapi.com/staticmap/v4/getmap?key=KEY&type=map&size=225,160&pois=purple-9,39.860476999999996,-105.05375599999999,0,0|purple-10,39.860912,-105.053512,0,0|&center=39.860694499999994,-105.05363399999999&zoom=15&rand=1046061572&session=57ab59ca-03d9-0002-02b7-3f82-00163e0300b8",
            "startPoint": {
              "lng": -105.053756,
              "lat": 39.860477
            },
            "turnType": 17
          },
          {
            "signs": [
              {
                "text": "95",
                "extraText": "",
                "direction": 0,
                "type": 505,
                "url": "http://icons.mqcdn.com/icons/rs505.png?n=95"
              }
            ],
            "index": 9,
            "maneuverNotes": [],
            "direction": 1,
            "narrative": "Turn slight right onto Sheridan Blvd/CO-95.",
            "iconUrl": "http://content.mapquest.com/mqsite/turnsigns/rs_slight_right_sm.gif",
            "distance": 0.163,
            "time": 18,
            "linkIds": [],
            "streets": [
              "Sheridan Blvd",
              "CO-95"
            ],
            "attributes": 0,
            "transportMode": "AUTO",
            "formattedTime": "00:00:18",
            "directionName": "North",
            "mapUrl": "http://www.mapquestapi.com/staticmap/v4/getmap?key=KEY&type=map&size=225,160&pois=purple-10,39.860912,-105.053512,0,0|purple-11,39.863201,-105.05304699999999,0,0|&center=39.862056499999994,-105.0532795&zoom=12&rand=1046061572&session=57ab59ca-03d9-0002-02b7-3f82-00163e0300b8",
            "startPoint": {
              "lng": -105.053512,
              "lat": 39.860912
            },
            "turnType": 1
          },
          {
            "signs": [],
            "index": 10,
            "maneuverNotes": [],
            "direction": 8,
            "narrative": "Turn right onto W 92nd Ave.",
            "iconUrl": "http://content.mapquest.com/mqsite/turnsigns/rs_right_sm.gif",
            "distance": 0.153,
            "time": 20,
            "linkIds": [],
            "streets": [
              "W 92nd Ave"
            ],
            "attributes": 0,
            "transportMode": "AUTO",
            "formattedTime": "00:00:20",
            "directionName": "East",
            "mapUrl": "http://www.mapquestapi.com/staticmap/v4/getmap?key=KEY&type=map&size=225,160&pois=purple-11,39.863201,-105.05304699999999,0,0|purple-12,39.863459999999996,-105.050338,0,0|&center=39.8633305,-105.0516925&zoom=13&rand=1046061572&session=57ab59ca-03d9-0002-02b7-3f82-00163e0300b8",
            "startPoint": {
              "lng": -105.053047,
              "lat": 39.863201
            },
            "turnType": 2
          },
          {
            "signs": [],
            "index": 11,
            "maneuverNotes": [],
            "direction": 0,
            "narrative": "Welcome to WESTMINSTER, CO.",
            "iconUrl": "http://content.mapquest.com/mqsite/turnsigns/icon-dirs-end_sm.gif",
            "distance": 0,
            "time": 0,
            "linkIds": [],
            "streets": [],
            "attributes": 0,
            "transportMode": "AUTO",
            "formattedTime": "00:00:00",
            "directionName": "",
            "startPoint": {
              "lng": -105.050338,
              "lat": 39.86346
            },
            "turnType": -1
          }
        ],
        "hasFerry": false
      },
      {
        "hasTollRoad": false,
        "index": 1,
        "hasBridge": true,
        "hasTunnel": false,
        "roadGradeStrategy": [
          []
        ],
        "hasHighway": true,
        "hasUnpaved": false,
        "distance": 17.06,
        "time": 1289,
        "origIndex": 3,
        "hasSeasonalClosure": false,
        "origNarrative": "Go west on US-36 W/N Foothills Hwy W/Denver Boulder Tpke W.",
        "hasCountryCross": false,
        "formattedTime": "00:21:29",
        "destNarrative": "Proceed to BOULDER, CO.",
        "destIndex": 4,
        "maneuvers": [
          {
            "signs": [],
            "index": 12,
            "maneuverNotes": [],
            "direction": 1,
            "narrative": "Start out going north on Yates St toward W 92nd Ave.",
            "iconUrl": "http://content.mapquest.com/mqsite/turnsigns/icon-dirs-start_sm.gif",
            "distance": 0.012,
            "time": 10,
            "linkIds": [],
            "streets": [
              "Yates St"
            ],
            "attributes": 0,
            "transportMode": "AUTO",
            "formattedTime": "00:00:10",
            "directionName": "North",
            "mapUrl": "http://www.mapquestapi.com/staticmap/v4/getmap?key=KEY&type=map&size=225,160&pois=purple-13,39.863459999999996,-105.050338,0,0|purple-14,39.863631999999996,-105.050338,0,0|&center=39.863546,-105.050338&zoom=15&rand=1046061572&session=57ab59ca-03d9-0002-02b7-3f82-00163e0300b8",
            "startPoint": {
              "lng": -105.050338,
              "lat": 39.86346
            },
            "turnType": 0
          },
          {
            "signs": [],
            "index": 13,
            "maneuverNotes": [],
            "direction": 7,
            "narrative": "Turn left onto W 92nd Ave.",
            "iconUrl": "http://content.mapquest.com/mqsite/turnsigns/rs_left_sm.gif",
            "distance": 0.157,
            "time": 32,
            "linkIds": [],
            "streets": [
              "W 92nd Ave"
            ],
            "attributes": 0,
            "transportMode": "AUTO",
            "formattedTime": "00:00:32",
            "directionName": "West",
            "mapUrl": "http://www.mapquestapi.com/staticmap/v4/getmap?key=KEY&type=map&size=225,160&pois=purple-14,39.863631999999996,-105.050338,0,0|purple-15,39.863676999999996,-105.053291,0,0|&center=39.863654499999996,-105.0518145&zoom=13&rand=1046061572&session=57ab59ca-03d9-0002-02b7-3f82-00163e0300b8",
            "startPoint": {
              "lng": -105.050338,
              "lat": 39.863632
            },
            "turnType": 6
          },
          {
            "signs": [
              {
                "text": "95",
                "extraText": "",
                "direction": 0,
                "type": 505,
                "url": "http://icons.mqcdn.com/icons/rs505.png?n=95"
              }
            ],
            "index": 14,
            "maneuverNotes": [],
            "direction": 4,
            "narrative": "Turn left onto Sheridan Blvd/CO-95.",
            "iconUrl": "http://content.mapquest.com/mqsite/turnsigns/rs_left_sm.gif",
            "distance": 0.198,
            "time": 28,
            "linkIds": [],
            "streets": [
              "Sheridan Blvd",
              "CO-95"
            ],
            "attributes": 0,
            "transportMode": "AUTO",
            "formattedTime": "00:00:28",
            "directionName": "South",
            "mapUrl": "http://www.mapquestapi.com/staticmap/v4/getmap?key=KEY&type=map&size=225,160&pois=purple-15,39.863676999999996,-105.053291,0,0|purple-16,39.860858,-105.05371,0,0|&center=39.8622675,-105.0535005&zoom=12&rand=1046061572&session=57ab59ca-03d9-0002-02b7-3f82-00163e0300b8",
            "startPoint": {
              "lng": -105.053291,
              "lat": 39.863677
            },
            "turnType": 6
          },
          {
            "signs": [
              {
                "text": "36",
                "extraText": "",
                "direction": 7,
                "type": 2,
                "url": "http://icons.mqcdn.com/icons/rs2.png?n=36&d=WEST"
              }
            ],
            "index": 15,
            "maneuverNotes": [],
            "direction": 7,
            "narrative": "Merge onto US-36 W/N Foothills Hwy W/Denver Boulder Tpke W.",
            "iconUrl": "http://content.mapquest.com/mqsite/turnsigns/rs_merge_right_sm.gif",
            "distance": 14.675,
            "time": 910,
            "linkIds": [],
            "streets": [
              "US-36 W",
              "N Foothills Hwy W",
              "Denver Boulder Tpke W"
            ],
            "attributes": 1152,
            "transportMode": "AUTO",
            "formattedTime": "00:15:10",
            "directionName": "West",
            "mapUrl": "http://www.mapquestapi.com/staticmap/v4/getmap?key=KEY&type=map&size=225,160&pois=purple-16,39.860858,-105.05371,0,0|purple-17,39.997634,-105.25396699999999,0,0|&center=39.929246,-105.15383849999999&zoom=6&rand=1046061572&session=57ab59ca-03d9-0002-02b7-3f82-00163e0300b8",
            "startPoint": {
              "lng": -105.05371,
              "lat": 39.860858
            },
            "turnType": 10
          },
          {
            "signs": [],
            "index": 16,
            "maneuverNotes": [],
            "direction": 2,
            "narrative": "Take the Baseline Rd exit toward CO-93/Broadway.",
            "iconUrl": "http://content.mapquest.com/mqsite/turnsigns/rs_gr_exitright_sm.gif",
            "distance": 0.245,
            "time": 33,
            "linkIds": [],
            "streets": [],
            "attributes": 0,
            "transportMode": "AUTO",
            "formattedTime": "00:00:33",
            "directionName": "Northwest",
            "mapUrl": "http://www.mapquestapi.com/staticmap/v4/getmap?key=KEY&type=map&size=225,160&pois=purple-17,39.997634,-105.25396699999999,0,0|purple-18,40.000113999999996,-105.257049,0,0|&center=39.998874,-105.25550799999999&zoom=12&rand=1046061572&session=57ab59ca-03d9-0002-02b7-3f82-00163e0300b8",
            "startPoint": {
              "lng": -105.253967,
              "lat": 39.997634
            },
            "turnType": 14
          },
          {
            "signs": [
              {
                "text": "56",
                "extraText": "",
                "direction": 0,
                "type": 4
              }
            ],
            "index": 17,
            "maneuverNotes": [],
            "direction": 7,
            "narrative": "Turn left onto Baseline Rd/County Hwy-56.",
            "iconUrl": "http://content.mapquest.com/mqsite/turnsigns/rs_left_sm.gif",
            "distance": 0.334,
            "time": 51,
            "linkIds": [],
            "streets": [
              "Baseline Rd",
              "County Hwy-56"
            ],
            "attributes": 0,
            "transportMode": "AUTO",
            "formattedTime": "00:00:51",
            "directionName": "West",
            "mapUrl": "http://www.mapquestapi.com/staticmap/v4/getmap?key=KEY&type=map&size=225,160&pois=purple-18,40.000113999999996,-105.257049,0,0|purple-19,40.000202,-105.263145,0,0|&center=40.000158,-105.260097&zoom=12&rand=1046061572&session=57ab59ca-03d9-0002-02b7-3f82-00163e0300b8",
            "startPoint": {
              "lng": -105.257049,
              "lat": 40.000114
            },
            "turnType": 6
          },
          {
            "signs": [
              {
                "text": "93",
                "extraText": "",
                "direction": 0,
                "type": 505,
                "url": "http://icons.mqcdn.com/icons/rs505.png?n=93"
              }
            ],
            "index": 18,
            "maneuverNotes": [],
            "direction": 2,
            "narrative": "Turn right onto Broadway St/CO-93.",
            "iconUrl": "http://content.mapquest.com/mqsite/turnsigns/rs_right_sm.gif",
            "distance": 1.439,
            "time": 225,
            "linkIds": [],
            "streets": [
              "Broadway St",
              "CO-93"
            ],
            "attributes": 0,
            "transportMode": "AUTO",
            "formattedTime": "00:03:45",
            "directionName": "Northwest",
            "mapUrl": "http://www.mapquestapi.com/staticmap/v4/getmap?key=KEY&type=map&size=225,160&pois=purple-19,40.000202,-105.263145,0,0|purple-20,40.01583,-105.27926599999999,0,0|&center=40.008016,-105.2712055&zoom=9&rand=1046061572&session=57ab59ca-03d9-0002-02b7-3f82-00163e0300b8",
            "startPoint": {
              "lng": -105.263145,
              "lat": 40.000202
            },
            "turnType": 2
          },
          {
            "signs": [],
            "index": 19,
            "maneuverNotes": [],
            "direction": 0,
            "narrative": "Welcome to BOULDER, CO.",
            "iconUrl": "http://content.mapquest.com/mqsite/turnsigns/icon-dirs-end_sm.gif",
            "distance": 0,
            "time": 0,
            "linkIds": [],
            "streets": [],
            "attributes": 0,
            "transportMode": "AUTO",
            "formattedTime": "00:00:00",
            "directionName": "",
            "startPoint": {
              "lng": -105.279266,
              "lat": 40.01583
            },
            "turnType": -1
          }
        ],
        "hasFerry": false
      }
    ],
    "formattedTime": "00:39:24",
    "routeError": {
      "message": "",
      "errorCode": -400
    },
    "options": {
      "mustAvoidLinkIds": [],
      "drivingStyle": 2,
      "countryBoundaryDisplay": true,
      "generalize": -1,
      "narrativeType": "text",
      "locale": "en_US",
      "avoidTimedConditions": false,
      "destinationManeuverDisplay": true,
      "enhancedNarrative": false,
      "filterZoneFactor": -1,
      "timeType": 0,
      "maxWalkingDistance": -1,
      "routeType": "FASTEST",
      "transferPenalty": -1,
      "walkingSpeed": -1,
      "stateBoundaryDisplay": true,
      "maxLinkId": 0,
      "arteryWeights": [],
      "tryAvoidLinkIds": [],
      "unit": "M",
      "routeNumber": 0,
      "doReverseGeocode": true,
      "shapeFormat": "raw",
      "maneuverPenalty": -1,
      "useTraffic": false,
      "returnLinkDirections": false,
      "avoidTripIds": [],
      "manmaps": "true",
      "highwayEfficiency": 22,
      "sideOfStreetDisplay": true,
      "cyclingRoadFactor": 1,
      "urbanAvoidFactor": -1
    },
    "hasFerry": false
  },
  "info": {
    "copyright": {
      "text": "© 2017 MapQuest, Inc.",
      "imageUrl": "http://api.mqcdn.com/res/mqlogo.gif",
      "imageAltText": "© 2017 MapQuest, Inc."
    },
    "statuscode": 0,
    "messages": []
  }
}