{"uid":"cap_c94qxiB075CbQmWTL76Vm","slug":"x402-deployer-x402-deployer-workers-dev-e26715d0","name":"Astro Times - Sunrise/Sunset & Astronomical Events Calculator","description":"Sunrise sunset times. Computes sunrise, sunset, solar noon, day length (seconds), and civil / nautical / astronomical twilight begin & end for any latitude/longitude on any date. Also covers golden hour, dawn / dusk, and full astronomy-times. UTC ISO8601 strings. Wraps sunrise-sunset.org's public API — no auth, commercial-OK.","url":"https://x402-deployer.x402-deployer.workers.dev/astro-times","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":{"required":["latitude","longitude"],"properties":{"date":{"type":"string","description":"Date in YYYY-MM-DD. Defaults to today (UTC) if omitted."},"latitude":{"type":"number","description":"Decimal degrees, range [-90, 90]. Positive north."},"longitude":{"type":"number","description":"Decimal degrees, range [-180, 180]. Positive east."}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"date":{"type":"string"},"times":{"type":"object","properties":{"sunset":{"type":"string"},"sunrise":{"type":"string"},"solar_noon":{"type":"string"},"civil_twilight_end":{"type":"string"},"day_length_seconds":{"type":"integer"},"civil_twilight_begin":{"type":"string"},"nautical_twilight_end":{"type":"string"},"nautical_twilight_begin":{"type":"string"},"astronomical_twilight_end":{"type":"string"},"astronomical_twilight_begin":{"type":"string"}}},"source":{"type":"string"},"location":{"type":"object","properties":{"lat":{"type":"number"},"lon":{"type":"number"}}}}}}}}},"responseSchema":null,"example":{"request":{"input":{"body":{"date":"2025-01-15","latitude":51.5074,"longitude":-0.1278},"type":"http","method":"POST","bodyType":"json"}},"response":{"date":"2025-01-15","times":{"sunset":"2025-01-15T16:23:01+00:00","sunrise":"2025-01-15T07:56:59+00:00","solar_noon":"2025-01-15T12:10:00+00:00","civil_twilight_end":"2025-01-15T16:59:22+00:00","day_length_seconds":30362,"civil_twilight_begin":"2025-01-15T07:20:37+00:00","nautical_twilight_end":"2025-01-15T17:41:12+00:00","nautical_twilight_begin":"2025-01-15T06:38:48+00:00","astronomical_twilight_end":"2025-01-15T18:21:09+00:00","astronomical_twilight_begin":"2025-01-15T05:58:50+00:00"},"source":"https://api.sunrise-sunset.org/json","location":{"lat":51.5074,"lon":-0.1278}}},"exampleRequest":{"date":"2025-01-15","latitude":51.5074,"longitude":-0.1278},"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","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_hdqEO7kwNRfnOaqYLi-Hv","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes sunrise, sunset, solar noon, day length, twilight times (civil/nautical/astronomical), golden hour, dawn, and dusk for any latitude/longitude on any date, returning UTC ISO8601 strings.","exampleAgentPrompt":"What time does sunrise, sunset, solar noon, and golden hour happen at latitude 40.7128, longitude -74.0060 on July 4, 2025? Also include civil and astronomical twilight times.","exampleUseCases":null,"resultDescription":"A JSON object with UTC ISO8601 timestamps for: sunrise, sunset, solar noon, day length in seconds, civil twilight begin and end, nautical twilight begin and end, astronomical twilight begin and end, golden hour start and end, dawn, and dusk — all computed for the requested latitude/longitude and date.","failureModes":["Invalid or out-of-range latitude/longitude returns an error","Malformed or missing date parameter causes a bad request response","Upstream sunrise-sunset.org API unavailable causes a timeout or 502 error","Date far outside supported range may return null or error values","Network issues with the Cloudflare Worker may cause intermittent failures"],"whenToPreferThis":"Use this endpoint when you need precise solar event times (sunrise, sunset, twilight phases, golden hour) for any global location and date. Prefer this over a weather API that only gives sunrise/sunset, because this provides the full astronomy suite including all six twilight boundary times and day length. No authentication is required and commercial use is permitted.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:48:34.246Z","isFirstParty":false}