route_matrix
Compute road travel times and distances for multiple origins and destinations in one call, identifying the nearest destination for each origin.
Instructions
Get road travel times and distances between many origins and destinations at once.
One call answers "which depot is closest by road to each customer", "which crew can reach each job fastest", or ranks candidate sites by access. Returns a duration and distance for every origin-destination pair, indexed [origin][destination], plus the nearest destination for each origin. Unreachable pairs are null.
For turn-by-turn directions on one trip, use route_directions. For everywhere reachable within a time budget, use route_isochrone. For straight-line distance, use geom_measure.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| origins | Yes | Start points, semicolon-separated, as coordinates or place names. Example: '48.8584,2.2945; 48.8606,2.3376' | |
| profile | No | Vehicle type. | car |
| destinations | No | End points in the same form. Leave empty to measure every origin against every other origin. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| meta | Yes | ||
| nearest | Yes | ||
| origins | Yes | ||
| profile | Yes | ||
| duration_s | Yes | ||
| distance_km | Yes | ||
| destinations | Yes |