{"uid":"cap_djLkTBwxNEQpPMZ2WZjih","slug":"vextorium-sunrise-sunset-api-28d2a452","name":"Vextorium Sunrise-Sunset API","description":"Sunrise, sunset, solar noon, day length and civil, nautical and astronomical twilight for coordinates and a date, in local time (zone detected from coordinates). Local astronomical calculation; handles polar night and midnight sun.","url":"https://api.vextorium.com/v1/sunrise-sunset?utm_source=zero.xyz","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":["lat","lon"],"properties":{"lat":{"type":"number"},"lon":{"type":"number"},"date":{"type":"string"},"zone":{"type":"string"}}},"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","null"],"properties":{"lat":{"type":["number","null"]},"lon":{"type":["number","null"]},"set":{"type":["string","null"]},"date":{"type":["string","null"]},"note":{"type":["string","null"]},"zone":{"type":["string","null"]},"output":{"type":["string","null"]},"day_length":{"type":["string","null"]},"solar_noon":{"type":["string","null"]},"civil_twilight":{"type":["object","null"],"properties":{"sunset":{"type":["string","null"]},"sunrise":{"type":["string","null"]}}},"nautical_twilight":{"type":["object","null"],"properties":{"sunset":{"type":["string","null"]},"sunrise":{"type":["string","null"]}}},"astronomical_twilight":{"type":["object","null"],"properties":{"sunset":{"type":["string","null"]},"sunrise":{"type":["string","null"]}}}}}}}}},"responseSchema":{"type":"json","example":{"lat":40.4168,"lon":-3.7038,"set":"19:56","date":"2026-10-02","note":"Accuracy of ±1-2 minutes (Nautical Almanac algorithm).","zone":"Europe/Madrid","output":"08:11","day_length":"11 h 44 min","solar_noon":"14:03","civil_twilight":{"sunset":"20:23","sunrise":"07:44"},"nautical_twilight":{"sunset":"20:54","sunrise":"07:13"},"astronomical_twilight":{"sunset":"21:26","sunrise":"06:41"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_99qPY13vcs2q7pa97Qnoa","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","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, and civil/nautical/astronomical twilight times for any coordinates and date, with automatic timezone detection.","exampleAgentPrompt":"What time does the sun rise and set in Madrid (40.4168, -3.7038) on October 2, 2026? Also include civil, nautical, and astronomical twilight times.","exampleUseCases":[{"title":"Outdoor event timing at a venue","prompt":"I'm planning an outdoor wedding near Rome (41.9028, 12.4964) on June 15, 2026 — what time does the sun set and when does civil twilight end so I know when to schedule the reception?"},{"title":"Polar night check for Arctic expedition","prompt":"We're heading to Tromsø, Norway (69.6496, 18.9560) on December 21, 2025 — will there be any daylight at all? What are the sunrise and sunset times, and does it experience polar night?"},{"title":"Nautical twilight for offshore sailing","prompt":"I need to plan our night watches for a sail departing from Cape Town (33.9249, 18.4241) on March 10, 2026 — can you tell me when nautical twilight starts in the morning and ends in the evening?"}],"resultDescription":"Returns a JSON object with the location's coordinates, date, detected timezone, sunrise time, sunset time, solar noon, day length (e.g. '11 h 44 min'), plus civil, nautical, and astronomical twilight start and end times — all in local time. Includes an accuracy note (±1-2 minutes) and handles edge cases like polar night and midnight sun.","failureModes":["Missing required lat/lon fields returns a validation error","Invalid latitude or longitude values (out of range) may return an error or unexpected results","If date is omitted, the API may default to the current date or return an error","Extreme polar coordinates on solstice dates may return null times for sunrise/sunset with a polar night or midnight sun note","Malformed date string format may cause a parsing error"],"whenToPreferThis":"Choose this endpoint when you need precise, locally-timed solar event data (sunrise, sunset, twilight phases, solar noon, day length) for any global coordinate pair, especially when you need all twilight types in one call and automatic timezone resolution. Prefer this over generic weather APIs that only return sunrise/sunset without twilight breakdowns, or when handling polar edge cases like midnight sun or polar night.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-11T18:55:27.823Z","isFirstParty":false,"canonicalSlug":"vextorium-sunrise-sunset-api-28d2a452"}