{"openapi":"3.1.0","info":{"title":"Sea Horizon API","version":"1.0.0","description":"Sea-horizon and visibility maths as an API, computed locally and deterministically — the distance-to-horizon, geographic-range and dip numbers a mariner, coastal navigator or marine app works sightings with. The horizon endpoint gives the distance to the sea horizon ≈ 1.169·√(height of eye in feet) nautical miles, including the standard atmospheric refraction that bends the line of sight a little past the geometric edge — at 9 ft of eye height the horizon is about 3.5 nm off — together with the dip, how far below true horizontal that watery edge lies (≈ 0.97′·√h), the correction subtracted from a sextant altitude shot to the sea horizon. The geographic-range endpoint gives how far off a light or landmark first peeps over the horizon = the sum of two horizon distances, your own plus the object's: 1.169·(√h_eye + √h_object), so a 100 ft lighthouse from a 9 ft cockpit lifts above the sea at about 15 nm — purely geometric, before the light's own luminous range and the visibility. The object-height endpoint inverts it: how tall a tower, light or headland must stand to break the horizon at a target range, or how close you must be before a known landmark appears. Everything is computed locally and deterministically, so it is instant and private. Ideal for marine-navigation and chartplotter apps, coastal-pilotage and lighthouse tools, and sailing utilities. Pure local computation — no key, no third-party service, instant. Geometric/refraction model. 3 compute endpoints. For great-circle distance use a geo-distance API; for set & drift a set-and-drift API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/horizon-api","description":"oanor gateway"}],"tags":[{"name":"Horizon"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/geographic-range":{"get":{"operationId":"get_v1_geographic_range","tags":["Horizon"],"summary":"Range a light/landmark is first seen","description":"","parameters":[{"name":"eye_height_ft","in":"query","required":true,"description":"Height of eye (ft)","schema":{"type":"string"},"example":"9"},{"name":"object_height_ft","in":"query","required":true,"description":"Object height (ft)","schema":{"type":"string"},"example":"100"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"The geographic range — how far off a light or landmark first peeps over the horizon — is the sum of two horizon distances: your own (from height of eye) plus the object's (from its height): 1.169·(√h_eye + √h_object). A 100 ft lighthouse seen from a 9 ft cockpit lifts above the sea at about 15 nm. It is purely geometric; whether you actually SEE it also needs the light's luminous range (its brightness) and the visibility.","inputs":{"eye_height_ft":9,"object_height_ft":100},"geographic_range_km":28.145,"geographic_range_nm":15.197},"meta":{"timestamp":"2026-06-07T08:17:58.488Z","request_id":"e2dfea0e-9433-40a6-8800-95740b963436"},"status":"ok","message":"Geographic range","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/horizon":{"get":{"operationId":"get_v1_horizon","tags":["Horizon"],"summary":"Distance to sea horizon and dip","description":"","parameters":[{"name":"eye_height_ft","in":"query","required":true,"description":"Height of eye (ft)","schema":{"type":"string"},"example":"9"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"The distance to the sea horizon ≈ 1.169·√(height of eye in feet) nautical miles, including the standard atmospheric refraction that bends the line of sight a little past the geometric edge — at 9 ft of eye height the horizon is about 3.5 nm off. The dip is how far below the true horizontal that watery edge lies (≈ 0.97'·√h), the correction a navigator subtracts from a sextant altitude shot to the sea horizon.","inputs":{"eye_height_ft":9},"dip_arcmin":2.91,"distance_to_horizon_km":6.495,"distance_to_horizon_nm":3.507},"meta":{"timestamp":"2026-06-07T08:17:58.591Z","request_id":"2a886016-e0ff-4d14-9335-07632ea90693"},"status":"ok","message":"Distance to horizon","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/object-height":{"get":{"operationId":"get_v1_object_height","tags":["Horizon"],"summary":"Object height for a target range","description":"","parameters":[{"name":"range_nm","in":"query","required":true,"description":"Target range (nm)","schema":{"type":"string"},"example":"15.2"},{"name":"eye_height_ft","in":"query","required":true,"description":"Height of eye (ft)","schema":{"type":"string"},"example":"9"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Turning the geographic-range formula around: the object height needed to be seen at a target range = (range ÷ 1.169 − √eye_height)², in feet. It is how tall a tower, light or headland must stand to break the horizon at the distance you want — or, the other way, how close you must be before a known landmark of a given height appears.","inputs":{"range_nm":15.2,"eye_height_ft":9},"object_height_ft":100.05},"meta":{"timestamp":"2026-06-07T08:17:58.683Z","request_id":"17f0caa9-ae57-4285-966c-23e871e0eb23"},"status":"ok","message":"Object height","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"notes":"Feet, nm, arcmin (standard refraction). horizon = 1.169·√h_ft; dip = 0.97·√h_ft; geographic range = 1.169·(√h_eye+√h_obj). Geometric only — for luminous range use the light's nominal range. For great-circle distance use a geo-distance API.","service":"horizon-api","endpoints":{"GET /v1/meta":"This document.","GET /v1/horizon":"Distance to the sea horizon and dip from the height of eye.","GET /v1/object-height":"Object height needed to be seen at a target range.","GET /v1/geographic-range":"Range a light/landmark is first seen (eye + object)."},"description":"Sea-horizon and visibility maths: distance to the horizon and dip, geographic range of a light, and object height for a range."},"meta":{"timestamp":"2026-06-07T08:17:58.775Z","request_id":"c012a832-4d03-4d0e-b5d8-6dcbde6dff4d"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":8400,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":830,"monthly_call_quota":87000,"rps_limit":6,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2840,"monthly_call_quota":358000,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":8780,"monthly_call_quota":1665000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/horizon-api"}