Skip to main content
GET
Compute durations/distances between all pairs of coordinates

Authorizations

Authorization
string
header
required

API key created in the JustRouting dashboard.

Path Parameters

profile
enum<string>
required
Available options:
driving,
motorcycle
coordinates
string
required

Semicolon-separated {lng},{lat} pairs, all in the same country.

Query Parameters

sources
string

Source indices {i};{j};... or all (default).

destinations
string

Destination indices {i};{j};... or all (default).

annotations
enum<string>
default:duration

Which table(s) to return.

Available options:
duration,
distance,
duration,distance
fallback_speed
number

For unreachable pairs, estimate duration from crow-fly distance at this speed (km/h equivalent meters per second ratio).

fallback_coordinate
enum<string>
default:input
Available options:
input,
snapped
scale_factor
number

Scale all durations by this factor.

Response

Matrix computed

code
enum<string>
Available options:
Ok
durations
((number | null)[])[]

Row-major matrix of durations in seconds; null entries mean unreachable.

distances
((number | null)[])[]

Row-major matrix of distances in meters.

sources
object[]
destinations
object[]
fallback_speed_cells
integer[][]
Required array length: 2 elements