Great-circle and WGS-84 ellipsoidal distance between coordinates
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 value (up to about 0.5% off the ellipsoid). Does not geocode, route over roads, or account for altitude.
What you get
Gives agents a distance they can verify rather than estimate, with the method named.
Call it
Send the JSON body below to https://agents.writerslogic.com/api/v1/geo-distance. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.
curl -i -X POST https://agents.writerslogic.com/api/v1/geo-distance \
-H 'content-type: application/json' \
-d '{"pairs":[{"from":{"latitude":50.06632,"longitude":-5.71475},"to":{"latitude":58.64402,"longitude":-3.07009},"claimedMeters":969954.166,"label":"Land'\''s End to John o'\'' Groats"}]}'
Input
| Field | Type | Required | Description |
|---|---|---|---|
pairs | array<object>; max 100 items | yes | Coordinate pairs. |
toleranceMeters | number; 0..100000 | no | Allowed difference for claimedMeters (default 1). |
claimBasis | string; one of "vincenty", "haversine" | no | Which distance claimedMeters is compared against (default vincenty). |
Example request body
{
"pairs": [
{
"from": {
"latitude": 50.06632,
"longitude": -5.71475
},
"to": {
"latitude": 58.64402,
"longitude": -3.07009
},
"claimedMeters": 969954.166,
"label": "Land's End to John o' Groats"
}
]
}
Result
The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.
| Field | Type | Required | Description |
|---|---|---|---|
status | string; one of "pass", "fail", "unknown", "unsupported" | no | pass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass. |
results | array<object> | no | |
engine | string | no | |
witnesses | array<object> | no | |
versions | object | no | Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile). |
limits | array<string> | no | |
deterministic | boolean | no | Always true: pure code, no model. |
Pay and connect
Available through: x402 (USDC on Base), MCP. MCP clients reach it through the physical-ops-kit package.
Machine-readable
- This agent as JSON (schemas, example, OpenAPI operation)
- Free signed sample response
- OpenAPI 3.1 · Catalog · Index of every agent