Navigation API

Enterprise Edition Only
The NextBillion.ai Navigation API is available only in a Enterprise 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=34.05605379,-118.24495386&destination=34.05023939,-118.24885017

Visual Representation

Sample API Response

1{
2  "status": "ok",
3  "routes": [
4    {
5      "geometry": "svr}_A`ebp`FlDxCrFjGVzBhE`[email protected]~PbPlNxFcK~FyJ~C_GpKyRpGyNtAnA`KfItClCdCpBtYbYpEhEtCnCnB`BjMxMtLxL`CbC`AfAfDlCzGbGjEbExHnHnEtDjBvBzDxD`O|[email protected]]",
6      "distance": 859.7,
7      "duration": 142.1,
8      "weight": 142.1,
9      "start_location": {
10        "latitude": 34.056058,
11        "longitude": -118.244961
12      },
13      "end_location": {
14        "latitude": 34.050176,
15        "longitude": -118.248739
16      },
17      "legs": [
18        {
19          "distance": {
20            "value": 859
21          },
22          "duration": {
23            "value": 142
24          },
25          "start_location": {
26            "latitude": 34.056058,
27            "longitude": -118.244961
28          },
29          "end_location": {
30            "latitude": 34.050176,
31            "longitude": -118.248739
32          },
33          "steps": [
34            {
35              "geometry": "svr}_A`ebp`FlDxCrFjGVzBhE`[email protected]~PbPlN",
36              "start_location": {
37                "latitude": 34.056058,
38                "longitude": -118.244961
39              },
40              "end_location": {
41                "latitude": 34.054344,
42                "longitude": -118.246562
43              },
44              "distance": {
45                "value": 243
46              },
47              "duration": {
48                "value": 39
49              },
50              "maneuver": {
51                "instruction": "Head southwest on N Hill St",
52                "voice_instruction": [],
53                "bearing_before": 0,
54                "bearing_after": 216,
55                "coordinate": {
56                  "latitude": 34.056058,
57                  "longitude": -118.244961
58                },
59                "maneuver_type": "depart"
60              },
61              "name": "N Hill St",
62              "intersections": [
63                {
64                  "location": {
65                    "latitude": 34.056058,
66                    "longitude": -118.244961
67                  },
68                  "bearings": [216],
69                  "classes": [],
70                  "entry": [],
71                  "intersection_in": 0,
72                  "intersection_out": 0,
73                  "lanes": []
74                },
75                {
76                  "location": {
77                    "latitude": 34.054919,
78                    "longitude": -118.246027
79                  },
80                  "bearings": [30, 135, 225],
81                  "classes": [],
82                  "entry": [],
83                  "intersection_in": 0,
84                  "intersection_out": 2,
85                  "lanes": []
86                }
87              ],
88              "road_shield_type": {}
89            },
90            {
91              "geometry": "oko}_Abiep`FxFcK~FyJ~C_GpKyRpGyN",
92              "start_location": {
93                "latitude": 34.054344,
94                "longitude": -118.246562
95              },
96              "end_location": {
97                "latitude": 34.053673,
98                "longitude": -118.245481
99              },
100              "distance": {
101                "value": 124
102              },
103              "duration": {
104                "value": 24
105              },
106              "maneuver": {
107                "instruction": "Turn left onto W 1st St",
108                "voice_instruction": [
109                  {
110                    "distance_along_geometry": 200,
111                    "unit": "meters",
112                    "instruction": "In 200 meters, Turn left onto W 1st St"
113                  },
114                  {
115                    "distance_along_geometry": 50,
116                    "unit": "meters",
117                    "instruction": "Turn left onto W 1st St"
118                  }
119                ],
120                "bearing_before": 216,
121                "bearing_after": 127,
122                "coordinate": {
123                  "latitude": 34.054344,
124                  "longitude": -118.246562
125                },
126                "maneuver_type": "turn",
127                "modifier": "left"
128              },
129              "name": "W 1st St",
130              "intersections": [
131                {
132                  "location": {
133                    "latitude": 34.054344,
134                    "longitude": -118.246562
135                  },
136                  "bearings": [30, 135, 210, 315],
137                  "classes": [],
138                  "entry": [],
139                  "intersection_in": 0,
140                  "intersection_out": 1,
141                  "lanes": []
142                }
143              ],
144              "road_shield_type": {}
145            },
146            {
147              "geometry": "qan}_Apecp`FtAnA`KfItClCdCpBtYbYpEhEtCnCnB`BjMxMtLxL`CbC`AfAfDlCzGbGjEbExHnHnEtDjBvBzDxD`O|[email protected]]",
148              "start_location": {
149                "latitude": 34.053673,
150                "longitude": -118.245481
151              },
152              "end_location": {
153                "latitude": 34.050176,
154                "longitude": -118.248739
155              },
156              "distance": {
157                "value": 491
158              },
159              "duration": {
160                "value": 78
161              },
162              "maneuver": {
163                "instruction": "Use the right lane to turn right onto S Broadway",
164                "voice_instruction": [
165                  {
166                    "distance_along_geometry": 50,
167                    "unit": "meters",
168                    "instruction": "Use the right lane to turn right onto S Broadway"
169                  }
170                ],
171                "bearing_before": 122,
172                "bearing_after": 216,
173                "coordinate": {
174                  "latitude": 34.053673,
175                  "longitude": -118.245481
176                },
177                "maneuver_type": "turn",
178                "modifier": "right"
179              },
180              "name": "S Broadway",
181              "intersections": [
182                {
183                  "location": {
184                    "latitude": 34.053673,
185                    "longitude": -118.245481
186                  },
187                  "bearings": [45, 135, 225, 300],
188                  "classes": [],
189                  "entry": [],
190                  "intersection_in": 3,
191                  "intersection_out": 2,
192                  "lanes": [
193                    {
194                      "indications": ["left"],
195                      "valid": false
196                    },
197                    {
198                      "indications": ["none"],
199                      "valid": false
200                    },
201                    {
202                      "indications": ["none"],
203                      "valid": false
204                    },
205                    {
206                      "indications": ["none"],
207                      "valid": true
208                    }
209                  ]
210                },
211                {
212                  "location": {
213                    "latitude": 34.052763,
214                    "longitude": -118.246332
215                  },
216                  "bearings": [45, 135, 210],
217                  "classes": [],
218                  "entry": [],
219                  "intersection_in": 0,
220                  "intersection_out": 2,
221                  "lanes": []
222                },
223                {
224                  "location": {
225                    "latitude": 34.052632,
226                    "longitude": -118.246453
227                  },
228                  "bearings": [30, 120, 225],
229                  "classes": [],
230                  "entry": [],
231                  "intersection_in": 0,
232                  "intersection_out": 2,
233                  "lanes": []
234                },
235                {
236                  "location": {
237                    "latitude": 34.052402,
238                    "longitude": -118.24669
239                  },
240                  "bearings": [45, 135, 225, 315],
241                  "classes": [],
242                  "entry": [],
243                  "intersection_in": 0,
244                  "intersection_out": 2,
245                  "lanes": [
246                    {
247                      "indications": ["none"],
248                      "valid": true
249                    },
250                    {
251                      "indications": ["right"],
252                      "valid": false
253                    }
254                  ]
255                },
256                {
257                  "location": {
258                    "latitude": 34.052118,
259                    "longitude": -118.246977
260                  },
261                  "bearings": [45, 135, 210],
262                  "classes": [],
263                  "entry": [],
264                  "intersection_in": 0,
265                  "intersection_out": 2,
266                  "lanes": []
267                },
268                {
269                  "location": {
270                    "latitude": 34.052001,
271                    "longitude": -118.247084
272                  },
273                  "bearings": [30, 210, 315],
274                  "classes": [],
275                  "entry": [],
276                  "intersection_in": 0,
277                  "intersection_out": 1,
278                  "lanes": []
279                },
280                {
281                  "location": {
282                    "latitude": 34.051757,
283                    "longitude": -118.247312
284                  },
285                  "bearings": [45, 120, 225, 300],
286                  "classes": [],
287                  "entry": [],
288                  "intersection_in": 0,
289                  "intersection_out": 2,
290                  "lanes": []
291                },
292                {
293                  "location": {
294                    "latitude": 34.051496,
295                    "longitude": -118.247555
296                  },
297                  "bearings": [45, 135, 225],
298                  "classes": [],
299                  "entry": [],
300                  "intersection_in": 0,
301                  "intersection_out": 2,
302                  "lanes": []
303                },
304                {
305                  "location": {
306                    "latitude": 34.051348,
307                    "longitude": -118.247708
308                  },
309                  "bearings": [45, 225, 315],
310                  "classes": [],
311                  "entry": [],
312                  "intersection_in": 0,
313                  "intersection_out": 1,
314                  "lanes": []
315                },
316                {
317                  "location": {
318                    "latitude": 34.050959,
319                    "longitude": -118.248067
320                  },
321                  "bearings": [30, 120, 225, 315],
322                  "classes": [],
323                  "entry": [],
324                  "intersection_in": 0,
325                  "intersection_out": 2,
326                  "lanes": [
327                    {
328                      "indications": ["none"],
329                      "valid": true
330                    },
331                    {
332                      "indications": ["right"],
333                      "valid": false
334                    }
335                  ]
336                }
337              ],
338              "road_shield_type": {}
339            },
340            {
341              "geometry": "_gg}_Adqip`F",
342              "start_location": {
343                "latitude": 34.050176,
344                "longitude": -118.248739
345              },
346              "end_location": {
347                "latitude": 34.050176,
348                "longitude": -118.248739
349              },
350              "distance": {
351                "value": 0
352              },
353              "duration": {
354                "value": 0
355              },
356              "maneuver": {
357                "instruction": "You have arrived at S Broadway, on the right",
358                "voice_instruction": [
359                  {
360                    "distance_along_geometry": 200,
361                    "unit": "meters",
362                    "instruction": "In 200 meters, You will arrive"
363                  },
364                  {
365                    "distance_along_geometry": 50,
366                    "unit": "meters",
367                    "instruction": "You have arrived at S Broadway, on the right"
368                  }
369                ],
370                "bearing_before": 215,
371                "bearing_after": 0,
372                "coordinate": {
373                  "latitude": 34.050176,
374                  "longitude": -118.248739
375                },
376                "maneuver_type": "arrive",
377                "modifier": "right"
378              },
379              "name": "S Broadway",
380              "intersections": [
381                {
382                  "location": {
383                    "latitude": 34.050176,
384                    "longitude": -118.248739
385                  },
386                  "bearings": [35],
387                  "classes": [],
388                  "entry": [],
389                  "intersection_in": 0,
390                  "intersection_out": 0,
391                  "lanes": []
392                }
393              ],
394              "road_shield_type": {}
395            }
396          ]
397        }
398      ]
399    }
400  ],
401  "country_code": "US"
402}

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.
Isochrone
Post Trip Route
DIDN'T FIND WHAT YOU LOOKING FOR?