Compute durations/distances between all pairs of coordinates
curl --request GET \
--url https://api.justrouting.tech/table/v1/{profile}/{coordinates} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.justrouting.tech/table/v1/{profile}/{coordinates}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.justrouting.tech/table/v1/{profile}/{coordinates}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.justrouting.tech/table/v1/{profile}/{coordinates}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.justrouting.tech/table/v1/{profile}/{coordinates}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.justrouting.tech/table/v1/{profile}/{coordinates}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.justrouting.tech/table/v1/{profile}/{coordinates}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"code": "Ok",
"durations": [
[
123
]
],
"distances": [
[
123
]
],
"sources": [
{
"name": "<string>",
"location": [
123
],
"distance": 123,
"hint": "<string>",
"nodes": [
123
]
}
],
"destinations": [
{
"name": "<string>",
"location": [
123
],
"distance": 123,
"hint": "<string>",
"nodes": [
123
]
}
],
"fallback_speed_cells": [
[
123
]
]
}{
"code": "InvalidUrl",
"message": "<string>"
}{
"code": "missing_auth",
"message": "<string>"
}{
"code": "rate_limited",
"message": "<string>"
}table
Compute durations/distances between all pairs of coordinates
GET
/
table
/
v1
/
{profile}
/
{coordinates}
Compute durations/distances between all pairs of coordinates
curl --request GET \
--url https://api.justrouting.tech/table/v1/{profile}/{coordinates} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.justrouting.tech/table/v1/{profile}/{coordinates}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.justrouting.tech/table/v1/{profile}/{coordinates}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.justrouting.tech/table/v1/{profile}/{coordinates}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.justrouting.tech/table/v1/{profile}/{coordinates}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.justrouting.tech/table/v1/{profile}/{coordinates}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.justrouting.tech/table/v1/{profile}/{coordinates}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"code": "Ok",
"durations": [
[
123
]
],
"distances": [
[
123
]
],
"sources": [
{
"name": "<string>",
"location": [
123
],
"distance": 123,
"hint": "<string>",
"nodes": [
123
]
}
],
"destinations": [
{
"name": "<string>",
"location": [
123
],
"distance": 123,
"hint": "<string>",
"nodes": [
123
]
}
],
"fallback_speed_cells": [
[
123
]
]
}{
"code": "InvalidUrl",
"message": "<string>"
}{
"code": "missing_auth",
"message": "<string>"
}{
"code": "rate_limited",
"message": "<string>"
}Authorizations
API key created in the JustRouting dashboard.
Path Parameters
Available options:
driving, motorcycle Semicolon-separated {lng},{lat} pairs, all in the same country.
Query Parameters
Source indices {i};{j};... or all (default).
Destination indices {i};{j};... or all (default).
Which table(s) to return.
Available options:
duration, distance, duration,distance For unreachable pairs, estimate duration from crow-fly distance at this speed (km/h equivalent meters per second ratio).
Available options:
input, snapped Scale all durations by this factor.
Response
Matrix computed
Available options:
Ok Row-major matrix of durations in seconds; null entries mean unreachable.
Row-major matrix of distances in meters.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Required array length:
2 elements