Routes for Cars & Trucks

Product Used: Directions API


NextBillion.ai’s Routing APIs provides the mode feature to determine the correct routes for a given driving mode. In case of trucks, you can further customize the suggested routes by adding truck size, truck weight and axle load constraints to ensure the safety and legitimacy of the routes. In this example, we will create requests to get suitable routes for different types of vehicles in the fleet

Vehicle Type: Pickup Truck

Following is a request to get the directions for a pickup truck with

  • An “origin” and “destination” set
  • “mode” option set to “car” to emulate driving conditions for a pickup truck
  • “avoid” option set to “highway”

Request

curl --location 'https://api.nextbillion.io/directions/json?origin=28.53086731,-81.39337678&destination=28.46057639,-81.45685023&avoid=highway&mode=car&key=<your_api_key>'

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{
    "status": "Ok",
    "routes": [
        {
            "geometry": "uncmDrcxoN?X@zH@|@?pD@X?J?d@?nA?T?\\@`A?b@?|@?H@T?zC?R@h@?n@?|@@bB?~@@zA?N|A@`B?n@?v@?nA?hCClAC^?d@Cl@A`@?jBAX?x@AdB?\\?l@?x@AB?jDAhC?l@?d@AP?R?~@?tDAjAAfB?`A?L?b@@h@@X?h@@\\?L@`A@Z@lB?jA?t@?dA?\\?ZAj@?rA?z@AfA?lA?X?P?bB?n@?L?XAh@?LA`@?\\?d@?j@?T?N?V?tAAd@?ZAP?H?xA?nBARAj@?Z?TAv@@BJPt@Hd@DPHb@BP@F@J?F@F?L@J?N@bA?x@@rD?lD@rA@fJ?f@?vD@fG?vD@xE?z@?~B?Z@tD@bBB~AB|A@bA@jA@vC?`A?b@?N?r@EJEdBCt@ARAd@AtB?|@Bh@Hj@Ll@Lr@Rr@RX`@pATp@FVDNBJNl@HXH`@P|@Fb@BXBZB\\?H?T@P@|B@j@?n@@`A?f@?~@?V@\\?V?~@@XhA?F@X?`@BVBF@J@TD^JFBVH\\N\\RFDjAv@n@b@`Ap@h@^VPbAp@RNLHpA|@FFJDvBzAh@^j@`@b@XpA|@bAp@`@XB@fAv@|B~APLb@Zj@^d@\\rBvA`BhA@?^XPLz@j@fAt@x@j@|AfAl@d@j@\\~AhAHDFFbAp@nA|@bAr@PLTPNJZR^Xb@Xn@d@r@d@JHNJp@b@xAbA~@p@bBjA\\VRLVPdAr@j@`@l@`@jBrAh@\\bDzBh@^PLz@j@PLhBnALHdCfBTN`C~At@h@n@b@l@`@\\VPLx@f@hBrAPLNJ`Ar@bBhAFDp@f@^\\^^NPLNTXZd@Vf@Vh@Th@Rj@Pl@DLH^Pv@DXDRFh@Hn@Dp@Bv@@v@@xA?H?L?lG?xA?`@?p@AzD?pD?v@?L?R?V?X?\\?p@?r@?tC?pA?p@?dA?h@?|@?v@?d@?v@@\\?f@?R?R?X?l@?T?jB?f@?|B?Z@VP?N?pB?tAAhDAbAAjA?`CAv@AL?dB?hA?V?f@?F?X?P?tB@hB?nA?lB@h@?P@t@@NAnA?V?R@R?\\Bf@DpALr@Jv@J\\Dd@FrBXx@Ff@Dd@BH?v@BV@F?F?d@AVAJA`@?PAb@AXAL?JAN?NAV?b@AdBEh@Cr@?~@Ev@Cp@Cf@Ch@EXCXCZCd@Gh@E\\C^A`@CtBS|@EbAEr@Ez@ChAEX?zB?d@C^CZ?N?PA|A@xAAx@?rA?V?\\?xA?F?F?JEBAFCFEFEBCBCBE@EDMCkDBC@EBC?E@EAE?ECCAECCEACAC?E?E@C@CBCDkBCAqB",
            "distance": 13175.0,
            "duration": 1076.8,
            "legs": [
                {
                    "distance": {
                        "value": 13175
                    },
                    "duration": {
                        "value": 1076
                    },
                    "steps": []
                }
            ]
        }
    ]
}

