{"uid":"cap_mKBADbKxepE8rUFqLsc68","slug":"sitecheck-distance-calculator-81531d11","name":"SiteCheck Distance Calculator","description":"The great-circle distance between two points in km and miles, the initial bearing and the midpoint. Each point is a lat,lon pair or a place name (geocoded with OpenStreetMap data, ODbL). Straight-line distance only, not a route.","url":"https://api.sitecheck-api.workers.dev/api/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":["from","to"],"properties":{"to":{"type":"string","description":"lat,lon or a place name"},"from":{"type":"string","description":"lat,lon or a place name"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"to":{"lat":41.006381,"lon":28.9758715,"label":"İstanbul, Fatih, İstanbul, Marmara Bölgesi, 34122, Türkiye"},"from":{"lat":52.5173885,"lon":13.3951309,"label":"Berlin, Deutschland"},"source":"haversine on a 6371 km sphere; place names from OpenStreetMap (Nominatim, ODbL)","midpoint":{"lat":47.02386,"lon":22.02567},"checkedAt":"2026-10-14T07:00:47.494Z","distanceKm":1738.21,"distanceMiles":1080.07,"initialBearingDeg":131.2}},"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_sdwCtAJ8nEG-BQ4sgX3Hq","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 straight-line (haversine) distance and bearing between two locations, accepting either coordinates or place names","exampleAgentPrompt":"How far is it from Berlin to Istanbul in kilometers and miles, and what's the initial compass bearing?","exampleUseCases":[{"title":"Shipping route distance estimate","prompt":"I need to know the straight-line distance in kilometers between Shanghai and Los Angeles — what's the haversine distance and the bearing from Shanghai heading toward LA?"},{"title":"Travel planning distance check","prompt":"How far is it from Paris to Dubai? Give me the distance in miles and kilometers and the midpoint between them."},{"title":"Coordinate-based distance lookup","prompt":"Calculate the distance between coordinates 40.7128,-74.0060 and 51.5074,-0.1278, and tell me the bearing in degrees."}],"resultDescription":"A JSON object containing: geocoded labels and coordinates for both the from and to locations, distance in kilometers and miles, initial bearing in degrees, midpoint latitude/longitude, the calculation method (haversine on a 6371 km sphere), and a timestamp of when the calculation was performed.","failureModes":["Unrecognizable place name returns an error or null geocoding result from Nominatim","Missing required 'from' or 'to' query parameters returns a validation error","Ambiguous place names may resolve to unexpected locations (e.g. 'Springfield' without country context)","Network timeout or Nominatim rate limit may cause geocoding failure"],"whenToPreferThis":"Use this endpoint when you need a quick, pay-per-call great-circle (crow-flies) distance between any two points or named places without setting up a full mapping SDK. It is ideal when you need both distance units (km and miles), bearing, and midpoint in a single call, and when accepting place names as input (not just coordinates) is important.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-19T06:44:16.856Z","isFirstParty":false,"canonicalSlug":"sitecheck-distance-calculator-81531d11"}