Overview
Calculate a route between two locations. Use this tool when the user needs to:- calculate driving distance
- estimate travel time
- get a route between two locations
- get route geometry
- understand which roads a route uses
- avoid specific road types
table instead.
Do not use it for assigning jobs to vehicles or ordering multiple stops. Use optimize instead.
Input
Motorcycle routing
profile is optional.
Set it to "motorcycle" when the user explicitly asks for a motorcycle or motorbike route.
Otherwise, omit profile to use the default driving profile.
Avoiding roads
Useexclude when the user explicitly asks to avoid a road type.
Supported values:
tollmotorwayferry
Output
distance_meters— route distance in metersduration_seconds— estimated travel time in secondsprofile— routing profile usedgeometry— simplified encoded polyline for the routesummary.roads— main roads used by the routesummary.tolls— whether the route uses toll roadssummary.ferry— whether the route includes a ferry crossing
geocode first.
