Skip to content
GuidesBlogPlaygroundDashboard

Calculate a distance matrix between points

$ plaza routing matrix
POST/api/v1/matrix

Calculate a distance matrix between points

ParametersExpand Collapse
--destination: array of object { lat, lng }

Array of destination coordinates (max 50)

--origin: array of object { lat, lng }

Array of origin coordinates (max 50)

--annotations: optional string

Comma-separated list of annotations to include: duration (always included), distance. Example: duration,distance.

--fallback-speed: optional number

Fallback speed in km/h for pairs where no route exists. When set, unreachable pairs get estimated values instead of null.

--mode: optional "auto" or "foot" or "bicycle"

Travel mode (default: auto)

ReturnsExpand Collapse
matrix_result: map[unknown]

Distance matrix result. The exact response shape depends on the routing backend. Contains duration (and optionally distance) data for all origin-destination pairs. Null values indicate unreachable pairs.

Calculate a distance matrix between points

plaza routing matrix \
  --api-key 'My API Key' \
  --destination '{lat: 48.8584, lng: 2.2945}' \
  --origin '{lat: 48.8566, lng: 2.3522}' \
  --origin '{lat: 48.8606, lng: 2.3376}'
{
  "foo": "bar"
}
Returns Examples
{
  "foo": "bar"
}