Distance
This API is only available to UNLIMITED plan
This will return the distance between the given 2 IP addresses in Km and Miles
Select the server you want to use here
JSON:
POST /api/distance
Parameters
| Field | Type | Description |
|---|---|---|
| from | string | from IP address |
| to | string | to IP address |
Response
For a successful request, you will receive a 200 OK response with the following JSON structure:
JSON:
{
"from": {
"ip": "1.1.1.1",
"latitude": -33.8688,
"longitude": 151.209,
"city": "Sydney",
"country": "Australia"
},
"to": {
"ip": "8.8.8.8",
"latitude": 37.4223,
"longitude": -122.085,
"city": "Mountain View",
"country": "United States"
},
"distance": {
"km": 11953.88,
"miles": 7427.79
}
}