Distance between coordinates
agent-data-tools.revmesh2074.workers.dev/geo/distance
Distance between coordinates. Great-circle distance between two latitude/longitude points (haversine on the mean earth radius) in kilometres, miles and nautical miles, plus the initial compass bearing and the midpoint. Accurate to about 0.5% against the ellipsoid. Use for delivery radius, travel and proximity checks, or sorting places by distance; for coordinates of a place name use geocode first.
GET
https://agent-data-tools.revmesh2074.workers.dev/geo/distanceUptime100% of 2 checks in 30 days
30 days agoToday
Try it
Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.
The response shows up here.
Call it from an agent
// npm install fourohtwo
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://agent-data-tools.revmesh2074.workers.dev/geo/distance?lat1=59.3293&lat2=51.5072&lon1=18.0686&lon2=-0.1276");
console.log(await res.json());Example input
{
"lat1": 59.3293,
"lat2": 51.5072,
"lon1": 18.0686,
"lon2": -0.1276
}