Basic Directions Fast Request

Implement Using: Directions Fast API

To create a simple Directions Fast request we will provide an origin from where a trip starts and a destination where it ends. We also set `mode=car’ to get a legal route which a car can take. Once a request is submitted successfully, the API responds with a route geometry and the trip duration and distance information.

Request

1curl --location 'https://api.nextbillion.io/directions/json?origin=34.05456317,-118.31528428&destination=33.96763110,-118.23215346&mode=car&key=<your_api_key>' \
2--header 'Content-Type: application/json'

Response

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