{"openapi":"3.1.0","info":{"title":"Sundial API","version":"1.0.0","description":"Sundial gnomonics maths as an API, computed locally and deterministically — the hour-line, gnomon and longitude-correction numbers a dial maker, horologist or astronomy hobbyist lays a sundial out with. The hour-line-angle endpoint gives the angle of each hour line on the dial plate, measured from the noon line: for a horizontal dial tan(angle) = sin(latitude) × tan(hour angle), and for a vertical south-facing dial cos(latitude) is used instead, where the hour angle is 15° per hour from solar noon. At 50° latitude the 1-o'clock line sits about 11.6° from noon rather than 15° — the lines bunch near noon and spread toward the ends, which is exactly why a sundial's hours are unevenly spaced. The gnomon endpoint gives the style angle: the gnomon's shadow-casting edge must point at the celestial pole, so it rises at the latitude angle on a horizontal dial (50° at 50° N) and at 90° − latitude on a vertical dial — get this wrong and the dial keeps correct time at only one season. The longitude-correction endpoint converts the dial's local apparent time to clock time: 4 minutes of time per degree of longitude, correction = 4 × (reference meridian − local longitude), so a dial at 7.5° E on Central European Time reads 30 minutes slow versus the clock. Everything is computed locally and deterministically, so it is instant and private. Ideal for sundial-design and gnomonics tools, astronomy-education and maker apps, and horology calculators. Pure local computation — no key, no third-party service, instant. Add the equation of time for full clock accuracy. 3 compute endpoints. For the sun's position use a solar-position API; for sunrise and sunset a sunrise API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/sundial-api","description":"oanor gateway"}],"tags":[{"name":"Sundial"},{"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/gnomon":{"get":{"operationId":"get_v1_gnomon","tags":["Sundial"],"summary":"Gnomon (style) angle","description":"","parameters":[{"name":"latitude_deg","in":"query","required":true,"description":"Latitude (degrees)","schema":{"type":"string"},"example":"50"},{"name":"dial_type","in":"query","required":false,"description":"horizontal or vertical (default horizontal)","schema":{"type":"string"},"example":"horizontal"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"The gnomon's straight edge (the 'style') must point at the celestial pole, parallel to Earth's axis, so its angle above the dial plate is fixed by the latitude: on a horizontal dial the style rises at the latitude angle (50° at 50° N); on a vertical south dial it is 90° − latitude. Get this angle right and the shadow keeps correct time year-round; get it wrong and the dial reads accurately at only one season.","inputs":{"dial_type":"horizontal","latitude_deg":50},"style_angle_deg":50},"meta":{"timestamp":"2026-06-07T08:17:49.811Z","request_id":"b3dc1ca3-1cf5-4167-bcfe-f66c56a1b8fb"},"status":"ok","message":"Gnomon angle","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/hour-line-angle":{"get":{"operationId":"get_v1_hour_line_angle","tags":["Sundial"],"summary":"Hour-line angle on the dial","description":"","parameters":[{"name":"latitude_deg","in":"query","required":true,"description":"Latitude (degrees, N positive)","schema":{"type":"string"},"example":"50"},{"name":"hour_angle_deg","in":"query","required":true,"description":"Hour angle from solar noon (15°/hour)","schema":{"type":"string"},"example":"15"},{"name":"dial_type","in":"query","required":false,"description":"horizontal or vertical (default horizontal)","schema":{"type":"string"},"example":"horizontal"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"The hour-line angle on the dial plate, measured from the noon (12:00) line: for a horizontal dial tan(angle) = sin(latitude) × tan(hour angle); for a vertical south-facing dial it is cos(latitude) instead. The hour angle is 15° per hour from solar noon (1 pm = 15°, 2 pm = 30°). At 50° latitude the 1-o'clock line sits about 11.6° from noon, not 15° — the lines bunch near noon and spread toward the ends, which is why a sundial's hours are unevenly spaced.","inputs":{"dial_type":"horizontal","latitude_deg":50,"hour_angle_deg":15},"hour_line_angle_deg":11.5995},"meta":{"timestamp":"2026-06-07T08:17:49.912Z","request_id":"c99c1664-125f-4e84-b8ba-530b6d616006"},"status":"ok","message":"Hour-line angle","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/longitude-correction":{"get":{"operationId":"get_v1_longitude_correction","tags":["Sundial"],"summary":"Longitude time correction","description":"","parameters":[{"name":"local_longitude_deg","in":"query","required":true,"description":"Local longitude (degrees, E positive)","schema":{"type":"string"},"example":"7.5"},{"name":"reference_meridian_deg","in":"query","required":true,"description":"Time-zone reference meridian (degrees, E positive)","schema":{"type":"string"},"example":"15"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"A sundial reads local apparent (solar) time, but clocks run on a zone's reference meridian, so you add a longitude correction: 4 minutes of time per degree of longitude — correction = 4 × (reference meridian − local longitude), east positive. A dial at 7.5° E on Central European Time (15° E) reads 30 minutes slow versus the clock, so add 30 minutes. (For full clock time also apply the equation of time, which varies through the year.)","inputs":{"local_longitude_deg":7.5,"reference_meridian_deg":15},"correction_minutes":30},"meta":{"timestamp":"2026-06-07T08:17:50.007Z","request_id":"d2cb961c-d27b-45fc-aada-9fde4cff6040"},"status":"ok","message":"Longitude correction","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":"Degrees; correction in minutes. horizontal: tan(angle)=sin(lat)·tan(HA), style=lat; vertical-south: cos(lat), style=90−lat; longitude correction = 4·(ref−local) min. Add the equation of time for clock time. For the sun's position use a solar-position API.","service":"sundial-api","endpoints":{"GET /v1/meta":"This document.","GET /v1/gnomon":"Gnomon (style) angle from latitude and dial type.","GET /v1/hour-line-angle":"Hour-line angle from latitude, hour angle and dial type.","GET /v1/longitude-correction":"Time correction in minutes from local and reference longitude."},"description":"Sundial gnomonics: hour-line angle (horizontal/vertical dial), gnomon style angle, and longitude time correction."},"meta":{"timestamp":"2026-06-07T08:17:50.106Z","request_id":"dcef5167-a0b1-4745-ab33-2300d004dd22"},"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":7050,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":685,"monthly_call_quota":59500,"rps_limit":6,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2350,"monthly_call_quota":246000,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":7280,"monthly_call_quota":1135000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/sundial-api"}