Vehicle Type: Truck

Following is a Directions Flexible request to get the directions for a freight truck with axle load settings An “origin” and “destination” set “mode” option set to “truck” to emulate driving conditions for a freight truck “truck_axle_load” configured to get legitimate routes

Request

curl --location 'https://api.nextbillion.io/directions/json?origin=33.02655433,-96.75117698&destination=33.02519670,-96.88507592&mode=truck&key=<your_api_key>&option=flexible&truck_axle_load=9'

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
{
    "status": "Ok",
    "routes": [
        {
            "geometry": "unqhEzuomQ?c@W@@rD??Av@???h@?@@p@?j@?lB?^T?@?T@R?N?LAN?LCPEXKNI\\U??l@e@\\g@T_@Pa@Pa@FSn@aB??bBqE@AVk@T[Z[NKVQPKHANAVE\\EZ???nACnA???rA@z@?X?bA@rA???Z???V???Z?Z?@?d@?pAA??V?jA???n@?v@At@@R???r@???Z???\\CL?TENERGLEVKTKZSXSf@c@@?fCgC|@u@RKNGNEPEXARAP@RB??PBTHRLnBnAbAt@j@`@TNjAx@??nA`ANHPHJF??PHd@LT@@@~@@??vB?@?n@ApB@@?n@???l@?@?x@@|@AZ?j@@b@Ar@A??~@CV?T?^?ZCPATC??B?TERCXGh@Od@QZOXO`@WRM\\Sf@]??\\W^Wh@WTKRBF?FBF@FDBDXZDPBJ^rAFVZr@@BDFXh@p@pAv@xA??x@zAp@dBd@|A??r@rBl@nBd@vAl@nB??n@hCZrAVfA@H??d@vBLj@l@lCb@hB??Hh@?@b@tCHf@Ft@HjA@T?@Dt@VdBPfCFt@Fz@B`@B`@@ZB`A@|@@~@BhA@|@@vBJnBEzAANMvCGrA??C^AT?@CZE`@?@CVEt@I|@It@OvAM`ASdBIl@o@bEUtAS`ACPQx@GXWfAYbA_@nA]|@EJ??Un@??Ul@Sf@GLSb@?@MZc@z@??gBjDgAtBqCjF}AlCmArB_@l@??e@r@A?{@jAA?aAtA?@aAnAy@fA??g@r@mAzAiB~BMPqA`BWZ}@hA]f@g@r@??WZq@|@s@~@??ED??Y^KLc@n@Yb@a@n@_@n@c@v@KRS`@e@dAc@dAQb@Qh@Qb@Mb@M`@??Of@Mb@AHIXQ~@o@|CA@O|@I`@Gd@A?E\\Eb@CXABEj@Gl@ATEb@Gt@IlAEx@CXAHK~AC\\Cl@Gv@MzBIpA??Cb@OdCKfBGvAKdCI`DAT?FCjAAdBAzBA|BAzC?~A?P??AnD?@?rAArB?@AvI@dE?rCAfL?x@AlM???nC?l@??At@?jL??A|B?nCAlF?pD???jA?x@ArG?Z???v@?b@???bC?\\??ArD??@d@C~B?vC???xE?|DBhGAp@?f@?N?F?F???H?@?DAR?H?@?VAf@?n@?@?hAAvA?T??AnA@fA?dFC`I?~A?v@??Ab@?@?hI?nDKXEl@IzACv@EzA??C`B?`@AdBAv@AZA^Ep@??Ef@C^CZOtACXCn@CZ?@A|@AlAAd@@nACn@@`@BXB\\Fd@?@F^Hb@hBjH\\zALh@ZpAJf@BJPn@Vv@DJJTFNl@jA??G\\E^Ah@?@Af@?`A?v@???pB?f@?`A?zD???`@??@dB???tA?fA@H???~AAzA?T?lAAxB?fA?|@???n@?@[???i@?a@?g@???i@@??QAA?g@???u@@??]?m@A_B@A?M?wA?iCAkC?i@@??{@?q@?}@Ai@?A?K?c@AUAWAKA]EQCMC]IME??OG[O[QGCA?IIIGINIHIHCDQLUN[PGB]JWB]@I???mF?[@i@BSD_@JKFOJm@h@g@r@a@z@A?IVmAfCS\\SRKHOJUL_@LIBM@??C@M@M?Q?WA??_@@AJ?J??Ar@Ar@Ct@A\\??M`FA|@ExAGlCAb@AVAZ??Ab@Gn@?@Gj@??Q~@E\\CFG`@E`@ARAN?T?@?hA?@?rB???vC?dB?@?`A?h@?x@Aj@?V?lA@n@Ap@???~@?b@AxA?ZAnAAtB?tBAfB???rB???f@?V?@Ab@?|A???hD?b@??AjE?@?R?lB?hA?@@|A?p@?t@?^?@?|A??AjA?@?Z?V@~@A`D?`B?hA?@?xA?`@??Ax@?r@Av@???dC?\\?`@?@AbBa@?k@@q@@SAA?M?O?Y?W?S?IA??A^?@\\@??J?D?F?V?Z@@?ZAP?\\AF?",
            "distance": 17908.922,
            "duration": 1320.995,
            "start_location": {
                "latitude": 33.02651,
                "longitude": -96.75118
            },
            "end_location": {
                "latitude": 33.0252,
                "longitude": -96.88501
            },
            "legs": [
                {
                    "distance": {
                        "value": 17908
                    },
                    "duration": {
                        "value": 1320
                    },
                    "start_location": {
                        "latitude": 33.02651,
                        "longitude": -96.75118
                    },
                    "end_location": {
                        "latitude": 33.0252,
                        "longitude": -96.88501
                    },
                    "steps": [
                        {
                            "geometry": "unqhEzuomQ?c@",
                            "start_location": {
                                "latitude": 33.02651,
                                "longitude": -96.75118
                            },
                            "end_location": {
                                "latitude": 33.02651,
                                "longitude": -96.751
                            },
                            "distance": {
                                "value": 16
                            },
                            "duration": {
                                "value": 1
                            }
                        },
                        {
                            "geometry": "unqhEvtomQW@@rD??Av@???h@?@@p@?j@?lB?^",
                            "start_location": {
                                "latitude": 33.02651,
                                "longitude": -96.751
                            },
                            "end_location": {
                                "latitude": 33.02662,
                                "longitude": -96.75359
                            },
                            "distance": {
                                "value": 255
                            },
                            "duration": {
                                "value": 42
                            }
                        },
                        {
                            "geometry": "koqhE|dpmQT?@?T@R?N?LAN?LCPEXKNI\\U??l@e@\\g@T_@Pa@Pa@FSn@aB??bBqE@AVk@T[Z[NKVQPKHANAVE\\EZ???nACnA???rA@z@?X?bA@rA???Z???V???Z?Z?@?d@?pAA??V?jA???n@?v@At@@R???r@???Z???\\CL?TENERGLEVKTKZSXSf@c@@?fCgC|@u@RKNGNEPEXARAP@RB??PBTHRLnBnAbAt@j@`@TNjAx@??nA`ANHPHJF??PHd@LT@@@~@@??vB?@?n@ApB@@?n@???l@?@?x@@|@AZ?j@@b@Ar@A??~@CV?T?^?ZCPATC??B?TERCXGh@Od@QZOXO`@WRM\\Sf@]??\\W^Wh@WTK",
                            "start_location": {
                                "latitude": 33.02662,
                                "longitude": -96.75359
                            },
                            "end_location": {
                                "latitude": 33.00457,
                                "longitude": -96.74883
                            },
                            "distance": {
                                "value": 2743
                            },
                            "duration": {
                                "value": 318
                            }
                        },
                        {
                            "geometry": "semhEfgomQRBF?FBF@FDBDXZ",
                            "start_location": {
                                "latitude": 33.00457,
                                "longitude": -96.74884
                            },
                            "end_location": {
                                "latitude": 33.00417,
                                "longitude": -96.74909
                            },
                            "distance": {
                                "value": 54
                            },
                            "duration": {
                                "value": 5
                            }
                        },
                        {
                            "geometry": "acmhExhomQDPBJ^rAFVZr@@BDFXh@p@pAv@xA??x@zAp@dBd@|A??r@rBl@nBd@vAl@nB??n@hCZrAVfA@H??d@vBLj@l@lCb@hB??Hh@?@b@tCHf@Ft@HjA@T?@Dt@",
                            "start_location": {
                                "latitude": 33.00417,
                                "longitude": -96.74909
                            },
                            "end_location": {
                                "latitude": 32.99984,
                                "longitude": -96.76054
                            },
                            "distance": {
                                "value": 1183
                            },
                            "duration": {
                                "value": 70
                            }
                        },
                        {
                            "geometry": "ahlhEjpqmQVdBPfCFt@Fz@B`@B`@@ZB`A@|@@~@BhA@|@@vBJnBEzAANMvCGrA??C^AT?@CZE`@?@CVEt@I|@It@OvAM`ASdBIl@o@bEUtAS`ACPQx@GXWfAYbA_@nA]|@EJ??Un@??Ul@Sf@GLSb@?@MZc@z@??gBjDgAtBqCjF}AlCmArB_@l@??e@r@A?{@jAA?aAtA?@aAnAy@fA??g@r@mAzAiB~BMPqA`BWZ}@hA]f@g@r@??WZq@|@s@~@??ED??Y^KLc@n@Yb@a@n@_@n@c@v@KRS`@e@dAc@dAQb@Qh@Qb@Mb@M`@??Of@Mb@AHIXQ~@o@|CA@O|@I`@Gd@A?E\\Eb@CXABEj@Gl@ATEb@Gt@IlAEx@CXAHK~AC\\Cl@Gv@MzBIpA??Cb@OdCKfBGvAKdCI`DAT?FCjAAdBAzBA|BAzC?~A?P??AnD?@?rAArB?@AvI@dE?rCAfL?x@AlM???nC?l@??At@?jL??A|B?nCAlF?pD???jA?x@ArG?Z???v@?b@???bC?\\??ArD??@d@C~B?vC???xE?|DBhGAp@?f@?N?F?F???H?@?DAR?H?@?VAf@?n@?@?hAAvA?T??AnA@fA?dFC`I?~A?v@??Ab@?@?hI?nD",
                            "start_location": {
                                "latitude": 32.99985,
                                "longitude": -96.76054
                            },
                            "end_location": {
                                "latitude": 33.0129,
                                "longitude": -96.8378
                            },
                            "distance": {
                                "value": 7666
                            },
                            "duration": {
                                "value": 308
                            }
                        },
                        {
                            "geometry": "synhEfs`nQKXEl@IzACv@EzA??C`B?`@AdBAv@AZA^Ep@??Ef@C^CZOtACXCn@CZ?@A|@",
                            "start_location": {
                                "latitude": 33.0129,
                                "longitude": -96.8378
                            },
                            "end_location": {
                                "latitude": 33.0134,
                                "longitude": -96.84312
                            },
                            "distance": {
                                "value": 502
                            },
                            "duration": {
                                "value": 29
                            }
                        },
                        {
                            "geometry": "w|nhEntanQAlAAd@@nACn@@`@BXB\\Fd@?@F^Hb@hBjH\\zALh@ZpAJf@BJPn@Vv@DJJTFNl@jA??",
                            "start_location": {
                                "latitude": 33.01339,
                                "longitude": -96.84312
                            },
                            "end_location": {
                                "latitude": 33.01171,
                                "longitude": -96.84932
                            },
                            "distance": {
                                "value": 621
                            },
                            "duration": {
                                "value": 72
                            }
                        },
                        {
                            "geometry": "ernhEf{bnQG\\E^Ah@?@Af@?`A?v@???pB?f@?`A?zD???`@??@dB???tA?fA@H???~A",
                            "start_location": {
                                "latitude": 33.01171,
                                "longitude": -96.84932
                            },
                            "end_location": {
                                "latitude": 33.01178,
                                "longitude": -96.8547
                            },
                            "distance": {
                                "value": 504
                            },
                            "duration": {
                                "value": 43
                            }
                        },
                        {
                            "geometry": "srnhEz|cnQAzA?T?lAAxB",
                            "start_location": {
                                "latitude": 33.01178,
                                "longitude": -96.8547
                            },
                            "end_location": {
                                "latitude": 33.0118,
                                "longitude": -96.85627
                            },
                            "distance": {
                                "value": 148
                            },
                            "duration": {
                                "value": 11
                            }
                        },
                        {
                            "geometry": "wrnhEtfdnQ?fA?|@???n@?@",
                            "start_location": {
                                "latitude": 33.0118,
                                "longitude": -96.85627
                            },
                            "end_location": {
                                "latitude": 33.0118,
                                "longitude": -96.85719
                            },
                            "distance": {
                                "value": 85
                            },
                            "duration": {
                                "value": 13
                            }
                        },
                        {
                            "geometry": "wrnhElldnQ[???i@?a@?g@???i@@??QAA?g@???u@@??]?m@A_B@A?M?wA?iCAkC?i@@??{@?q@?}@Ai@?A?K?c@AUAWAKA]EQCMC]IME??OG[O[QGCA?IIIG",
                            "start_location": {
                                "latitude": 33.0118,
                                "longitude": -96.85719
                            },
                            "end_location": {
                                "latitude": 33.01893,
                                "longitude": -96.85667
                            },
                            "distance": {
                                "value": 803
                            },
                            "duration": {
                                "value": 74
                            }
                        },
                        {
                            "geometry": "i_phEfidnQINIHIHCDQLUN[PGB]JWB]@I???mF?[@i@BSD_@JKFOJm@h@g@r@a@z@A?IVmAfCS\\SRKHOJUL_@LIBM@??C@M@M?Q?WA??_@@",
                            "start_location": {
                                "latitude": 33.01892,
                                "longitude": -96.85668
                            },
                            "end_location": {
                                "latitude": 33.0242,
                                "longitude": -96.85958
                            },
                            "distance": {
                                "value": 695
                            },
                            "duration": {
                                "value": 88
                            }
                        },
                        {
                            "geometry": "g`qhEj{dnQAJ?J??Ar@Ar@Ct@A\\??M`FA|@ExAGlCAb@AVAZ??Ab@Gn@?@Gj@??Q~@E\\CFG`@E`@ARAN?T?@?hA?@?rB???vC?dB?@?`A?h@?x@Aj@?V?lA@n@Ap@???~@?b@AxA?ZAnAAtB?tBAfB???rB???f@?V?@Ab@?|A???hD?b@??AjE?@?R?lB?hA?@@|A?p@?t@?^?@?|A??AjA?@?Z?V@~@A`D?`B?hA?@?xA?`@??Ax@?r@Av@???dC?\\?`@?@AbB",
                            "start_location": {
                                "latitude": 33.0242,
                                "longitude": -96.85958
                            },
                            "end_location": {
                                "latitude": 33.02486,
                                "longitude": -96.88484
                            },
                            "distance": {
                                "value": 2365
                            },
                            "duration": {
                                "value": 197
                            }
                        },
                        {
                            "geometry": "kdqhEfyinQa@?k@@q@@SAA?M?O?Y?W?S?IA??",
                            "start_location": {
                                "latitude": 33.02485,
                                "longitude": -96.88484
                            },
                            "end_location": {
                                "latitude": 33.02616,
                                "longitude": -96.88484
                            },
                            "distance": {
                                "value": 145
                            },
                            "duration": {
                                "value": 19
                            }
                        },
                        {
                            "geometry": "olqhEfyinQA^?@\\@??J?D?F?V?Z@@?ZAP?\\AF?",
                            "start_location": {
                                "latitude": 33.02615,
                                "longitude": -96.88484
                            },
                            "end_location": {
                                "latitude": 33.0252,
                                "longitude": -96.88501
                            },
                            "distance": {
                                "value": 123
                            },
                            "duration": {
                                "value": 24
                            }
                        },
                        {
                            "geometry": "ofqhEhzinQ??",
                            "start_location": {
                                "latitude": 33.0252,
                                "longitude": -96.88501
                            },
                            "end_location": {
                                "latitude": 33.0252,
                                "longitude": -96.88501
                            },
                            "distance": {
                                "value": 0
                            },
                            "duration": {
                                "value": 0
                            }
                        }
                    ]
                }
            ]
        }
    ]
}

