Skip to main content

Directions API

Returns the real road route between two points (or ordered waypoints): distance (meters), estimated duration (seconds), route geometry (polyline or GeoJSON), and optional turn-by-turn steps.
Want to try it first? Open the Live Demo and drag the A/B markers on the map.

Endpoint

Quickstart

Request Parameters

General options

Snapping control

Examples

Response

response-example.json

Response fields

Precision-5 polyline — decodable with any polyline library:
Note the decoded pairs are [lat, lng] — the opposite order of the lng,lat request input.
Coordinates use lng,lat order, and all coordinates in one request must be in the same country. See Coverage.

Errors

Recipes

Distance Matrix

Travel time and distance between many points in one call

Fleet Optimization

VROOM vehicle routing with time windows and capacity

Map Matching

Snap GPS traces to real roads