{"uid":"cap_45JNrC0q3NwctMnGmUyim","slug":"geospatial-distance-and-bearing-calculator-eaae35fa","name":"Geospatial Distance and Bearing Calculator","description":"Distance and initial bearing between two coordinates.","url":"https://geospatial.openverbs.com/v1/distance","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","required":["from","to"],"properties":{"to":{"type":"object","required":["lat","lon"],"properties":{"lat":{"type":"number","maximum":90,"minimum":-90},"lon":{"type":"number","maximum":180,"minimum":-180}},"description":"Destination coordinate.","additionalProperties":false},"from":{"type":"object","required":["lat","lon"],"properties":{"lat":{"type":"number","maximum":90,"minimum":-90},"lon":{"type":"number","maximum":180,"minimum":-180}},"description":"Origin coordinate.","additionalProperties":false}},"additionalProperties":false},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_GSpV1f1feOXsOgTDLdTHm","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","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 distance and initial bearing between two WGS84 lat/lon coordinates.","exampleAgentPrompt":"What's the distance and initial bearing from 40.7128° N, 74.0060° W (New York City) to 51.5074° N, 0.1278° W (London)?","exampleUseCases":[{"title":"Drone flight path planning","prompt":"I need to know the straight-line distance and compass bearing from the launch point at 37.7749° N, 122.4194° W to the target at 37.8044° N, 122.2712° W so I can plan the drone's initial heading."},{"title":"Shipping route distance estimate","prompt":"How far apart are the ports at 1.3521° N, 103.8198° E (Singapore) and 22.3193° N, 114.1694° E (Hong Kong), and what's the initial bearing for the route?"},{"title":"Nearest tower signal analysis","prompt":"Calculate the distance and bearing from my base station at 51.5074° N, 0.1278° W to the relay tower at 51.4700° N, 0.4543° W so we can check if it falls within the 50km range."}],"resultDescription":"Returns the great-circle (haversine or Vincenty) distance between the two coordinates (likely in kilometers or meters) and the initial compass bearing in degrees from the origin toward the destination.","failureModes":["Latitude or longitude out of valid range (lat: -90 to 90, lon: -180 to 180) returns a validation error","Missing required 'from' or 'to' fields causes a 400 bad request","Identical origin and destination may return distance 0 and undefined or null bearing","Network timeout or service unavailability returns a 5xx error","Payment failure via x402 protocol results in a 402 Payment Required response"],"whenToPreferThis":"Use this endpoint when you need a fast, cheap ($0.002/call) programmatic computation of point-to-point geodesic distance and bearing from raw coordinates, without needing routing, roads, or address geocoding. Prefer it over full mapping APIs when you already have lat/lon values and just need the angular and linear relationship between two points.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:43:12.506Z","isFirstParty":false}