{"id":"astronomy/visibility","method":"POST","url":"https://astro-agent.dev/v1/astronomy/visibility","price_usd":"0.02","tier":"call","title":"Observation windows for a night","summary":"When each planet and the Moon can be observed from a place during a night: windows above a minimum altitude while the sky is dark, with the best time, altitude, azimuth and magnitude.","description":"For observation planning: over the night that starts on 'date' (local noon to noon), the intervals when each body stands at least min_altitude_deg above the horizon while the Sun is at or below sun_altitude_max_deg (default -6: after civil dusk), each with start, end, duration and the best moment (highest altitude) with its azimuth and visual magnitude; plus the dark interval itself.","input_schema":{"type":"object","required":["date","latitude","longitude"],"properties":{"date":{"type":"string","description":"The evening that starts the observing night, YYYY-MM-DD: the night runs from local noon on that date to local noon the next day."},"latitude":{"type":"number","minimum":-90,"maximum":90,"description":"Decimal degrees, north positive."},"longitude":{"type":"number","minimum":-180,"maximum":180,"description":"Decimal degrees, east positive."},"elevation_m":{"type":"number","minimum":-500,"maximum":9000,"default":0,"description":"Height above the WGS84 ellipsoid, metres (no terrain or horizon dip is modelled)."},"timezone":{"type":"string","description":"IANA zone for local times, e.g. 'Europe/Paris'. Optional: resolved from the coordinates (with its historical DST rules)."},"bodies":{"type":"array","items":{"type":"string","enum":["moon","mercury","venus","mars","jupiter","saturn","uranus","neptune","pluto"]},"description":"Bodies to plan. Default: the Moon and Mercury..Neptune."},"options":{"type":"object","properties":{"min_altitude_deg":{"type":"number","minimum":-5,"maximum":89,"default":10,"description":"Lowest useful altitude of the body above the horizon, degrees."},"sun_altitude_max_deg":{"type":"number","minimum":-18,"maximum":0,"default":-6,"description":"The sky counts as dark when the Sun is at or below this altitude: -6 civil, -12 nautical, -18 astronomical."}},"description":"What counts as observable."}}},"example_request":{"date":"2026-06-21","latitude":48.8566,"longitude":2.3522},"example_response":{"endpoint":"astronomy/visibility","result":{"subject":{"location":{"latitude":48.8566,"longitude":2.3522,"elevation_m":0.0},"timezone":"Europe/Paris","timezone_source":"resolved_from_coordinates","date":"2026-06-21","window_utc":{"start":"2026-06-20T22:00:00Z","end":"2026-06-21T22:00:00Z"},"night_window_utc":{"start":"2026-06-21T10:00:00Z","end":"2026-06-22T10:00:00Z"}},"settings":{"bodies":["moon","mercury","venus"],"min_altitude_deg":10.0,"sun_altitude_max_deg":-6.0,"sampling_minutes":2,"conventions":{"night":"the observing night of 'date': local noon to the next local noon","window":"the body's geometric (airless) altitude >= min_altitude_deg while the Sun's is <= sun_altitude_max_deg (default -6: the end of civil twilight)","edges":"found on a 2-minute grid and interpolated (about a minute)","best":"the sample of highest altitude in the window, with azimuth and magnitude","magnitude":"visual magnitude of the planets (Mallama & Hilton 2018, Skyfield); none for the Sun, Moon, Pluto"}},"dark":[{"start":{"utc":"2026-06-21T20:40:32Z","local":"2026-06-21T22:40:32+02:00","timestamp":1782074432},"end":{"utc":"2026-06-22T03:04:31Z","local":"2026-06-22T05:04:31+02:00","timestamp":1782097471}}],"bodies":[{"body":"moon","visible":true,"windows":[{"start":{"utc":"2026-06-21T20:40:32Z","local":"2026-06-21T22:40:32+02:00","timestamp":1782074432},"end":{"utc":"2026-06-21T22:29:39Z","local":"2026-06-22T00:29:39+02:00","timestamp":1782080979},"duration_minutes":109.1,"best":{"utc":"2026-06-21T20:42:00Z","local":"2026-06-21T22:42:00+02:00","timestamp":1782074520,"altitude":25.58,"azimuth":230.78,"magnitude":null}}],"total_minutes":109.1,"max_altitude":25.58},{"body":"mercury","visible":false,"windows":[],"total_minutes":0,"max_altitude":null},{"body":"venus","visible":true,"windows":[{"start":{"utc":"2026-06-21T20:40:32Z","local":"2026-06-21T22:40:32+02:00","timestamp":1782074432},"end":{"utc":"2026-06-21T21:11:09Z","local":"2026-06-21T23:11:09+02:00","timestamp":1782076269},"duration_minutes":30.6,"best":{"utc":"2026-06-21T20:42:00Z","local":"2026-06-21T22:42:00+02:00","timestamp":1782074520,"altitude":14.61,"azimuth":283.38,"magnitude":-4.01}}],"total_minutes":30.6,"max_altitude":14.61}]},"meta":{"engine":"astro-agents/1.10.0","ephemeris":"NASA/JPL DE440 (1800-01-01..2200-01-01)","astronomy_library":"skyfield/1.55","frame":"geocentric apparent positions, true ecliptic and equinox of date (IAU 2006/2000A)","deterministic":true,"llm_used":false,"input_sha256":"b1de560e2916e311e1761d541518abca2ebfc7cf3b18ea69c45c26f6f53a9f4c","result_sha256":"1798b51878fffe13c0bc76737c61c4c0b80b678f4d22da95e1f54af0c056a0bc","reproducibility":"result_sha256 = SHA-256 of the result serialized as JSON with sorted keys, no whitespace, UTF-8, floats rounded to 6 decimals. Same input + same engine version => same hash."},"example_note":"real output of engine 1.10.0; lists shortened to 3 items"},"payment":"x402 or MPP; 1 free call per client on the $0.01-0.02 routes, this one included. POST without payment to receive the 402 challenge.","catalog":"https://astro-agent.dev/v1/catalog"}