You will get the distance by latitude and longitude. This calculator can measure in kilometers, meters, feet, inches, miles, yards or nautical miles.
It will provide you with a JSON.
This API is great for those who want to create a calculator. To provide your users with information about distances.
Besides API call limitations per month.
Insert the latitude and longitude of the 2 places you want to know the distance.
KM = Kilometers
IN = Inches
Foot = Feet
NMI = Nautical
MI = Miles
YD = Yards
Calc - Endpoint Features
| Object | Description |
|---|---|
Request Body |
[Required] Json |
{"status":1,"result":{"dist":63.07614217488817,"unit":"km"}}
curl --location --request POST 'https://zylalabs.com/api/834/longitude+and+latitude+distance+calculator+api/602/calc' --header 'Authorization: Bearer YOUR_API_KEY'
--data-raw '{
"lat1": 49.2769798,
"lng1": -123.1084469,
"lat2": 49.0478535,
"lng2": -122.3148326,
"unit": "km"
}'
| 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.
Both the GET and POST endpoints return a JSON object containing the calculated distance between two geographical locations based on their latitude and longitude.
The key fields in the response data include "status," indicating the success of the request, and "result," which contains "dist" (the calculated distance) and "unit" (the measurement unit used).
The POST endpoint accepts parameters for the latitude and longitude of two locations, as well as a unit parameter to specify the desired measurement unit (e.g., KM, MI, YD).
The response data is structured as a JSON object with a "status" field and a "result" field. The "result" field contains the distance value and the unit of measurement.
The API utilizes geographical data derived from reliable mapping and geolocation services to ensure accurate distance calculations based on latitude and longitude.
Typical use cases include integrating distance calculations into applications for travel planning, logistics, fitness tracking, and location-based services.
Users can customize their requests by specifying different latitude and longitude values for the two locations and selecting their preferred measurement unit in the POST request.
Users can utilize the returned data by interpreting the "dist" value for distance and the "unit" to understand the measurement context, allowing for integration into applications or services that require distance information.
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:
345ms
Service Level:
100%
Response Time:
537ms
Service Level:
100%
Response Time:
889ms
Service Level:
100%
Response Time:
92ms
Service Level:
100%
Response Time:
445ms
Service Level:
100%
Response Time:
110ms
Service Level:
100%
Response Time:
75ms
Service Level:
100%
Response Time:
743ms
Service Level:
100%
Response Time:
517ms
Service Level:
100%
Response Time:
159ms