Vehicle Type: Freight Truck

Following is a request to get the directions for a freight truck with

  • An “origin” and “destination” set
  • “mode” option set to “truck” to emulate driving conditions for a freight truck
  • “truck_size” constraints configured to get legitimate routes

Request

curl --location 'https://api.nextbillion.io/directions/json?origin=29.59932895,-95.66323222&destination=29.58789146,-95.67311985&mode=truck&key=<your_api_key>&option=flexible&truck_size=220,250,400'

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
{
    "status": "Ok",
    "routes": [
        {
            "geometry": "ubtsD~e{fQJJ??HMHQHSFSFWFSBUBQBQBM@OHe@?AFa@Hm@H_@??H[HSJSPUTWPORMTKVKVGRC??DAVAT?Z@dAFp@Bh@?H?P?b@Az@EJ?JA??JAj@GNCVA`@A^A\\B\\B^H`@J^L\\NZPXPVTHJLJRXT\\`BnCRZJPPXRVTTJH?@HFPJDDHBJD??FBb@NLBJBLJVDN@P?T?VAPA??B?XEb@KBPJv@BP??BT?@BNDx@Dx@@x@?T?d@??GxBInAOxA]nBkArFQx@Q|@SjAKt@E^Gn@E`@C|@CnA??Ah@?x@B|@DlAJjBRnC??JdARlBLt@F\\??Jr@DPBL@F@NFZZI@?LCd@M??TIRKRQVYHI??DIRYNSBSFIJMHIHK??JKJKLKPMLMLKPKPKPK??RILGPILGLEJEHCFCFAZI@?|@Q",
            "distance": 2837.028,
            "duration": 332.238,
            "start_location": {
                "latitude": 29.59931,
                "longitude": -95.6632
            },
            "end_location": {
                "latitude": 29.5879,
                "longitude": -95.67309
            },
            "legs": [
                {
                    "distance": {
                        "value": 2837
                    },
                    "duration": {
                        "value": 332
                    },
                    "start_location": {
                        "latitude": 29.59931,
                        "longitude": -95.6632
                    },
                    "end_location": {
                        "latitude": 29.5879,
                        "longitude": -95.67309
                    },
                    "steps": [
                        {
                            "geometry": "ubtsD~e{fQJJ??",
                            "start_location": {
                                "latitude": 29.59931,
                                "longitude": -95.6632
                            },
                            "end_location": {
                                "latitude": 29.59925,
                                "longitude": -95.66326
                            },
                            "distance": {
                                "value": 8
                            },
                            "duration": {
                                "value": 1
                            }
                        },
                        {
                            "geometry": "ibtsDjf{fQHMHQHSFSFWFSBUBQBQBM@OHe@?AFa@Hm@H_@??H[HSJSPUTWPORMTKVKVGRC??DAVAT?Z@dAFp@Bh@?H?P?b@Az@EJ?JA??JAj@GNCVA`@A^A\\B\\B^H`@J^L\\NZPXPVTHJLJRXT\\`BnCRZJPPXRVTTJH?@HFPJDDHBJD??FBb@NLBJBLJVDN@P?T?VAPA??B?XEb@K",
                            "start_location": {
                                "latitude": 29.59925,
                                "longitude": -95.66326
                            },
                            "end_location": {
                                "latitude": 29.59062,
                                "longitude": -95.66315
                            },
                            "distance": {
                                "value": 1223
                            },
                            "duration": {
                                "value": 144
                            }
                        },
                        {
                            "geometry": "mlrsDte{fQBPJv@BP??BT?@BNDx@Dx@@x@?T?d@??GxBInAOxA]nBkArFQx@Q|@SjAKt@E^Gn@E`@C|@CnA??Ah@?x@B|@DlAJjBRnC??JdARlBLt@F\\??Jr@DPBL@F@NFZ",
                            "start_location": {
                                "latitude": 29.59063,
                                "longitude": -95.66315
                            },
                            "end_location": {
                                "latitude": 29.59096,
                                "longitude": -95.67521
                            },
                            "distance": {
                                "value": 1196
                            },
                            "duration": {
                                "value": 127
                            }
                        },
                        {
                            "geometry": "onrsD`q}fQZI@?LCd@M??TIRKRQVYHI??DIRYNSBSFIJMHIHK??JKJKLKPMLMLKPKPKPK??RILGPILGLEJEHCFCFAZI@?|@Q",
                            "start_location": {
                                "latitude": 29.59096,
                                "longitude": -95.67521
                            },
                            "end_location": {
                                "latitude": 29.58789,
                                "longitude": -95.67308
                            },
                            "distance": {
                                "value": 409
                            },
                            "duration": {
                                "value": 58
                            }
                        },
                        {
                            "geometry": "k{qsDxc}fQ??",
                            "start_location": {
                                "latitude": 29.5879,
                                "longitude": -95.67309
                            },
                            "end_location": {
                                "latitude": 29.5879,
                                "longitude": -95.67309
                            },
                            "distance": {
                                "value": 0
                            },
                            "duration": {
                                "value": 0
                            }
                        }
                    ]
                }
            ]
        }
    ]
}

Visit Directions API & documentation to know more about the available features.