Routing API Developer's Guide

Time-Aware Routing

Time-aware routing enables the API to handle time-dependent restrictions in an optimal way, such as:
  • the direction of travel restrictions, including reversible roads
  • high-occupancy vehicle (HOV) lanes
  • time-restricted maneuvers
  • seasonal closures

The Routing API calculates the route in a way that respects time zones, including daylight savings time, and time-related events such as traffic, along the whole route.

The following user input and settings can influence route calculation:
  • When a user specifies a departure time in the request, the API takes time-aware restrictions into consideration.
  • When the user is in trip planning mode (departure time is not specified), the API does not take time-aware restrictions into consideration.
If a maneuver is a subject to potential time restrictions, the API provides a corresponding warning in the JSON output, as a note in the maneuver section. This note could be one of the following:
  • a restriction – in case it is possible to avoid the maneuver
  • a violation – in case it is not possible to avoid the maneuver

The type of note depends on the type of restriction and on whether the request uses time-aware or trip planning mode. The following table lists the available note types.

Type of Restriction Time-Aware Mode Planning Mode
Restriction violated Restriction present
Reversible Express Lanes violation restriction restriction
Carpool HOV Lanes violation restriction restriction
Seasonal Closures restriction restriction restriction

If a maneuver is a subject to a time-dependent warning, the JSON output contains the following note within the maneuver section:
note : [ <1 elem>
    0 : {
      type: restriction|violation
      code: timeDependentRestriction
      type: "..."
    }
]