{"uid":"cap_S0ebind7ZhKsZPc0dlooJ","slug":"agent402-tools-geo-distance-haversine-47987011","name":"agent402.tools Geo Distance (Haversine)","description":"Great-circle distance between two latitude/longitude points using the haversine formula. Returns kilometers and miles. Deterministic.","url":"https://agent402.tools/api/geo-distance","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"to":{"type":"object","description":"{ lat, lng } in decimal degrees"},"from":{"type":"object","description":"{ lat, lng } in decimal degrees"}}},"responseSchema":{"type":"json","example":{"km":3935.75,"miles":2445.56}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_3Pu4Qxu6-16n5S37O90xS","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Calculates the great-circle distance between two latitude/longitude coordinate pairs using the haversine formula, returning the result in both kilometers and miles.","exampleAgentPrompt":"What is the straight-line distance between New York City (40.7128, -74.0060) and Los Angeles (34.0522, -118.2437) in both kilometers and miles?","exampleUseCases":null,"resultDescription":"Returns the great-circle distance between the two provided lat/lng points expressed in both kilometers and miles. The calculation is deterministic and uses the haversine formula.","failureModes":["Missing or malformed 'from' or 'to' object with lat/lng fields returns a validation error","Coordinates outside valid range (lat -90 to 90, lng -180 to 180) may return an error","Payment failure or insufficient USDC balance prevents the call from completing","Network timeout if the service is temporarily unavailable"],"whenToPreferThis":"Use this endpoint when you need a precise, deterministic great-circle (as-the-crow-flies) distance between two geographic coordinates and want results in both kilometers and miles without setting up your own math. Prefer this over routing APIs when you only need straight-line distance, not road distance or travel time.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:45:40.530Z","isFirstParty":false}