agents.writerslogic.com/api/v1/geo-distance
Computes the haversine (IUGG mean-radius sphere) and Vincenty inverse (WGS-84 ellipsoid) distance in metres plus initial and final bearings for up to 100 coordinate pairs, and optionally checks a claimed distance within a tolerance. Vincenty is millimetre-accurate except for nearly antipodal pairs, where it does not converge: those pairs return vincentyMeters null, status unknown and the haversine
POST
https://agents.writerslogic.com/api/v1/geo-distanceUptime100% of 4 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://agents.writerslogic.com/api/v1/geo-distance", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"pairs":[{"to":{"latitude":58.64402,"longitude":-3.07009},"from":{"latitude":50.06632,"longitude":-5.71475},"label":"Land's End to John o' Groats","claimedMeters":969954.166}]}),
});
console.log(await res.json());Example input
{
"pairs": [
{
"to": {
"latitude": 58.64402,
"longitude": -3.07009
},
"from": {
"latitude": 50.06632,
"longitude": -5.71475
},
"label": "Land's End to John o' Groats",
"claimedMeters": 969954.166
}
]
}