The Trip Directions API offers efficient routing and detailed turn-by-turn directions for driving, cycling, walking, or using public transportation. It supports multimodal transportation and can help users plan their trips accurately, considering real-time traffic conditions, distance, and other factors. This API can be integrated into various applications to enhance user experience while navigating.
{
"features": [
{
"type": "Feature",
"properties": {
"mode": "drive",
"waypoints": [
{
"location": [
10.87474,
48.34364
],
"original_index": 0
},
{
"location": [
10.90925,
48.37073
],
"original_index": 1
}
],
"units": "metric",
"distance": 7774,
"distance_units": "meters",
"time": 627.658,
"legs": [
{
"distance": 7774,
"time": 627.658,
"steps": [
{
"from_index": 0,
"to_index": 91,
"distance": 1581,
"time": 114.761,
"instruction": {
"text": "Drive north on Gögginger Straße."
}
},
{
"from_index": 91,
"to_index": 171,
"distance": 1312,
"time": 140.345,
"instruction": {
"text": "Turn right onto Schertlinstraße."
}
},
{
"from_index": 171,
"to_index": 187,
"distance": 189,
"time": 14.709,
"instruction": {
"text": "Turn right onto Haunstetter Straße."
}
},
{
"from_index": 187,
"to_index": 327,
"distance": 2960,
"time": 220.233,
"instruction": {
"text": "Turn left onto Inverness-Allee/B 300."
}
},
{
"from_index": 327,
"to_index": 352,
"distance": 1034,
"time": 78.82,
"instruction": {
"text": "Turn left onto Berliner Allee/B 2."
}
},
{
"from_index": 352,
"to_index": 371,
"distance": 246,
"time": 23.478,
"instruction": {
"text": "Turn left to take the ramp."
}
},
{
"from_index": 371,
"to_index": 388,
"distance": 435,
"time": 31.514,
"instruction": {
"text": "Bear right onto Lechhauser Straße."
}
},
{
"from_index": 388,
"to_index": 391,
"distance": 13,
"time": 3.795,
"instruction": {
"text": "Turn right onto Oblatterwallstraße."
}
},
{
"from_index": 391,
"to_index": 391,
"distance": 0,
"time": 0,
"instruction": {
"text": "Your destination is on the left."
}
}
]
}
]
},
"geometry": {
"type": "MultiLineString",
"coordinates": [
[
[
10.874805,
48.343631
],
[
10.874852,
48.343782
],
[
10.874924,
48.344021
],
[
10.874952,
48.34411
],
[
10.87499,
48.344258
],
[
10.875009,
48.344339
],
[
10.875011,
48.344449
],
[
10.875012,
48.344492
],
[
10.875087,
48.344734
],
[
10.875108,
48.344801
],
[
10.875168,
48.344975
],
[
10.875213,
48.345085
],
[
10.875268,
48.345217
],
[
10.875287,
48.345257
],
[
10.875318,
48.345318
],
[
10.875337,
48.345356
],
[
10.87538,
48.345428
],
[
10.875401,
48.345462
],
[
10.875493,
48.345611
],
[
10.875527,
48.345665
],
[
10.875643,
48.345853
],
[
10.875669,
48.345889
],
[
10.875678,
48.345903
],
[
10.875736,
48.345949
],
[
10.875891,
48.346057
],
[
10.876002,
48.346198
],
[
10.876047,
48.346254
],
[
10.876196,
48.346467
],
[
10.876206,
48.346481
],
[
10.876255,
48.346558
],
[
10.876314,
48.34666
],
[
10.876352,
48.346725
],
[
10.876409,
48.346823
],
[
10.876531,
48.347054
],
[
10.876735,
48.347464
],
[
10.877069,
48.348229
],
[
10.877082,
48.348258
],
[
10.877058,
48.348339
],
[
10.87705,
48.348366
],
[
10.87711,
48.348499
],
[
10.877172,
48.348635
],
[
10.877244,
48.348796
],
[
10.877251,
48.348809
],
[
10.877357,
48.349011
],
[
10.877454,
48.34916
],
[
10.877571,
48.349303
],
[
10.877771,
48.349529
],
[
10.87779,
48.34955
],
[
10.877845,
48.349586
],
[
10.877906,
48.349627
],
[
10.877935,
48.349646
],
[
10.878042,
48.349732
],
[
10.878156,
48.349847
],
[
10.878293,
48.350011
],
[
10.878498,
48.350257
],
[
10.878568,
48.350342
],
[
10.878661,
48.350479
],
[
10.87875,
48.350609
],
[
10.878738,
48.35067
],
[
10.878732,
48.350702
],
[
10.878934,
48.350931
],
[
10.879319,
48.351371
],
[
10.879521,
48.351599
],
[
10.879955,
48.352082
],
[
10.879992,
48.352123
],
[
10.88022,
48.352375
]]]}}],"_note":"Response truncated for documentation purposes"}
curl --location --request GET 'https://zylalabs.com/api/1922/trip+directions+api/1631/get+directions?waypoints=Required&mode=Required' --header 'Authorization: Bearer YOUR_API_KEY'
After signing up, every developer is assigned a personal API access key, a unique combination of letters and digits provided to access to our API endpoint. To authenticate with the Trip Directions API simply include your bearer token in the Authorization header.
| 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.
(Save 2 months with annual billing 🎉)
Trusted by leading companies
About the API:
The Trip Directions API is a powerful tool that provides routing and turn-by-turn directions for a variety of modes of transportation, including driving, cycling, walking, and public transportation. This API can help users plan their trips efficiently and accurately, taking into account real-time traffic conditions, distance, and other factors.
With the Trip Directions API, developers can easily integrate a routing and directions feature into their applications, making it easy for users to get directions and navigate to their destinations. The API is designed to support various types of transportation modes, including driving, cycling, and walking, and also supports multimodal public transportation, enabling users to find the most optimal route based on their mode of travel.
One of the key features of the Trip Directions API is its ability to provide turn-by-turn directions. This feature allows users to follow a detailed set of directions, including street names, landmarks, and other important information. This makes it easy for users to navigate to their destination, even in unfamiliar areas.
The Trip Directions API also offers a range of additional features that can enhance the user experience, such as real-time traffic updates, estimated travel times, and alternate routes. These features can help users avoid traffic congestion and find the fastest and most efficient route to their destination.
Another important aspect of the Trip Directions API is its flexibility. The API can be customized to meet the specific needs of developers and users, allowing for the integration of additional features and customization of the user interface.
Overall, the Trip Directions API is an essential tool for any developer looking to provide a comprehensive routing and directions feature in their application. With its ability to support various modes of transportation, provide turn-by-turn directions, and offer a range of additional features, the Trip Directions API is a reliable and efficient solution for navigating the world around us.
Pass the coordinates for the waypoints and receive the directions for your trip.
Transportation and Logistics Management: Companies in the transportation and logistics industry can integrate the Trip Directions API into their systems to optimize their routes and schedules, reducing transportation costs, and improving delivery times. With real-time traffic updates, estimated travel times, and alternate routes, companies can make data-driven decisions to ensure timely and efficient deliveries.
Travel and Tourism: Travel and tourism applications can use the Trip Directions API to help travelers plan their trips, including finding the best routes for various modes of transportation, such as driving, cycling, or walking. With turn-by-turn directions and landmarks, travelers can navigate to their destinations with ease and discover new places along the way.
Fitness and Wellness: Fitness and wellness applications can integrate the Trip Directions API to help users plan their workouts, including finding the best running, cycling, or hiking routes. The API can provide distance and elevation information, helping users to track their progress and achieve their fitness goals.
Emergency Services: Emergency services, such as police, fire, and ambulance services, can use the Trip Directions API to navigate to emergency situations quickly and efficiently. The API can provide real-time traffic updates, estimated travel times, and alternate routes, enabling emergency services to respond to incidents as quickly as possible.
Smart Cities: Cities can use the Trip Directions API to improve their transportation infrastructure and reduce traffic congestion. The API can provide real-time traffic updates, estimated travel times, and alternate routes, helping to optimize traffic flow and reduce carbon emissions. Additionally, cities can integrate the API into their public transportation systems, making it easier for commuters to navigate the city and reducing the number of cars on the road.
Besides API call limitations per month, there are no other limitations.
The Get Directions endpoint returns detailed routing information, including turn-by-turn directions, estimated travel times, distance, and real-time traffic conditions for the specified waypoints.
Key fields in the response data include "route", which contains the path taken, "legs" for individual segments of the journey, "duration" for travel time, and "steps" for detailed turn-by-turn instructions.
The response data is structured in a JSON format, organized into hierarchical sections such as "routes", "legs", and "steps", allowing users to easily navigate through the information.
Users can customize requests with parameters such as "waypoints" (coordinates), "mode" (driving, cycling, walking, public transport), and "avoid" (tolls, highways) to tailor the routing experience.
The endpoint provides information on routes, estimated travel times, distances, turn-by-turn directions, traffic conditions, and alternative routes based on user-selected transportation modes.
Data accuracy is maintained through continuous updates from reliable sources, including traffic data providers and mapping services, ensuring users receive the most current routing information.
Typical use cases include route optimization for logistics, trip planning for travelers, fitness route mapping, and emergency response navigation, leveraging real-time traffic and distance data.
Users can utilize the returned data by parsing the JSON response to extract relevant fields, such as "steps" for navigation instructions, and integrating this information into their applications for enhanced user experiences.
To obtain your API key, first sign in to your account and navigate to the API you want to use. From the API's Pricing section, choose a plan and complete the subscription process. Once subscribed, return to the API page and you will see your API Access Key displayed at the top of the documentation page. You can use this key 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.
The free trial lasts for 7 days and allows you to make up to 50 API requests.
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. If the API offers a free trial, you will see a "Free 7-Day Trial" option in its Pricing section. The trial lasts for 7 days and allows up to 50 API requests, enabling you to evaluate the API before subscribing to a paid plan.
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.
You can monitor your API usage through the response headers included with every request:
x-zyla-api-calls-monthly-used: Shows the total number of API requests you have used during the current billing period.
x-zyla-api-calls-monthly-remaining: Shows the number of API requests you have remaining for the current billing period.
Yes, you can cancel your subscription at any time. Simply go to the Pricing section of the API you're subscribed to and click the "Unsubscribe" button.
Please note that upgrades, downgrades, and cancellations take effect immediately. Once your subscription is canceled, access to the service will end immediately, regardless of any remaining API calls in your quota.
Please have a look at our Refund Policy: https://zylalabs.com/terms#refund