Dark moonless observing window
astro_dark_windowThe genuinely dark, moonless observing window for a night: astronomical night intersected with the Moon being down, ranked across up to 62 nights with a trend. The right tool for "when should I stargaze / photograph the Milky Way / observe deep-sky objects". Location required. For plain twilight times use astro_sun.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tz | No | IANA timezone like "Europe/Lisbon" to render event times in local time. Optional; a resolved place supplies its own timezone. | |
| lat | No | Latitude in decimal degrees, north positive. Send lat and lon together. | |
| lon | No | Longitude in decimal degrees, east positive (Lisbon is about -9.14). Send lat and lon together. | |
| date | No | Night to start from. ISO 8601 UTC date or datetime, e.g. "2026-08-06" or "2026-08-06T21:00:00Z". Omit for the current moment. Years 1700 to 2200 only; outside that range the API refuses with DATE_OUT_OF_RANGE because the ephemeris is not reliable there. | |
| place | No | Place name instead of lat/lon, as "City" or "City,CC" with an ISO country code, e.g. "Lisbon,PT". Resolved server-side; the response then carries a required GeoNames CC BY 4.0 credit in its attribution field, which must be preserved when shown. | |
| nights | No | How many nights to evaluate and rank. Default 1. | |
| moon_illumination_max | No | Treat the Moon as tolerable below this illuminated fraction (0..1) even when up. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | The best genuinely dark observing windows across a range of nights. | |
| rights | No | Either unrestricted, or attribution_required when third-party place data was used. When attribution_required, the attribution line must be shown. | |
| warnings | No | Machine-readable notices about this answer. Present only when non-empty. Never changes whether the call succeeded. | |
| attribution | No | The credit line to display verbatim when rights is attribution_required. | |
| next_cursor | No | Present only when more rows exist. Send it back with the SAME start/end arguments as the first call to get the next page. | |
| not_computed | No | Data this API deliberately does not serve, and why. Present only when the question touched such a field. An absence named here is information: treat it as "withheld", never as "none exists". |