{"uid":"cap_vIIKrI_NpHeYWjPeKMz0f","slug":"writerslogic-geo-distance-calculator-haversine-vincenty-5b3aa96c","name":"WritersLogic Geo-Distance Calculator (Haversine + Vincenty)","description":"Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.","url":"https://agents.writerslogic.com/api/v1/geo-distance?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"pairs":{"type":"array","items":{"type":"object","required":["from","to"],"properties":{"to":{"type":"object","required":["latitude","longitude"],"properties":{"latitude":{"type":"number","maximum":90,"minimum":-90,"description":"Degrees north, -90 to 90."},"longitude":{"type":"number","maximum":180,"minimum":-180,"description":"Degrees east, -180 to 180."}}},"from":{"type":"object","required":["latitude","longitude"],"properties":{"latitude":{"type":"number","maximum":90,"minimum":-90,"description":"Degrees north, -90 to 90."},"longitude":{"type":"number","maximum":180,"minimum":-180,"description":"Degrees east, -180 to 180."}}},"label":{"type":"string","maxLength":80,"description":"Caller label echoed back."},"claimedMeters":{"type":"number","maximum":21000000,"minimum":0,"description":"Optional distance to verify, metres."}}},"maxItems":100,"minItems":1,"description":"Coordinate pairs."},"claimBasis":{"enum":["vincenty","haversine"],"type":"string","description":"Which distance claimedMeters is compared against (default vincenty)."},"toleranceMeters":{"type":"number","maximum":100000,"minimum":0,"description":"Allowed difference for claimedMeters (default 1)."}}},"responseSchema":{"type":"json"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_r1tx3Zr8NANXxReU7_ZgH","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes haversine and Vincenty inverse geodesic distances in metres plus initial and final bearings for up to 100 coordinate pairs, with optional claimed-distance verification against a tolerance.","exampleAgentPrompt":"Calculate the Vincenty and haversine distances between New York (40.7128° N, 74.0060° W) and London (51.5074° N, 0.1278° W), and check whether the claimed distance of 5,570,000 metres is correct within a 1000-metre tolerance.","exampleUseCases":[{"title":"Verify delivery route segment distances","prompt":"I have a list of GPS waypoints for a delivery route and the driver's logged distances between each stop. Can you check whether each claimed leg distance is accurate within 50 metres? Here are the pairs: from 37.7749° N 122.4194° W to 37.8044° N 122.2712° W (claimed 14,200 m), and from 37.8044° N 122.2712° W to 37.6879° N 122.4702° W (claimed 18,900 m)."},{"title":"Batch bearing calculation for drone flight paths","prompt":"I need the initial and final bearings for 3 drone flight legs: from 51.5074° N 0.1278° W to 48.8566° N 2.3522° E, from 48.8566° N 2.3522° E to 52.5200° N 13.4050° E, and from 52.5200° N 13.4050° E to 55.7558° N 37.6173° E. Use Vincenty for maximum accuracy."},{"title":"Check if two stores are within legal proximity","prompt":"Are these two franchise locations far enough apart? Store A is at 34.0522° N 118.2437° W and Store B is at 34.0689° N 118.4452° W. The franchise agreement requires at least 15,000 metres between them — verify that claimed separation using haversine as the basis and a 500-metre tolerance."}],"resultDescription":"For each coordinate pair, the API returns the haversine distance in metres, the Vincenty distance in metres (or null if the pair is nearly antipodal), initial and final bearings in degrees, and a convergence status. If claimedMeters was provided, also returns whether the claim passes or fails against the specified basis and tolerance. The echoed label is returned for each pair if supplied.","failureModes":["Nearly antipodal coordinate pairs cause Vincenty to fail to converge — vincentyMeters will be null and status set to 'unknown', with haversine used as fallback (up to ~0.5% error)","More than 100 coordinate pairs submitted — request rejected with validation error","Invalid latitude (outside -90 to 90) or longitude (outside -180 to 180) — schema validation failure","claimedMeters provided without claimBasis defaults to Vincenty, which may be null for antipodal pairs causing ambiguous verification","toleranceMeters outside 0–100000 range — schema validation error","Missing required 'from' or 'to' fields in a pair — validation error per item"],"whenToPreferThis":"Choose this endpoint when you need precise geodesic distances between raw WGS-84 coordinates without road routing or geocoding. It is ideal for verifying claimed distances, batch-processing up to 100 pairs in a single call, or when millimetre-level ellipsoidal accuracy (Vincenty) is required alongside a faster spherical approximation (haversine). Prefer this over general mapping APIs when you have raw lat/lon and need a lightweight, deterministic distance computation with optional claim validation.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-19T23:51:36.474Z","isFirstParty":false,"canonicalSlug":"writerslogic-geo-distance-calculator-haversine-vincenty-5b3aa96c"}