{"data":{"billing":{"currency":"USD","mode":"rules","parameters":[],"policy_version":2,"sale":{"addons":[],"base_price_micro_usd":"0","max_cost_micro_usd":"2000","quantities":[{"id":"upstream_credits","label":"Actual API.SH credits used","max_quantity":"1","measure":"value","pointer":"/credits_used","price_micro_usd":"2000","quantity_scale":0,"source":"response","unit":"credit","unit_quantity":"1"}],"rounding":"ceil","variants":[]}},"capabilityId":"55603ace-bd14-493b-aaa6-bd204e799f24","catalogType":"api","categories":["data"],"dataPlatform":"calendar","dataPlatformLogoUrl":"https://api.sh/logos/calendar.png","dataPlatformTranslations":{},"dataProduct":"calendar","description":"Get Calendar Sun \u0026 Moon data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Apish, pass parameters such as output, q, raw, and retrieve structured data including location time zone, computed sunrise timestamp, computed sunset timestamp, polar-day flag, and moon-phase label for calendar context, and follow-up calculations.","descriptionTranslations":{"ar":"احسب الشروق والغروب وبيانات القمر عبر OpenAny REST لمكان وفترة، مع ارتفاع الراصد وحقول الشفق وسياق المنطقة الزمنية المحلية. استخدم النتائج المنظمة لبناء عروض مرتبطة بالتاريخ أو تخطيط حساب لاحق، مع الحفاظ على قواعد التاريخ والموقع حين يوفرها المصدر، وأمثلة الطلبات وتسعير التنفيذ الحالي في صفحة التفاصيل.","ja":"OpenAny REST で場所と期間の出入時刻・月情報を計算し、観測高度・薄明・現地タイムゾーンを確認できます。 構造化結果を日付表示や後続計算に使い、出典に含まれる日付・場所の規則を保持できます。詳細ページにはリクエスト例と選択した実装の料金があります。","zh":"通过 OpenAny REST 按地点和日期范围计算日出日落、月亮信息，支持观测海拔并提供曙暮光和当地时区上下文。 可将结构化结果用于日期展示或后续计算，并在来源提供时保留日期和地点约定；详情页提供请求示例和当前实现价格。"},"effectContentHtml":"","executionMode":"sync","id":"a2ea9071-ab27-461b-b9d1-38f8596d39d7","includedContentHtml":"","inputs":[{"description":"Place name, e.g. London or Paris, France.","location":"query","name":"q","nullable":false,"required":false,"type":"string"},{"description":"Latitude (with lon) instead of a place.","location":"query","name":"lat","nullable":false,"required":false,"type":"number"},{"description":"Longitude.","location":"query","name":"lon","nullable":false,"required":false,"type":"number"},{"description":"Postal code (with country).","location":"query","name":"postal_code","nullable":false,"required":false,"type":"string"},{"description":"Country code to narrow a place or postal code.","location":"query","name":"country","nullable":false,"required":false,"type":"string"},{"description":"First day (YYYY-MM-DD); default today at the place.","location":"query","name":"date","nullable":false,"required":false,"type":"string"},{"description":"Number of days (default 1, max 31).","location":"query","name":"days","nullable":false,"required":false,"type":"integer"},{"description":"Observer height in metres (moves sunrise and sunset slightly).","location":"query","name":"elevation","nullable":false,"required":false,"type":"number"},{"description":"0 leaves out the bulky `raw` source blocks (often 10-30x smaller).","enum_values":["0","1"],"location":"query","name":"raw","nullable":false,"required":false,"type":"string"},{"description":"Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included.","location":"query","name":"fields","nullable":false,"required":false,"type":"string"},{"description":"1 skips the 24-hour cache and fetches live.","enum_values":["1"],"location":"query","name":"fresh","nullable":false,"required":false,"type":"string"},{"description":"JSON only for this OpenAny product. CSV and NDJSON exports are not supported; omit output or send json.","enum_values":["json"],"location":"query","name":"output","nullable":false,"required":false,"type":"string"},{"description":"With output=csv|ndjson: the top-level list to turn into rows (e.g. `reviews`), or `.` for the whole object as one row.","location":"query","name":"records","nullable":false,"required":false,"type":"string"}],"logoUrl":"https://api.sh/logos/calendar.png","method":"GET","name":"Calendar sunrise, sunset and moon phase API","nameTranslations":{},"overviewHtml":"\u003ch2\u003eCalendar Sun \u0026amp; Moon API\u003c/h2\u003e\n\u003cp\u003eUse q, lat/lon or postal_code with country. date defaults to today at the resolved place and days defaults to 1, maximum 31. elevation is observer height in metres. Solar and lunar records retain local-zone timestamps, polar or always-up/down flags and available event times; an absent event is not midnight.\u003c/p\u003e\n\u003ch2\u003eQuick Facts\u003c/h2\u003e\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eFact\u003c/th\u003e\n\u003cth\u003eValue\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003eAccess\u003c/td\u003e\n\u003ctd\u003eOpenAny REST\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eAuthentication\u003c/td\u003e\n\u003ctd\u003eOpenAny API key in the Authorization header\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eCore inputs\u003c/td\u003e\n\u003ctd\u003eChoose the lookup or search inputs described below. Optional: q, lat, lon, postal_code, country, date, days, elevation. JSON output; fresh=1 bypasses cache and raw=0 omits raw source blocks.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eSelected implementation\u003c/td\u003e\n\u003ctd\u003eapish · Calendar sunrise, sunset and moon phase API\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eBilling\u003c/td\u003e\n\u003ctd\u003eSee the pricing area for the selected implementation and request options\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003ch2\u003eWhat You Can Build\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cstrong\u003eCalendar context\u003c/strong\u003e: Retain the requested date range and returned source context when displaying calendar information.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eFollow-up calculations\u003c/strong\u003e: Use explicit source conventions and the returned identifiers or dates when planning a follow-up calculation.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch2\u003eReturned Data\u003c/h2\u003e\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eField\u003c/th\u003e\n\u003cth\u003eMeaning\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003elocation.timezone\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eLocation time zone\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003edays[].sun.sunrise\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eComputed sunrise timestamp\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003edays[].sun.sunset\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eComputed sunset timestamp\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003edays[].sun.polar_day\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003ePolar-day flag\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003edays[].moon.phase_name\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eMoon-phase label\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003edays[].moon.always_up\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eMoon always-up flag\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003ch2\u003eQuick Start\u003c/h2\u003e\n\u003col\u003e\n\u003cli\u003eSet OPENANY_API_KEY to your OpenAny API key.\u003c/li\u003e\n\u003cli\u003eReview the selected implementation and pricing, then adapt the request below to your target.\u003c/li\u003e\n\u003cli\u003eCheck the HTTP response and business result before reading optional fields.\u003c/li\u003e\n\u003c/ol\u003e\n\u003cpre\u003e\u003ccode class=\"language-bash\"\u003ecurl --request GET --get \\\n  https://api.openany.si/v1/agent-apis/apish/calendar/v1/sun-moon \\\n  -H \u0026#34;Authorization: Bearer ${OPENANY_API_KEY}\u0026#34; \\\n  --data-urlencode output=json \\\n  --data-urlencode q=London \\\n  --data-urlencode raw=0\n\u003c/code\u003e\u003c/pre\u003e\n\u003ch2\u003eRequest and Response Examples\u003c/h2\u003e\n\u003cp\u003eThe response example is a documentation reference and may be abbreviated. The documented request is a calling template; use the published contract and returned response for the selected implementation.\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://openany.si/api/v1/agent-apis/a2ea9071-ab27-461b-b9d1-38f8596d39d7\"\u003ePublished Calendar Sun \u0026amp; Moon API implementation contract\u003c/a\u003e.\u003c/p\u003e\n\u003ch2\u003ePricing and Billing\u003c/h2\u003e\n\u003cp\u003eThe pricing area reflects the selected API implementation. Review its billing unit and any request-dependent rules before calling; a source service\u0026#39;s public availability does not determine OpenAny billing.\u003c/p\u003e\n\u003ch2\u003eFrequently Asked Questions\u003c/h2\u003e\n\u003ch3\u003eHow many days can I request?\u003c/h3\u003e\n\u003cp\u003edays defaults to 1 and is capped at 31.\u003c/p\u003e\n\u003ch3\u003eWhat unit does elevation use?\u003c/h3\u003e\n\u003cp\u003eMetres of observer height.\u003c/p\u003e\n\u003ch3\u003eAre event times in UTC?\u003c/h3\u003e\n\u003cp\u003eThe documented results use the resolved place’s local time-zone context; retain the timestamp offset.\u003c/p\u003e\n\u003ch3\u003eWhat does a missing rise or set time mean?\u003c/h3\u003e\n\u003cp\u003eInspect polar and always-up/down flags; do not replace a missing event with midnight.\u003c/p\u003e\n\u003ch3\u003eHow do I bypass cached results?\u003c/h3\u003e\n\u003cp\u003ePass fresh=1. A cache bypass retrieves available source data; it does not make unpublished or restricted records available.\u003c/p\u003e\n\u003ch3\u003eCan I request CSV or NDJSON?\u003c/h3\u003e\n\u003cp\u003eThis OpenAny implementation serves JSON only. Omit output or set output=json.\u003c/p\u003e\n\u003ch2\u003eRelated APIs\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003e\u003ca href=\"https://openany.si/market/apis/calendar/calendar-business-day-calculator-api\"\u003eCalendar Business Day Calculator API\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://openany.si/market/apis/calendar/calendar-conversion-api\"\u003eCalendar conversion API\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://openany.si/market/apis/calendar/calendar-hijri-date-converter-api\"\u003eCalendar hijri date converter API\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n","pagePath":"/markets/apis/calendar/calendar-sunrise-sunset-and-moon-phase-api?offering=a2ea9071-ab27-461b-b9d1-38f8596d39d7","providerId":"apish","publicPath":"/v1/agent-apis/apish/calendar/v1/sun-moon","requestContentType":"none","revision":3,"samples":[{"http_status":200,"name":"Official example · Live API.SH response · Minimal request","request":{"body":null,"headers":{},"path":{},"query":{"output":"json","q":"London","raw":"0"}},"response_body":{"cached":false,"count":1,"credits_used":1,"days":[{"date":"2026-11-19","moon":{"age_days":9.4,"always_down":false,"always_up":false,"distance_km":388585,"illumination_pct":70.8,"moonrise":"2026-11-19T13:36:13+00:00","moonset":"2026-11-19T00:55:41+00:00","phase":0.318,"phase_name":"Waxing Gibbous","waxing":true},"sun":{"astronomical_dawn":"2026-11-19T05:27:06+00:00","astronomical_dusk":"2026-11-19T18:07:29+00:00","civil_dawn":"2026-11-19T06:47:36+00:00","civil_dusk":"2026-11-19T16:46:58+00:00","day_length":"8h 44m","day_length_seconds":31478,"golden_hour_evening_start":"2026-11-19T15:15:06+00:00","golden_hour_morning_end":"2026-11-19T08:19:29+00:00","nautical_dawn":"2026-11-19T06:06:35+00:00","nautical_dusk":"2026-11-19T17:27:59+00:00","polar_day":false,"polar_night":false,"solar_noon":"2026-11-19T11:47:17+00:00","solar_noon_altitude_deg":19.07,"sunrise":"2026-11-19T07:24:58+00:00","sunset":"2026-11-19T16:09:36+00:00"}}],"elevation_m":25,"fetched_at":"2026-11-19T12:20:13.298Z","location":{"admin1":"England","admin1_code":"ENG","admin2":"Greater London","ascii_name":"London","country":"United Kingdom","country_code":"GB","elevation_m":25,"feature":"capital","feature_code":"PPLC","geonameid":2643743,"lat":51.50853,"lon":-0.12574,"name":"London","population":8961989,"query":{"q":"London"},"timezone":"Europe/London"},"next_moon_phases":{"first_quarter":"2026-12-17T01:51:00+00:00","full_moon":"2026-11-24T17:36:00+00:00","last_quarter":"2026-12-01T08:46:00+00:00","new_moon":"2026-12-08T23:58:00+00:00"},"note":"Computed astronomically for the location (times in its local time zone, accurate to about a minute; moon times to a few minutes). Phase: 0 new, 0.25 first quarter, 0.5 full, 0.75 last quarter."}}],"seoDescription":"Get Calendar Sun \u0026 Moon data via REST or MCP powered by Apish. Pay per call, no subscription. Structured JSON output with one OpenAny API key.","updatedAt":"2026-12-03T02:45:12.088Z","usageInstructionsHtml":""}}