{"uid":"cap_lCl2nk1hMoz3RfaGJksCy","slug":"agent-data-tools-revmesh2074-workers-dev-great-circle-distance-49fbe697","name":"Great-Circle Distance Calculator (km, miles, bearing, midpoint)","description":"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.","url":"https://agent-data-tools.revmesh2074.workers.dev/geo/distance?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","required":["lat1","lon1","lat2","lon2"],"properties":{"lat1":{"type":"number","description":"Latitude of the first point (-90 to 90)"},"lat2":{"type":"number","description":"Latitude of the second point"},"lon1":{"type":"number","description":"Longitude of the first point (-180 to 180)"},"lon2":{"type":"number","description":"Longitude of the second point"}}},"responseSchema":{"type":"object","properties":{"km":{"type":"number"},"miles":{"type":"number"},"bearing":{"type":"number"},"compass":{"type":"string"},"midpoint":{"type":"object","properties":{"lat":{"type":"number"},"lon":{"type":"number"}}},"nauticalMiles":{"type":"number"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USD","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_1eFud3kxZo8drGyNxFynG","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"agent-data-tools.revmesh2074.workers.dev","brandSlug":"agent-data-tools-revmesh2074-workers-dev-x402","brandBaseUrl":"https://agent-data-tools.revmesh2074.workers.dev","brandDocsUrl":null,"whatItDoes":"Computes the great-circle distance between two lat/lon points in km, miles, and nautical miles, plus the initial compass bearing and geographic midpoint using the haversine formula.","exampleAgentPrompt":"How far is it from New York City (40.7128, -74.0060) to London (51.5074, -0.1278) in kilometres and miles, and what's the compass bearing and midpoint?","exampleUseCases":[{"title":"Delivery radius eligibility check","prompt":"Can you tell me whether a customer at 37.7749° N, 122.4194° W is within 15 miles of our warehouse at 37.3382° N, 121.8863° W? Give me the exact distance in miles."},{"title":"Flight path bearing and midpoint","prompt":"What's the great-circle distance, initial compass bearing, and geographic midpoint between London (51.5074, -0.1278) and Dubai (25.2048, 55.2708)? I need it in both km and nautical miles."},{"title":"Sorting nearby venues by distance","prompt":"I have a user at coordinates 48.8566, 2.3522 and a venue at 48.8738, 2.2950 — what's the distance in kilometres and the compass direction from the user to the venue?"}],"resultDescription":"Returns a JSON object containing the distance in kilometres (km), miles, and nautical miles, the initial compass bearing as a decimal degree number and a human-readable compass direction string (e.g. 'NNE'), and the geographic midpoint as a lat/lon object. Accurate to approximately 0.5% relative to the WGS-84 ellipsoid.","failureModes":["Missing required parameter (lat1, lon1, lat2, or lon2) returns an error","Latitude values outside -90 to 90 or longitude outside -180 to 180 cause validation errors","Non-numeric coordinate values result in a parse or type error","Identical coordinates return zero distance with an undefined or zero bearing"],"whenToPreferThis":"Choose this endpoint when you need fast, accurate great-circle distance calculations between two known coordinate pairs without the overhead of a full mapping API. Ideal for delivery radius checks, proximity sorting, travel distance estimates, and navigation bearing — especially when coordinates are already known. If you need to convert a place name to coordinates first, use a geocoding endpoint before calling this. Prefer this over a full routing API when you need straight-line (as-the-crow-flies) distance rather than road distance.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-30T07:21:39.639Z","isFirstParty":false,"canonicalSlug":"agent-data-tools-revmesh2074-workers-dev-great-circle-distance-49fbe697"}