{"uid":"cap_pPR2WQ9Jm7tSALV81S0-f","slug":"saylor-innovations-sun-times-api-dcf1ff29","name":"Saylor Innovations Sun Times API","description":"Sunrise, sunset, solar noon, day length and civil, nautical and astronomical twilight times in UTC for any lat/lon and date, golden hour planning","url":"https://saylorinnovations.com/api/astronomy/sun?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["lat","lon"],"properties":{"lat":{"type":"string","description":"Latitude in decimal degrees"},"lon":{"type":"string","description":"Longitude in decimal degrees"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"json"},"example":{"type":"object","required":["location","sunrise_utc","sunset_utc"],"properties":{"date":{"type":"string","description":"Date (YYYY-MM-DD)"},"note":{"type":"string","description":"Caveat or context for reading the result"},"source":{"type":"string","description":"Data source the values come from"},"location":{"type":"object","description":"Place the data refers to"},"sunset_utc":{"type":"string","description":"Sunset utc"},"sunrise_utc":{"type":"string","description":"Sunrise utc"},"civil_twilight":{"type":"object","description":"Civil twilight"},"solar_noon_utc":{"type":"string","description":"Solar noon utc"},"nautical_twilight":{"type":"object","description":"Nautical twilight"},"day_length_seconds":{"type":["number","null"],"description":"Day length, in seconds"},"astronomical_twilight":{"type":"object","description":"Astronomical twilight"}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_DtwE6_ZyaeFLRSulPws0Q","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","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 in UTC for any latitude/longitude and date","exampleAgentPrompt":"What time is sunrise, sunset, and solar noon tomorrow at latitude 40.7128, longitude -74.0060, and how long will the day be? Also include civil and nautical twilight times.","exampleUseCases":[{"title":"Golden hour photography planning","prompt":"I'm shooting photos at Yosemite Valley — latitude 37.7456, longitude -119.5936 — this Saturday. When exactly is golden hour, sunrise, and sunset so I can plan my shots?"},{"title":"Astrophotography twilight window","prompt":"I'm doing deep-sky imaging tonight at lat 51.5074, lon -0.1278. When does astronomical twilight end in the evening and begin again in the morning so I know my full dark sky window?"},{"title":"Outdoor event scheduling by daylight","prompt":"We're planning an outdoor event on June 21st at latitude 48.8566, longitude 2.3522. What time does it get light in the morning and when does it fully get dark, including civil twilight?"}],"resultDescription":"A JSON object containing the date, location reference, sunrise and sunset times in UTC, solar noon UTC, day length in seconds, and structured objects for civil twilight, nautical twilight, and astronomical twilight (each with start/end times). Also includes a source field and optional notes or caveats.","failureModes":["Missing lat or lon parameters returns an error","Invalid coordinate values (out of range) may return an error or unexpected results","Polar regions during midnight sun or polar night may return null day_length_seconds or no sunrise/sunset times","No date parameter defaults to current date (behavior may vary)","Network or service downtime returns a non-200 response"],"whenToPreferThis":"Choose this endpoint when you need precise solar event times (sunrise, sunset, solar noon, twilight phases) for any geographic coordinate and date, especially when UTC output is required. It is well-suited for golden hour photography planning, outdoor scheduling, astrophotography dark window calculation, or any application needing machine-readable sun schedule data by lat/lon. Prefer it over weather APIs that only provide approximate local sunrise/sunset without detailed twilight phases.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-30T19:07:21.445Z","isFirstParty":false,"canonicalSlug":"saylor-innovations-sun-times-api-dcf1ff29"}