With the Distance Metrics API, users can effortlessly retrieve the distance between two geographic points. Leveraging advanced algorithms and mapping technologies, the API computes the shortest distance across Earth's surface, factoring in elements like road networks, terrain, and geographical barriers.
Moreover, the Distance Metrics API is engineered for scalability and efficiency, capable of managing high volumes of requests with minimal delay. Its scalability ensures adaptability to the demands of users, spanning from small startups to large corporations.
In summary, the Distance Metrics API provides a comprehensive solution for distance computation between locations. With its user-friendly interface, adaptable output options, reliability, and scalability, the API emerges as an indispensable tool. Whether for trip planning, logistics optimization, or location-based services development, the Distance Calculator API furnishes precise distance data essential for success.
It will receive a parameter and provide you with a JSON.
Besides the number of API calls, there is no other limitation.
{
"distance": 12222.74218872189,
"unit": "kilometers",
"location1": {
"place_id": 145369277,
"licence": "Data © OpenStreetMap contributors, ODbL 1.0. http://osm.org/copyright",
"osm_type": "relation",
"osm_id": 406091,
"lat": "59.9133301",
"lon": "10.7389701",
"class": "boundary",
"type": "administrative",
"place_rank": 11,
"importance": 0.71373169654299,
"addresstype": "city",
"name": "Oslo",
"display_name": "Oslo, Norway",
"address": {
"city": "Oslo",
"ISO3166-2-lvl4": "NO-03",
"country": "Norway",
"country_code": "no"
},
"boundingbox": [
"59.8093113",
"60.1351064",
"10.4891652",
"10.9513894"
]
},
"location2": {
"place_id": 15312163,
"licence": "Data © OpenStreetMap contributors, ODbL 1.0. http://osm.org/copyright",
"osm_type": "relation",
"osm_id": 1224652,
"lat": "-34.6037181",
"lon": "-58.38153",
"class": "boundary",
"type": "administrative",
"place_rank": 16,
"importance": 0.7279817834797908,
"addresstype": "city",
"name": "Buenos Aires",
"display_name": "Buenos Aires, Comuna 1, Autonomous City of Buenos Aires, Argentina",
"address": {
"city": "Buenos Aires",
"ISO3166-2-lvl8": "AR-C",
"state_district": "Comuna 1",
"state": "Autonomous City of Buenos Aires",
"ISO3166-2-lvl4": "AR-C",
"country": "Argentina",
"country_code": "ar"
},
"boundingbox": [
"-34.7056370",
"-34.5265535",
"-58.5314494",
"-58.3351423"
]
}
}
curl --location --request GET 'https://zylalabs.com/api/3850/distance+metrics+api/4497/calculate+distances?location1=Oslo&location2=Buenos Aires' --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.
Users must indicate 2 locations to measure the distance.
The Distance Estimation API allows users to calculate the distance between two geographic locations.
There are different plans to suit all tastes, including a free trial for a small number of requests, but your rate is limited to avoid abuse of the service.
Zyla provides a wide range of integration methods for almost all programming languages. You can use these codes to integrate with your project as you need.
The Distance Metrics API returns a JSON object containing the calculated distance between two locations, along with details about each location, such as coordinates, place IDs, and geographical classifications.
Key fields in the response include "distance" (numeric value), "unit" (measurement unit), and detailed information for "location1" and "location2," including latitude, longitude, and place names.
The response data is structured as a JSON object with a top-level distance metric, unit of measurement, and nested objects for each location containing relevant geographical details.
The primary parameter required is the two locations for which the distance is to be calculated. These can be specified using place IDs, coordinates, or addresses.
Data accuracy is maintained through the use of advanced algorithms and reliable mapping technologies, sourcing data from trusted providers like OpenStreetMap to ensure precise distance calculations.
Typical use cases include route planning for deliveries, logistics optimization between warehouses, travel distance estimation, fitness tracking, and real estate analysis for proximity to amenities.
Users can utilize the returned data to inform decision-making in logistics, enhance travel planning, or integrate distance metrics into applications for improved user experience and functionality.
The endpoint provides distance measurements, geographical coordinates, place IDs, and additional metadata about each location, enabling comprehensive analysis for various applications.
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
Service Level:
100%
Response Time:
590ms
Service Level:
100%
Response Time:
342ms
Service Level:
100%
Response Time:
889ms
Service Level:
100%
Response Time:
445ms
Service Level:
100%
Response Time:
1,067ms
Service Level:
100%
Response Time:
142ms
Service Level:
100%
Response Time:
132ms
Service Level:
100%
Response Time:
614ms
Service Level:
100%
Response Time:
206ms
Service Level:
100%
Response Time:
81ms
Service Level:
100%
Response Time:
298ms
Service Level:
100%
Response Time:
3,847ms
Service Level:
100%
Response Time:
0ms
Service Level:
100%
Response Time:
1,885ms
Service Level:
100%
Response Time:
2,605ms
Service Level:
100%
Response Time:
0ms
Service Level:
100%
Response Time:
0ms
Service Level:
100%
Response Time:
0ms
Service Level:
100%
Response Time:
298ms
Service Level:
100%
Response Time:
1,835ms