Sun and moon times
get_sun_moon_timesSunrise, sunset, solar noon, civil, nautical and astronomical twilight, golden and blue hour, moonrise, moonset and moon phase for a location, one entry per day. Use it for any question about when the sun or moon rises, sets or gets dark; for the sun's angle at a given moment use get_solar_position, and for tides alongside the sun use get_tide_window. Pass elevation whenever you know it: it shifts sunrise and sunset at altitude. Defaults: from today, 7 days or the plan's limit if lower. Requires an API key on a paid Ephemerides plan.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tz | No | IANA timezone for output timestamps, e.g. Europe/Dublin. Defaults to UTC. | |
| lat | Yes | Latitude in decimal degrees. | |
| lon | Yes | Longitude in decimal degrees. | |
| days | No | Number of days to return. The ceiling is plan-dependent. | |
| elevation | No | Metres above sea level. Supply it when known: at altitude the sun rises measurably earlier than the sea-level answer. Omit only if the elevation is genuinely unknown. | |
| start_date | No | First day as YYYY-MM-DD. Defaults to today. |