{"uid":"cap_nNXtjo_SpPCHnDr7UtWrk","slug":"agent402-uk-haversine-great-circle-distance-eb6289c4","name":"Agent402 UK Haversine Great-Circle Distance","description":"Don't burn tokens on deterministic work. Go/no-go jobs first: payout preflight, text firewall (PII/secrets), budget check — then rails, calendars, finmath. x402 USDC on Base. UK + global. agent402.co.uk — not agent402.tools. $0.001–$0.002 USDC on Base. No API keys.","url":"https://agent402.co.uk/v1/geo/distance?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["lat1","lon1","lat2","lon2"],"properties":{"lat1":{"type":"string","description":"Origin lat"},"lat2":{"type":"string","description":"Dest lat"},"lon1":{"type":"string","description":"Origin lon"},"lon2":{"type":"string","description":"Dest lon"},"unit":{"type":"string","description":"km|mi"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"unit":"km","valid":true,"distance":343}},"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_Z8VRspz_SSu2Q7Q6p2g8D","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":"Computes the straight-line great-circle distance between two lat/lon coordinate pairs using the Haversine formula, returning the result in km or miles.","exampleAgentPrompt":"What's the straight-line great-circle distance in kilometers between London (51.5074, -0.1278) and Paris (48.8566, 2.3522)?","exampleUseCases":[{"title":"Logistics route pre-screening","prompt":"What's the as-the-crow-flies distance in kilometers between our warehouse in Chicago (41.8781, -87.6298) and the delivery destination in Detroit (42.3314, -83.0458)? I need a quick aerial estimate before we check road routing."},{"title":"Shipping zone classification","prompt":"Can you calculate the straight-line distance in miles between New York (40.7128, -74.0060) and Miami (25.7617, -80.1918)? I want to know if it falls within our 1500-mile shipping tier."},{"title":"Flight distance estimation","prompt":"How many kilometers is the great-circle distance between Sydney (-33.8688, 151.2093) and Singapore (1.3521, 103.8198)? I need the aerial distance, not the flight path."}],"resultDescription":"A JSON object containing the numeric distance value, the unit used (km or mi), and a validity flag indicating whether the input coordinates were valid and the computation succeeded.","failureModes":["Missing required query parameter (lat1, lon1, lat2, lon2) returns an error response","Invalid or out-of-range coordinate values (e.g. lat > 90) may return valid:false","Unrecognized unit value may default to km or return an error","Network or service unavailability returns a non-200 HTTP status","Payment failure (402) if USDC micropayment is not resolved"],"whenToPreferThis":"Use this endpoint when you need a fast, cheap, mathematically exact great-circle (as-the-crow-flies) distance between two lat/lon points for logistics pre-screening, zone classification, or geographic filtering. Prefer it over road-routing APIs when road distance is not needed and over manual Haversine implementations when you want a reliable, hosted computation. Not suitable when turn-by-turn or road-network distance is required.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-10T00:30:45.054Z","isFirstParty":false,"canonicalSlug":"agent402-uk-haversine-great-circle-distance-eb6289c4"}