Skip to content

Examples

Car matrix: two origins, two destinations

Calculate travel times and distances from two origins to two destinations by car:

GET https://routing.maptoolkit.net/matrix?routeType=car&from=51.2194,6.7941&from=50.7323,7.0960&to=50.9420,6.9581&to=50.7681,6.0926&api_key=YOUR_API_KEY

Response:

{
  "times": [[1765, 3391], [1453, 3587]],
  "distances": [[39594, 86415], [30321, 94823]]
}

The result is ordered as [from1→to1, from1→to2, ...], [from2→to1, from2→to2, ...]. Times are in seconds, distances in meters.

If a connection cannot be found, the value is null. The distances matrix is not available for the transit profile.