Common tasks
| You need |
Call |
Read |
| Directions between two addresses |
GET /v2/geocode for each address, then POST /v2/route with steps: true |
legs[].steps[].instruction |
| How long a trip takes |
POST /v2/route |
routes[0].duration_s |
| The closest of several places by drive time |
POST /v2/matrix, 1 source and up to 25 destinations |
Smallest non-null value in durations_s[0] |
| Everywhere within 15 minutes |
GET /v2/isochrone with time_s=900 |
The GeoJSON polygon |
| The address at a coordinate |
GET /v2/reverse |
results[0].label |
| Search results near the user |
GET /v2/geocode with near, or bbox when location is off |
results. See Search near your user |
| The road point next to a dropped pin |
GET /v2/nearest |
location and distance_m |
| Whether a feature exists here |
GET /v2/info |
capabilities |
Partial results
- A matrix cell can be
null. That means no route or an unsnapped point, and it isn't an error.
results: [] from geocode or reverse means no match. Tell the user. Don't retry the same query.
no_route can also mean an engine limit was hit, so don't claim that no road exists.
What the API can't do
| Request |
Answer |
| Walking or cycling directions |
Not available. Only car and car_night exist. |
| Live traffic or road closures |
Not available. Times come from typical road speeds. |
| The best order to visit stops |
Not available. Stops stay in the order you send them. |
| Alternative routes |
Not available. A response has exactly one route. |
| Hazard or flood-safe routing |
Not available in this version. conditions reports "assessed": false. |