The Smart Directions API provides users with detailed route information between various locations. By leveraging this API, users can obtain accurate directions for different modes of transportation. This functionality enhances the user experience and supports the development of applications that require navigation features.
The API functions by processing a pair of origin and destination coordinates to deliver complete address data. This includes estimated distance and travel time, which are vital for effective trip planning. The accuracy of this information is greatly enhanced by the API's capability to incorporate real-time traffic conditions, ensuring users receive the most efficient routes. This feature is especially valuable in urban environments, where unpredictable traffic can significantly impact travel times.
In conclusion, the Smart Directions API is a crucial resource for users aiming to add navigation functionalities to their applications. Its ability to provide precise, detailed, and efficient routing information improves the overall user experience and facilitates the creation of more engaging and practical applications.
To use this endpoint you must specify an origin and destination in the parameters.
Get Directions - Endpoint Features
| Object | Description |
|---|---|
origin |
[Required] Indicates an origin |
destination |
[Required] Indicates an destination. |
{
"geocoded_waypoints" :
[
{
"geocoder_status" : "OK",
"partial_match" : true,
"place_id" : "ChIJzzgyJU--woARcZqceSdQ3dM",
"types" :
[
"amusement_park",
"establishment",
"point_of_interest",
"tourist_attraction"
]
},
{
"geocoder_status" : "OK",
"partial_match" : true,
"place_id" : "ChIJa147K9HX3IAR-lwiGIQv9i4",
"types" :
[
"amusement_park",
"establishment",
"point_of_interest",
"tourist_attraction"
]
}
],
"routes" :
[
{
"bounds" :
{
"northeast" :
{
"lat" : 34.1362092,
"lng" : -117.9221251
},
"southwest" :
{
"lat" : 33.815744,
"lng" : -118.3526827
}
},
"copyrights" : "Map data ©2024 Google",
"legs" :
[
{
"distance" :
{
"text" : "35.1 mi",
"value" : 56469
},
"duration" :
{
"text" : "46 mins",
"value" : 2784
},
"end_address" : "Anaheim, CA 92802, USA",
"end_location" :
{
"lat" : 33.815744,
"lng" : -117.9225876
},
"start_address" : "100 Universal City Plaza, Universal City, CA 91608, USA",
"start_location" :
{
"lat" : 34.134496,
"lng" : -118.3514803
},
"steps" :
[
{
"distance" :
{
"text" : "0.4 mi",
"value" : 602
},
"duration" :
{
"text" : "2 mins",
"value" : 138
},
"end_location" :
{
"lat" : 34.1329669,
"lng" : -118.3526827
},
"html_instructions" : "Head \u003cb\u003enortheast\u003c/b\u003e on \u003cb\u003eUniversal Studios Blvd\u003c/b\u003e",
"polyline" :
{
"points" : "s{ioEvojqUKGGCGCECGCGCICICICGAECKACAGAIAGAGAG?IAQAMAI?i@?O@YCA?E?E?A?E@CBC@CBC@A@CBCBCB?@AB?@?@?@?@?@?@@@?@@@@@@@@?BB@?@?@?@?@?@AB?@??AB?@?ZGJCZ?TCPC@?T?B?F?H?PB@?PBLBLJFFHDB?FBB@FDB?FDB@FBB@FD@@FDB@TN?@RL@@FDB@BBBBPLb@Xj@\\D@DBTNB@DBHDHDD@FDD@FBFBHBF@PD"
},
"start_location" :
{
"lat" : 34.134496,
"lng" : -118.3514803
},
"travel_mode" : "DRIVING"
},
{
"distance" :
{
"text" : "9.6 mi",
"value" : 15487
},
"duration" :
{
"text" : "16 mins",
"value" : 963
},
"end_location" :
{
"lat" : 34.0525166,
"lng" : -118.2258658
},
"html_instructions" : "Turn \u003cb\u003eleft\u003c/b\u003e to merge onto \u003cb\u003eUS-101 S\u003c/b\u003e",
"maneuver" : "ramp-left",
"polyline" :
{
"points" : "arioEfwjqU\\UDe@Fa@BMHc@DQFU@ANa@?A?A@AJUFQJQDGTg@^k@@CNU@A`@k@?AAc@JMRSRUTURSHKDETUJMFGRSRURSPSFGLMRSPSPQNOBEBCPQBCPQRSNQDCJMDEPQFGNOPSJIHKRSRS@APQLODC?ARSLKBEFELOPQ@?TYVWVWTUTWZ[JKXYDELMPQVWTSDEHIXSVUFE`@W\\UJEJINId@WPKVQJEBCHCLIHGXQRMBCLITQFENMLK\\WZY@ALMTWJM@ARWNORWx@cAX]NSZ_@`@i@Z]V]x@aANS@Cd@k@RUZ_@\\_@V[DGb@e@RSJKDELM\\[JKl@i@RQLKHIHGNKBCDEJI^WTOpA_Ax@g@VMVMVMXOh@U`@QRIPGZMHCLE^MVIFC@?^MXG^KHAf@MVEd@ITGd@GTE?Ab@GZEVGNAHCXEXElAQ~@Ol@KNA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MTqABMH]DWZ_BF[Hg@VqAF[FY`@yBFW`@sBLs@VuANw@BINs@BKJc@VeAH[Rs@T{@^kAZ{@@ENa@@EL[h@uAz@uBRe@L_@L[d@wA`@mAFSDOFUJ]v@gC`@oA`@mAJ]Vw@Pi@FOJYTo@zAqEr@wBTo@DOZy@p@wBHWf@iBd@kBPs@V_AXkALi@Rw@XiAJa@VeALc@DMf@sBh@wBH]J_@Nm@BKHWBOXkAHUNq@J[R}@J]DOBKDQBIHWX}@?AHQPi@JWHUBE\\w@BGBILUFQBERc@NYJOXe@l@aAXc@\\i@Xc@l@}@\\k@BGJOT_@\\k@NSJSHKDINS\\k@NUT[FMNSVe@FI^k@Zi@\\g@RU^e@DCRUNOJIPQ\\Yz@q@l@g@f@a@VSHIVSp@i@XW^Yt@m@VSXSHIb@]TSROLMBEPMj@g@v@y@HKXY\\a@\\c@nA}AfA{An@{@b@o@x@mAj@}@Zc@FK@C\\k@NWP]JQJQ@Cf@aAl@gA\\q@Ve@Xg@dAqBTa@DKHMFKFMBCRa@NYNYTc@`@u@Ta@R_@@CJST_@LYNYj@eAVi@FMFQFKDMVq@FO?AJ]FQ@IH[Fa@J{@@CBW@[?C@W@U@i@?_@@y@?u@@Y@q@@k@@cA@YD}AD}ADyBFsABu@?EHqA@CBe@HcAHqA@AHwAFu@B[De@Fi@Dg@HaABQAg@@ODg@B]Fe@@IHm@NqALcABOLgABWDi@@C@SBY"
},
"start_location" :
{
"lat" : 34.1329669,
"lng" : -118.3526827
},
"travel_mode" : "DRIVING"
},
{
"distance" :
{
"text" : "2.3 mi",
"value" : 3668
},
"duration" :
{
"text" : "2 mins",
"value" : 142
},
"end_location" :
{
"lat" : 34.02653310000001,
"lng" : -118.2089557
},
"html_instructions" : "Keep \u003cb\u003eright\u003c/b\u003e to stay on \u003cb\u003eUS-101 S\u003c/b\u003e",
"maneuver" : "keep-right",
"polyline" :
{
"points" : "g{ynEt~qpUFS@GBOHa@@IDSDYFQDOT{@L[@CVk@FOFIFMBGFIHKFMPURUHITWHIJIFGJIHGNKHGPKpAi@jAg@PGXMbAa@DAbAa@~Ao@j@SXKLCd@OPGv@SNGLCb@K^GPCZEVE`@Gr@GFANAl@ERAPAZAj@A`AAB?NAF?j@AbAATA`@?jAAj@AjA?nABN@j@Bx@Fh@DV@nAPrAPLBh@F`@F\\DNBd@Dv@FT@R@Z?L?d@?NA^AJ?l@Et@Gh@CL?`@?B?L?`@@n@B^@\\DN@ZB|@Jd@DF?L@X@P?^@B?|@Cd@En@Gf@Iv@Or@QBAZK@?HEDANGBAhBw@`@]ZSLKdByABAVUJMh@g@VYTWRSNSPSLOPS?ATYPWNSJO\\g@NUJQRYJSLUR[HQLSJUJSFO\\o@N]N[FOl@yANe@Rk@rA{DdA{CPe@X{@HWFOX{@`@mAh@yAr@_CPi@Xu@d@wADKb@oAL_@HYL]Pe@Pm@Pe@L]JW?A@?RK"
},
"start_location" :
{
"lat" : 34.0525166,
"lng" : -118.2258658
},
"travel_mode" : "DRIVING"
},
{
"distance" :
{
"text" : "22.0 mi",
"value" : 35437
},
"duration" :
{
"text" : "24 mins",
"value" : 1447
},
"end_location" :
{
"lat" : 33.8261327,
"lng" : -117.9260045
},
"html_instructions" : "Merge onto \u003cb\u003eI-5 S\u003c/b\u003e",
"maneuver" : "merge"}]}]}],"_note":"Response truncated for documentation purposes"}
curl --location --request GET 'https://zylalabs.com/api/5172/smart+directions+api/6627/get+directions?origin=Universal Studios Hollywood&destination=Disneyland' --header 'Authorization: Bearer YOUR_API_KEY'
| Header | Description |
|---|---|
Authorization
|
[Required] Should be Bearer access_key. See "Your API Access Key" above when you are subscribed. |
No long-term commitment. Upgrade, downgrade, or cancel anytime. Free Trial includes up to 50 requests.
To use this API, users must indicate a source and a destination.
There are different plans suits everyone including a free trial for
Smart Directions API allows you to calculate routes, obtain detailed directions, estimate travel times and optimize paths between multiple points.
The Directions API receives an origin and a destination, and returns information about the route, travel times, distances and detailed navigation steps.
Besides the number of API calls per month, there are no other limitations.
The Get Directions endpoint returns detailed route information, including geocoded waypoints, estimated travel times, distances, and step-by-step navigation instructions.
Key fields in the response include "geocoded_waypoints" for location details, "routes" for route information, "bounds" for geographical limits, and "legs" for individual segments of the journey.
The response data is structured in JSON format, with nested objects for waypoints, routes, and legs, allowing users to easily access specific route details and navigation steps.
The endpoint provides information on route distance, estimated travel time, step-by-step directions, and real-time traffic conditions, enhancing navigation accuracy.
Users can specify parameters such as "origin" and "destination" coordinates, as well as optional parameters like "mode" of transportation (driving, walking, etc.) to customize their requests.
Data accuracy is maintained through real-time traffic integration and continuous updates from reliable mapping sources, ensuring users receive the most efficient routes.
Typical use cases include trip planning for travel apps, navigation features in delivery services, and route optimization for logistics applications, enhancing user experience.
Users can parse the JSON response to extract relevant details like travel time and directions, integrating this information into their applications for seamless navigation experiences.
Please have a look at our Refund Policy: https://zylalabs.com/terms#refund
To obtain your API key, you first need to sign in to your account and subscribe to the API you want to use. Once subscribed, go to your Profile, open the Subscription section, and select the specific API. Your API key will be available there and can be used to authenticate your requests.
You can’t switch APIs during the free trial. If you subscribe to a different API, your trial will end and the new subscription will start as a paid plan.
If you don’t cancel before the 7th day, your free trial will end automatically and your subscription will switch to a paid plan under the same plan you originally subscribed to, meaning you will be charged and gain access to the API calls included in that plan.
The free trial ends when you reach 50 API requests or after 7 days, whichever comes first.
No, the free trial is available only once, so we recommend using it on the API that interests you the most. Most of our APIs offer a free trial, but some may not include this option.
Yes, we offer a 7-day free trial that allows you to make up to 50 API calls at no cost, so you can test our APIs without any commitment.
Zyla API Hub is like a big store for APIs, where you can find thousands of them all in one place. We also offer dedicated support and real-time monitoring of all APIs. Once you sign up, you can pick and choose which APIs you want to use. Just remember, each API needs its own subscription. But if you subscribe to multiple ones, you'll use the same key for all of them, making things easier for you.
Service Level:
100%
Response Time:
3,739ms
Service Level:
100%
Response Time:
2,352ms
Service Level:
100%
Response Time:
19,536ms
Service Level:
100%
Response Time:
712ms
Service Level:
100%
Response Time:
19,536ms
Service Level:
100%
Response Time:
469ms
Service Level:
100%
Response Time:
19,536ms
Service Level:
100%
Response Time:
2,073ms
Service Level:
100%
Response Time:
2,173ms
Service Level:
100%
Response Time:
144ms
Service Level:
100%
Response Time:
802ms
Service Level:
100%
Response Time:
2,140ms
Service Level:
100%
Response Time:
1,139ms
Service Level:
100%
Response Time:
633ms
Service Level:
100%
Response Time:
323ms
Service Level:
100%
Response Time:
948ms
Service Level:
100%
Response Time:
780ms
Service Level:
100%
Response Time:
482ms
Service Level:
100%
Response Time:
904ms
Service Level:
100%
Response Time:
943ms