The API allows you to make requests and receive JSON responses with the calculated distances. To initiate a distance calculation, you need to provide the latitude and longitude coordinates of the reference point, as well as the coordinates of each of the 9 target points.
Upon receiving a request, the API uses an advanced algorithm to calculate distances and provides accurate results for both short and long distances. Calculated distances are returned in kilometers, meters, miles, feet, nautical miles, as preferred.
The API offers seamless integration capabilities and supports multiple programming languages, making it compatible with a wide range of applications. You can easily incorporate this functionality into your website, mobile application or any other software system that requires distance calculations.
In addition to basic distance calculations, the API also provides several one endpoints to measure only 2 distances, so the user does not need to enter 9 points.
The Master Distance API offers high performance and reliability, ensuring fast response times even when dealing with large volumes of requests. This allows you to handle increased traffic and provide a consistent service, regardless of the load.
Whether you are building a navigation application, a delivery service or any other location-based application, the Master Distance API provides you with an efficient solution for determining distances between a reference point and various destination points. By leveraging this API, you can enhance the functionality of your application, optimize route planning and provide a smooth user experience.
In short, the Master Distance API offers a simple and reliable way to calculate distances between a reference point and up to 10 different points. Thanks to its robust functionality, easy integration and high performance, this API is a valuable asset for any application that requires accurate distance calculations.
It will receive parameters and provide you with a JSON.
Delivery services: Delivery companies can use the API to determine the distances between their distribution centers and customer addresses. This enables efficient route planning, optimizing delivery schedules and minimizing transportation costs.
Travel planning: Travel booking platforms can incorporate the API to help users plan their itineraries by calculating the distances between various tourist attractions. This helps create optimized travel routes and estimate travel times.
Ridesharing applications: ridesharing services can leverage the API to calculate distances between the user's pickup location and nearby drivers. This information helps match passengers with the most suitable drivers and provide accurate fare estimates.
Fitness applications: Fitness applications that track outdoor activities, such as running or cycling, can use the API to calculate the distances traveled by users during their workouts. This allows users to monitor their progress, set goals and track their performance over time.
Real estate websites: Real estate platforms can integrate the API to provide information on distances between listed properties and nearby amenities, such as schools, parks or shopping centers. This helps potential buyers or tenants assess the convenience and accessibility of a particular location.
Besides the number of API calls, there are no other limitations.
To use this endpoint all you have to do is insert the latitude and longitude of both points. It also has 2 optional parameters where you can indicate the unit of measurement (kilometers default, meters, thousands, feet, nautical_miles)
Get Distance of two points - Endpoint Features
| Object | Description |
|---|
{"distance":2101.7205905176984,"unit":"kilometers"}
curl --location --request GET 'https://zylalabs.com/api/2043/master+distance+api/1822/get+distance+of+two+points' --header 'Authorization: Bearer YOUR_API_KEY'
To use this endpoint you must indicate in the parameter the latitude and longitude of a starting point. Then you must indicate the latitude and longitude of the points you want to obtain the distance (you can indicate between 1 to 10).
You can also indicate the unit of measurement of the distance (kilometers, meters, thousands, feet, nautical_miles).
Obtain distance from several points - Endpoint Features
| Object | Description |
|---|---|
start_point |
[Required] |
end_point_1 |
Optional |
end_point_2 |
Optional |
end_point_3 |
Optional |
end_point_4 |
Optional |
end_point_5 |
Optional |
end_point_6 |
Optional |
end_point_7 |
Optional |
end_point_8 |
Optional |
end_point_9 |
Optional |
unit |
Optional |
{"start_point":{"coordinate":"(47.373535,8.541109)"},"end_point_1":{"coordinate":"(61.280642,9.696496)","distance":961.307706388549},"end_point_2":{"coordinate":"(42.335321,-71.023516)","distance":3736.183739418061},"end_point_3":{"coordinate":"(63.946372,-17.301934)","distance":1502.7828135951415},"end_point_4":{"coordinate":"(29.783423,-82.937419)","distance":4798.187339972254},"end_point_5":{"coordinate":"(39.177734,-123.404589)","distance":5762.456574816487},"end_point_6":{"coordinate":"(40.116758,-111.149673)","distance":5346.382214243799},"end_point_7":{"coordinate":"(41.192840,-2.550522)","distance":693.6219006592844},"end_point_8":{"coordinate":"(61.402022,23.717415)","distance":1138.5416195733615},"end_point_9":{"coordinate":"(57.079849,-116.604973)","distance":4561.1790023445465},"unit":"miles"}
curl --location --request GET 'https://zylalabs.com/api/2043/master+distance+api/1823/obtain+distance+from+several+points?start_point=(47.373535,8.541109)&end_point_1=(61.280642,9.696496)&end_point_2=(42.335321,-71.023516)&end_point_3=(63.946372,-17.301934)&end_point_4=(29.783423,-82.937419)&end_point_5=(39.177734,-123.404589)&end_point_6=(40.116758,-111.149673)&end_point_7=(41.192840,-2.550522)&end_point_8=(61.402022,23.717415)&end_point_9=(57.079849,-116.604973)&unit=miles' --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.
Each endpoint returns JSON data containing distance calculations. The "Get Distance of two points" endpoint provides the distance between two specified coordinates, while the "Obtain distance from several points" endpoint returns distances from a reference point to multiple target points, along with their coordinates.
Key fields in the response include "distance" (the calculated distance), "unit" (the measurement unit), and for multiple points, "start_point" and "end_point_X" (coordinates and distances for each target point).
The response data is structured in a JSON format. For the two-point endpoint, it includes a single distance value and unit. For the multiple points endpoint, it organizes distances by each target point, with coordinates and respective distances listed under "end_point_X".
Users can provide latitude and longitude for both endpoints. Additionally, they can specify an optional "unit" parameter to choose the measurement unit (kilometers, meters, miles, feet, nautical miles) for the distance calculation.
Users can customize requests by selecting the coordinates of the reference and target points, as well as choosing their preferred unit of measurement. This flexibility allows for tailored distance calculations based on user needs.
Typical use cases include route optimization for delivery services, travel itinerary planning, ridesharing distance calculations, fitness tracking for outdoor activities, and real estate assessments based on proximity to amenities.
The API employs advanced algorithms for distance calculations, ensuring high accuracy for both short and long distances. Continuous updates and quality checks are implemented to maintain data reliability.
Users can expect consistent JSON responses with clear distance values and units. For multiple points, distances will be listed sequentially, allowing for easy parsing and integration into applications.
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:
445ms
Service Level:
100%
Response Time:
574ms
Service Level:
100%
Response Time:
1,057ms
Service Level:
100%
Response Time:
889ms
Service Level:
100%
Response Time:
342ms
Service Level:
100%
Response Time:
487ms
Service Level:
100%
Response Time:
206ms
Service Level:
100%
Response Time:
120ms
Service Level:
100%
Response Time:
590ms
Service Level:
100%
Response Time:
142ms