Routing response can have several types of duration:
duration- total duration of the action, section, and so on
baseDuration- duration of route section (in seconds) ignoring time-aware information. In particular, dynamic traffic information is not taken into account. Only average free-flow speeds based on historical traffic are used to calculate this duration. The
baseDurationcan also be understood as the best possible duration.
typicalDuration- duration with typical traffic information for the given time of day
mlDuration- duration based on the region-specific machine learning model
mlDuration do not exist for transit sections or actions because these are always equal to
In order to obtain
mlDuration, request this information explicitly
If you need to calculate
mlDuration for the whole route, you need to add
duration to the sum in places where only
For all duration types, the values are returned in seconds.
For code samples to calculate duration, see these tutorials: