{"uid":"cap_263Cz1D90j8pKHlWiCAHl","slug":"api-cn402-com-97067d9e","name":"Geo Distance Calculator (Haversine / Great-Circle)","description":"Geographic distance calculation between two coordinates using haversine formula. Computes great circle distance from latitude longitude pairs. Returns distance in kilometers, miles, and meters. For mapping, navigation, GPS coordinate distance, location based queries, Chinese maps, geo analytics, route planning, proximity search.","url":"https://api.cn402.com/geo/distance","method":"GET","headers":{},"bodySchema":{"type":"object","properties":{"lat1":{"type":"string","description":"Lat1 (optional)"},"lat2":{"type":"string","description":"Lat2 (optional)"},"lng1":{"type":"string","description":"Lng1 (optional)"},"lng2":{"type":"string","description":"Lng2 (optional)"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.008","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","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.008/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.008","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.008","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_tGexdcqK4kGB9Luy3ILjc","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.008","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the great-circle (haversine) distance between two latitude/longitude coordinate pairs on Earth.","exampleAgentPrompt":"What's the great-circle distance in kilometers between Tokyo (35.6895° N, 139.6917° E) and Sydney (-33.8688° S, 151.2093° E)?","exampleUseCases":null,"resultDescription":"Returns the computed great-circle (haversine) distance between two coordinate pairs, expressed in kilometers, representing the shortest path along the Earth's surface between those two points.","failureModes":["Invalid or out-of-range latitude/longitude values (e.g. lat > 90 or < -90) return an error","Missing required coordinate fields return a validation error","Malformed JSON body returns a 400 Bad Request","Payment failure or insufficient USDC balance blocks the request with a 402 Payment Required"],"whenToPreferThis":"Use this endpoint when you need a fast, accurate haversine/great-circle distance calculation between two GPS coordinate pairs and want a simple pay-per-call API without setting up a geospatial library. Ideal for AI agents needing on-the-fly geographic distance computation without local math dependencies.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:50:22.994Z","isFirstParty":false}