Examples

One departure point, one arrival point

https://distancematrix.api.mappable.world/v2/?origins=55.350952,25.249269&destinations=55.254270,25.225335&apikey=YOUR_API_KEY

Suitable, for example, to estimate the distance and duration of the route between Dubai Airport and the Rove La Mer Beach Hotel.

Multiple departure points, one arrival point

https://distancematrix.api.mappable.world/v2/?origins=55.350952,25.249269|55.351206,25.248066&destinations=55.254270,25.225335&apikey=YOUR_API_KEY

We want to compare the distance and duration of routes from two adjacent public transport stops near the Dubai Airport terminal to the Rove La Mer Beach Hotel. Or find out which of the spouses is faster or closer to go to the bank.

One departure point, several arrival points

https://distancematrix.api.mappable.world/v2/?origins=55.350952,25.249269&destinations=55.254270,25.225335|55.261586,25.230278&apikey=YOUR_API_KEY

Which restaurant is closest to the airport? Or which metro station is closer to the point of departure?

Multiple departure points, multiple arrival points

https://distancematrix.api.mappable.world/v2/?origins=55.350952,25.249269|55.351206,25.248066&destinations=55.254270,25.225335|55.261586,25.230278&apikey=YOUR_API_KEY

We want to calculate the optimal routes for several couriers who need to deliver goods from different warehouses to different customers. Or the cleaning service wants to find out which cleaner will be more convenient to get to each of today's orders from home and make an optimal scheme for moving cleaners.

Take into account the departure time (and traffic forecast)

For example, we want to calculate the route time and distance for the departure of the car in 30 minutes.

Get the departure time:

const YOUR_UNIX_TIME = Math.floor(Date.now() / 1000) + 30 * 60;

Substituting in the request:

https://distancematrix.api.mappable.world/v2/?origins=55.350952,25.249269&destinations=55.254270,25.225335&departure_time=YOUR_UNIX_TIME&apikey=YOUR_API_KEY

Avoid toll roads

https://distancematrix.api.mappable.world/v2/?origins=55.350952,25.249269&destinations=55.254270,25.225335&avoid_tolls=true&apikey=YOUR_API_KEY

For pedestrians

https://distancematrix.api.mappable.world/v2/?origins=55.350952,25.249269&destinations=55.254270,25.225335&mode=walking&apikey=YOUR_API_KEY

For truck

https://distancematrix.api.mappable.world/v2/?origins=55.350952,25.249269&destinations=55.254270,25.225335&mode=truck&apikey=YOUR_API_KEY

With parameters of the truck

For a truck weighing 5 tons and 12 meters long

https://distancematrix.api.mappable.world/v2/?origins=55.350952,25.249269&destinations=55.254270,25.225335&mode=truck&weight=5&weight=12&apikey=YOUR_API_KEY