Navigation API

Premium Edition Only
The NextBillion.ai Navigation API is available only in a Premium plan Please contact support if you wish to use this API and other premium services at [email protected]

Introduction

Nextbillion.ai’s Navigation API is a service that computes a route between 2 places, and also returns detailed turn by turn instructions for the route.

The Navigation API can be used as an input into your Navigation app. Alternatively, you can directly use Nextbillion.ai’s Navigation SDK for a complete turn by turn navigation experience.

Parameters

Loading...

Response Schema

Loading...

Query Limits

Nextbillion.ai allows a maximum rate limit of 6000 queries per minute or 100 queries/second for continuous requests.

Note: We can increase the quota if needed on request. Contact [email protected] for more details.

Examples

Sample API Request

https://api.nextbillion.io/navigation/json?key=<YOUR_API_KEY>&origin=33.94195007,-118.13650763&destination=33.93922771,-118.13152885

Sample API Response

1{
2  "status": "ok",
3  "routes": [
4    {
5      "geometry": "c}sv_Azhni`FuBnEfErClPc^[email protected]~Ps`@lImR`FuKnGaN|BaFdDgHxDcJfL}[email protected]~CiH",
6      "distance": 586.0,
7      "duration": 80.1,
8      "legs": [
9        {
10          "distance": {
11            "value": 586
12          },
13          "duration": {
14            "value": 80
15          },
16          "steps": [
17            {
18              "geometry": "c}sv_Azhni`FuBnE",
19              "start_location": {
20                "latitude": 0.0,
21                "longitude": 0.0
22              },
23              "end_location": {
24                "latitude": 0.0,
25                "longitude": 0.0
26              },
27              "distance": {
28                "value": 11
29              },
30              "duration": {
31                "value": 1
32              },
33              "maneuver": {
34                "instruction": "Head northwest on Firestone Blvd",
35                "voice_instruction": [],
36                "bearing_before": 0,
37                "bearing_after": 304,
38                "coordinate": {
39                  "latitude": 33.941986,
40                  "longitude": -118.136478
41                },
42                "maneuver_type": "depart"
43              },
44              "name": "Firestone Blvd",
45              "intersections": [
46                {
47                  "location": {
48                    "latitude": 33.941986,
49                    "longitude": -118.136478
50                  },
51                  "bearings": [304],
52                  "classes": [],
53                  "entry": [],
54                  "intersection_in": 0,
55                  "intersection_out": 0,
56                  "lanes": []
57                }
58              ]
59            },
60            {
61              "geometry": "y`tv_Ajoni`FfErClPc^[email protected]~Ps`@lImR`FuKnGaN|BaFdDgHxDcJfL}[email protected]~CiH",
62              "start_location": {
63                "latitude": 0.0,
64                "longitude": 0.0
65              },
66              "end_location": {
67                "latitude": 0.0,
68                "longitude": 0.0
69              },
70              "distance": {
71                "value": 574
72              },
73              "duration": {
74                "value": 78
75              },
76              "maneuver": {
77                "instruction": "Make a U-turn and continue on Firestone Blvd",
78                "voice_instruction": [],
79                "bearing_before": 303,
80                "bearing_after": 210,
81                "coordinate": {
82                  "latitude": 33.942045,
83                  "longitude": -118.136582
84                },
85                "maneuver_type": "continue",
86                "modifier": "uturn"
87              },
88              "name": "Firestone Blvd",
89              "intersections": [
90                {
91                  "location": {
92                    "latitude": 33.942045,
93                    "longitude": -118.136582
94                  },
95                  "bearings": [30, 120, 210, 300],
96                  "classes": [],
97                  "entry": [],
98                  "intersection_in": 1,
99                  "intersection_out": 2,
100                  "lanes": []
101                },
102                {
103                  "location": {
104                    "latitude": 33.941945,
105                    "longitude": -118.136656
106                  },
107                  "bearings": [30, 120, 210, 300],
108                  "classes": [],
109                  "entry": [],
110                  "intersection_in": 0,
111                  "intersection_out": 1,
112                  "lanes": []
113                },
114                {
115                  "location": {
116                    "latitude": 33.940998,
117                    "longitude": -118.134911
118                  },
119                  "bearings": [30, 120, 210, 300],
120                  "classes": [],
121                  "entry": [],
122                  "intersection_in": 3,
123                  "intersection_out": 1,
124                  "lanes": [
125                    {
126                      "indications": ["left"],
127                      "valid": false
128                    },
129                    {
130                      "indications": ["none"],
131                      "valid": true
132                    },
133                    {
134                      "indications": ["none"],
135                      "valid": true
136                    },
137                    {
138                      "indications": ["none"],
139                      "valid": true
140                    }
141                  ]
142                },
143                {
144                  "location": {
145                    "latitude": 33.940055,
146                    "longitude": -118.133179
147                  },
148                  "bearings": [30, 120, 210, 300],
149                  "classes": [],
150                  "entry": [],
151                  "intersection_in": 3,
152                  "intersection_out": 1,
153                  "lanes": [
154                    {
155                      "indications": ["left"],
156                      "valid": false
157                    },
158                    {
159                      "indications": ["none"],
160                      "valid": true
161                    },
162                    {
163                      "indications": ["none"],
164                      "valid": true
165                    },
166                    {
167                      "indications": ["none"],
168                      "valid": true
169                    }
170                  ]
171                },
172                {
173                  "location": {
174                    "latitude": 33.939403,
175                    "longitude": -118.131956
176                  },
177                  "bearings": [120, 210, 300],
178                  "classes": [],
179                  "entry": [],
180                  "intersection_in": 2,
181                  "intersection_out": 0,
182                  "lanes": []
183                }
184              ]
185            },
186            {
187              "geometry": "gnnv_Apudi`F",
188              "start_location": {
189                "latitude": 0.0,
190                "longitude": 0.0
191              },
192              "end_location": {
193                "latitude": 0.0,
194                "longitude": 0.0
195              },
196              "distance": {
197                "value": 0
198              },
199              "duration": {
200                "value": 0
201              },
202              "maneuver": {
203                "instruction": "You have arrived at Firestone Blvd, on the left",
204                "voice_instruction": [
205                  {
206                    "distance_along_geometry": 50,
207                    "unit": "meters",
208                    "instruction": "You have arrived at Firestone Blvd, on the left"
209                  },
210                  {
211                    "distance_along_geometry": 200,
212                    "unit": "meters",
213                    "instruction": "In 200 meters, You will arrive"
214                  }
215                ],
216                "bearing_before": 123,
217                "bearing_after": 0,
218                "coordinate": {
219                  "latitude": 33.939188,
220                  "longitude": -118.131561
221                },
222                "maneuver_type": "arrive",
223                "modifier": "left"
224              },
225              "name": "Firestone Blvd",
226              "intersections": [
227                {
228                  "location": {
229                    "latitude": 33.939188,
230                    "longitude": -118.131561
231                  },
232                  "bearings": [303],
233                  "classes": [],
234                  "entry": [],
235                  "intersection_in": 0,
236                  "intersection_out": 0,
237                  "lanes": []
238                }
239              ]
240            }
241          ]
242        }
243      ]
244    }
245  ],
246  "country_code": "US"
247}
248

API Error Codes

Response CodeDescriptionAdditional Notes
200Normal success case.Normal success case.
400Input validation failed.Such as missing parameter or parameter with invalid value type (for example value cannot be parsed into number).
401APIKEY not supplied or invalid.-
403APIKEY is valid but does not have access to requested resources.You might be querying for a geographical region which is not valid for your account, or requesting a service which is not enabled for you.
404Requested host/path not found.This error occurs when there is a malformed host name used.
422Could not process the request.There is an underlying map issue which prevents the processing of the request.
429Too many requests.QPM reached or something like distance matrix size quota reached.
500Internal Service error.There was an internal issue with Nextbillion.ai services. You can reach out to [email protected] for an explanation.
Optimization MVRP
DIDN'T FIND WHAT YOU LOOKING FOR?