Examples

Build a route

https://api.routing.yandex.net/v2/route?waypoints=25.234369457896325,55.280222457968712|25.234369457896325,55.401544758961258&apikey=YOUR_API_KEY

A car route between Dubai Airport and the Rove La Mer Beach Hotel.

Take into account the departure time (and traffic forecast)

The same route 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://api.routing.yandex.net/v2/route?waypoints=25.234369457896325,55.280222457968712|25.234369457896325,55.401544758961258&departure_time=YOUR_UNIX_TIME&apikey=YOUR_API_KEY

Avoid toll roads

https://api.routing.yandex.net/v2/route?waypoints=25.234369457896325,55.280222457968712|25.234369457896325,55.401544758961258&avoid_tolls=true&apikey=YOUR_API_KEY

For pedestrians

https://api.routing.yandex.net/v2/route?waypoints=25.234369457896325,55.280222457968712|25.234369457896325,55.401544758961258&mode=walking&apikey=YOUR_API_KEY

For public transport

https://api.routing.yandex.net/v2/route?waypoints=25.234369457896325,55.280222457968712|25.234369457896325,55.401544758961258&mode=transit&apikey=YOUR_API_KEY

For truck

https://api.routing.yandex.net/v2/route?waypoints=25.234369457896325,55.280222457968712|25.234369457896325,55.401544758961258&mode=truck&apikey=YOUR_API_KEY

With parameters of the truck

For a truck weighing 5 tons and 12 meters long

https://api.routing.yandex.net/v2/route?waypoints=25.234369457896325,55.280222457968712|25.234369457896325,55.401544758961258&mode=truck&weight=5&length=12&apikey=YOUR_API_KEY