Step-by-step Navigation instructions

Product Used: Navigation API


NextBillion.ai’s Navigation API returns step-by-step instructions in the desired language to facilitate a seamless navigation experience for your drivers. The Navigation API can be easily customized using a wide range of routing constraints available with the service and depending on the type of request, the routing engine will suggest optimal routes as per the given constraints and traffic conditions.

In this example, we are going to request step-by-step instructions for a trip with a couple of stopovers before the destination by configuring

  1. A pair of “origin” & “destination” locations
  2. “mode” option set to “truck”.
  3. “waypoints” parameter containing coordinates for 3 stops before the “destination”
  4. “lang” set to “es” for instructions in Spanish

Request

1
curl --location 'https://api.nextbillion.io/navigation/json?key=<your_api_key>&origin=25.84220637,-80.36236245&destination=25.76683324,-80.21609475&mode=truck&waypoints=25.91338203,-80.34023395|25.90554444,-80.25598479|25.84769524,-80.22941337&lang=es'

Response

Observe that all the stops are covered by the route on the way to destination.

1
{
2
"status": "Ok",
3
"routes": '[...]'
4
}

Visit Navigation API documentation to know more about the available features.

© 2024 NextBillion.ai all rights reserved.