{
"origin_location": "New York, United States",
"destination_location": "Jersey City, Hudson County, New Jersey, United States",
"distance_in_miles": "4.1",
"distance_in_kilometers": "6.5",
"distance_in_nautical_miles": "3.5",
"travel_time": "12 minutes, 46 seconds",
"origin_latitude": "40.7127281",
"origin_longitude": "-74.0060152",
"destination_latitude": "40.7215682",
"destination_longitude": "-74.0474550"
}
curl --location --request GET 'https://zylalabs.com/api/15097/driving+distance+and+travel+time+api/40118/origin+and+destination+location?origin=New York City, NY&destination=Jersey City, Hudson County' --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 Driving Distance and Travel Time 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 🎉)
Calculate driving distance and estimated travel time between two locations. Get distances in miles, kilometers, and nautical miles, plus geographic coordinates.
The API returns driving distance, estimated travel time, resolved location names, and geographic coordinates (latitude and longitude) for both origin and destination locations.
Key fields include `origin_location`, `destination_location`, `distance_in_miles`, `distance_in_kilometers`, `distance_in_nautical_miles`, `travel_time`, `origin_latitude`, `origin_longitude`, `destination_latitude`, and `destination_longitude`.
The response is structured as a JSON object containing key-value pairs. Each key corresponds to specific data points, such as locations, distances, and travel times, making it easy to parse and utilize.
The API provides information on driving distances, estimated travel times, geographic coordinates, and resolved location names, which are useful for route planning and logistics.
The primary parameters are the origin and destination locations. Users can specify these as addresses or geographic coordinates to customize their requests.
Data accuracy is maintained through regular updates and quality checks against reliable mapping and navigation sources, ensuring that the distances and travel times reflect current road conditions.
Typical use cases include route planning for travel, delivery distance estimation for logistics, and integration into transportation applications that require distance and time calculations.
Users can utilize the returned data for various applications, such as calculating travel costs, optimizing delivery routes, or providing users with estimated arrival times based on driving distances.
The primary function of the Driving Distance and Travel Time API is to calculate the driving distance and estimated travel time between two specified locations.
The API provides driving distances in multiple units, including miles, kilometers, and nautical miles.
Yes, in addition to distance and travel time, the API can also provide the geographic coordinates of the specified locations.
The API provides estimated travel time based on driving routes between the origin and destination locations.
Practical use cases include logistics and delivery planning, route optimization for field services, estimating travel times for ride-sharing services, and providing users with travel duration estimates for mapping applications.
The API typically returns data in a structured format, commonly JSON, which includes fields for distance (in various units), travel time, and geographic coordinates.
Absolutely. This API is designed for integration into web and mobile applications to dynamically display driving distances and estimated travel times to users based on their selected locations.
The core value proposition lies in providing accurate and versatile driving distance and travel time calculations, enabling better planning, optimization, and user experience in location-aware applications.
The API accepts location inputs, which can be addresses or geographic coordinates, and calculates the driving route and associated metrics between them.
A typical response will include fields such as origin coordinates, destination coordinates, total distance (e.g., `distance_miles`, `distance_km`), estimated travel time (e.g., `travel_time_seconds`), and potentially route geometry.
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