{"uid":"cap_hWaiSoUWflD1Yg_GzRAeW","slug":"x402-deployer-x402-deployer-workers-dev-2995778d","name":"Sunrise Sunset Times API","description":"Sunrise sunset times. Returns sunrise, sunset, solar noon, day length, and civil / nautical / astronomical twilight begin and end for any latitude/longitude on any date. Also covers golden-hour and dawn / dusk. Same backend as astro-times under a more search-friendly slug. UTC ISO8601 strings.","url":"https://x402-deployer.x402-deployer.workers.dev/sunrise-sunset","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 as YYYY-MM-DD. Defaults to today."},"latitude":{"type":"number","description":"Latitude in decimal degrees, -90 to 90."},"longitude":{"type":"number","description":"Longitude in decimal degrees, -180 to 180."}}},"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"}}},"source":{"type":"string"}}}}}}},"responseSchema":null,"example":{"request":{"input":{"body":{"date":"2024-07-14","latitude":48.8566,"longitude":2.3522},"type":"http","method":"POST","bodyType":"json"}},"response":{"date":"2024-07-14","times":{"sunset":"2024-07-14T19:52:09+00:00","sunrise":"2024-07-14T04:00:56+00:00","solar_noon":"2024-07-14T11:56:33+00:00","civil_twilight_end":"2024-07-14T20:30:39+00:00","day_length_seconds":57073,"civil_twilight_begin":"2024-07-14T03:22:26+00:00","nautical_twilight_end":"2024-07-14T21:25:58+00:00","nautical_twilight_begin":"2024-07-14T02:27:07+00:00","astronomical_twilight_end":"2024-07-14T22:49:08+00:00","astronomical_twilight_begin":"2024-07-14T01:03:58+00:00"},"source":"https://api.sunrise-sunset.org/json","location":{"lat":48.8566,"lon":2.3522}}},"exampleRequest":{"date":"2024-07-14","latitude":48.8566,"longitude":2.3522},"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_y3-GT7t9Z-lCYGzM0DD8-","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":"Returns sunrise, sunset, solar noon, day length, golden hour, dawn/dusk, and civil/nautical/astronomical twilight times for any latitude/longitude on any date","exampleAgentPrompt":"What time is sunrise, sunset, and golden hour at latitude 48.8566, longitude 2.3522 (Paris) on July 14th? Also give me civil and nautical twilight times.","exampleUseCases":null,"resultDescription":"Returns UTC ISO8601 strings for sunrise, sunset, solar noon, day length, civil twilight begin/end, nautical twilight begin/end, astronomical twilight begin/end, golden hour, and dawn/dusk for the given coordinates and date.","failureModes":["Invalid or out-of-range latitude/longitude returns an error","Missing required parameters (lat, lng, date) returns a validation error","Dates far in the past or future may return null values for polar regions with no sunrise/sunset","Malformed date format returns a parse error"],"whenToPreferThis":"Use this endpoint when you need precise solar event times (sunrise, sunset, twilight phases, golden hour) for a specific geographic coordinate and date. Prefer over generic weather APIs when you need the full set of twilight categories (civil/nautical/astronomical) or golden hour windows in ISO8601 UTC format.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T18:49:06.126Z","isFirstParty":false}