78trust / 100

Lookup Distance

by ip-geo-api-production.up.railway.app in Weather & location

x402 APIPassing, checked 1 h ago

Great-circle distance (km and miles) between two IP addresses, with each endpoint's city/country/lat/lng.

POST https://ip-geo-api-production.up.railway.app/lookup/distance

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
370 ms typical, 494 ms slowest 5%
Last check
1 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://ip-geo-api-production.up.railway.app/lookup/distance" \
  -H "content-type: application/json" \
  -d '{"ip1":"8.8.8.8","ip2":"1.1.1.1"}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fip-geo-api-production.up.railway.app%2Flookup%2Fdistance
const res = await pay("https://ip-geo-api-production.up.railway.app/lookup/distance", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"ip1":"8.8.8.8","ip2":"1.1.1.1"}),
});
console.log(await res.json());

Example input

{
  "ip1": "8.8.8.8",
  "ip2": "1.1.1.1"
}

Example output

{
  "distance_km": 15987.34,
  "distance_miles": 9934.12,
  "ip1": {
    "city": "Ashburn",
    "country": "United States",
    "ip": "8.8.8.8",
    "lat": 39.03,
    "lng": -77.5
  },
  "ip2": {
    "city": "Sydney",
    "country": "Australia",
    "ip": "1.1.1.1",
    "lat": -33.87,
    "lng": 151.21
  }
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
1 h agoPassed402388 ms$0.001
5 h agoPassed402346 ms$0.001
8 h agoPassed402344 ms$0.001
12 h agoPassed402337 ms$0.001
16 h agoPassed402398 ms$0.001
19 h agoPassed402371 ms$0.001
23 h agoPassed402370 ms$0.001
26 h agoPassed402361 ms$0.001
31 h agoPassed402494 ms$0.001
34 h agoPassed402557 ms$0.001
37 h agoPassed402336 ms$0.001
42 h agoPassed402423 ms$0.001