{"uid":"cap_lEDagsSGvM9oAlGAj7wje","slug":"boring-api-geo-bearing-8a6d33e1","name":"boring-api · geo — Bearing","description":"Pure-library spatial math and timezone lookup. Distance, bearing, polygons, point-in-polygon, timezone-by-coords. No external API calls — all computed in-Worker.","url":"https://geo.boring-api.com/bearing","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"to":{"type":"object"},"from":{"type":"object"}}},"responseSchema":{"type":"object"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0005","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.0005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_atlhF-U2wE9LezotsEDVt","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the compass bearing (initial heading angle) between two geographic coordinates using pure in-Worker spatial math, with no external API calls.","exampleAgentPrompt":"What's the compass bearing from Seattle (47.6062, -122.3321) to Denver (39.7392, -104.9903)? Just compute the heading angle between those two points.","exampleUseCases":[{"title":"Drone flight path heading","prompt":"I need to know the initial compass heading my drone should fly from its launch point at 37.7749° N, 122.4194° W (San Francisco) to its destination at 34.0522° N, 118.2437° W (Los Angeles). Can you calculate that bearing angle for me?"},{"title":"Ship navigation azimuth check","prompt":"Our vessel is departing from Southampton (50.9097, -1.4044) and heading to New York (40.7128, -74.0060). What's the initial compass bearing we should set for that transatlantic route?"},{"title":"Hiking trail direction finder","prompt":"I'm standing at the trailhead at coordinates 36.4864, -118.5658 and need to reach the summit at 36.5785, -118.2923. What compass heading should I walk toward to go in the right direction?"}],"resultDescription":"Returns a JSON object containing the computed bearing angle in degrees (0–360), representing the initial compass heading from the 'from' coordinate to the 'to' coordinate, calculated entirely in-Worker without any external API calls.","failureModes":["Missing or malformed 'from' or 'to' coordinate objects — likely returns a 400 or validation error","Coordinates outside valid lat/lon ranges (lat > 90, lon > 180) may produce incorrect results or errors","Payment not included or insufficient — returns HTTP 402 requiring x402 payment of $0.0005 USDC","Identical 'from' and 'to' points may return undefined or zero bearing","Non-numeric latitude/longitude values causing parse failures"],"whenToPreferThis":"Choose this endpoint when you need a fast, cheap, serverless bearing/heading computation with no third-party API dependency or rate limits. Ideal for agents that need real-time directional math embedded in a workflow without managing geospatial libraries. Prefer over full mapping APIs (Google Maps, Mapbox) when you only need the bearing angle and want predictable $0.0005 per-call pricing.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T18:37:30.000Z","isFirstParty":false}