Duration, baseDuration, typicalDuration, mlDuration
When sending a request to calculate a route, you can request various duration properties in the response. These response properties provide information about the time it takes to traverse a route section, to traverse a span, or to perform an action.
There are four different types of properties that describe duration, each expressed in seconds:
| Uses dynamic traffic info | Uses historical traffic patterns | Uses freeflow speeds | Description | |
|---|---|---|---|---|
duration | ✅ | ✅ | ✅ | Duration calculated using all available data sources. |
typicalDuration | ❌ | ✅ | ✅ | Duration typical for the time of day when the route is traversed. |
baseDuration | ❌ | ❌ | ✅ | Duration without time-awareness. |
mlDuration | ✅ | ✅ | ✅ | Duration calculated using all available data sources, enhanced with region-specific machine learning models. Available only in certain regions. |
Note
For transit sections,
baseDuration,typicalDuration, andmlDurationdon't exist as their value is always equal toduration.
Get route section summaries
When you send a request to calculate route, use the return=summary parameter to get the total duration for every section of the route.
Add return=summary to get a summary with duration and baseDuration. To get typicalDuration or mlDuration, add them to the items in the return=summary parameter.
baseDuration greater than duration
baseDuration greater than durationThe value of baseDuration can exceed the value of duration if the trafficSpeed is higher than the baseSpeed along the route.
Subtracting baseDuration from duration can be useful as a measure of "traffic delay", but must be used with caution given that the result can be negative.
Next steps
- See Time-dependent routing to learn more about how departure and arrival time affect routing.
- See What are route sections to learn what sections are in the Routing API v8.
- See Route summary to learn how to request various durations in the route section summary.
- See Spans to learn more about route spans.
Updated 9 days ago