GETMoon Phase & Times
https://api-astronomy.dataandapis.com/v1/moon
Parâmetros de consulta
| Parâmetro | Exemplo | |
|---|---|---|
| date | 2026-09-05 | Opcional |
| lat | 51.5 | Obrigatório |
| lon | -0.12 | Obrigatório |
Exemplo de requisição
curl "https://api-astronomy.dataandapis.com/v1/moon?date=2026-09-05&lat=51.5&lon=-0.12" \
-H "X-Api-Key: YOUR_API_KEY"// npm install dataandapis
import { DataAndApis } from "dataandapis";
const client = new DataAndApis(); // reads DATAANDAPIS_API_KEY
const data = await client.astronomy.moonPhaseTimes({
date: "2026-09-05",
lat: 51.5,
lon: -0.12,
});# pip install dataandapis
from dataandapis import DataAndApis
client = DataAndApis() # reads DATAANDAPIS_API_KEY
data = client.astronomy.moon_phase_times(date="2026-09-05", lat=51.5, lon=-0.12){
"ok": true,
"lat": 51.5,
"lon": -0.12,
"date": "2026-09-05",
"phase": {
"value": 0.796,
"name": "Waning Crescent",
"illumination_pct": 35.8,
"next_full_moon": "2026-09-26",
"next_new_moon": "2026-09-11"
},
"times_utc": {
"moonrise": "2026-09-05T22:45:58Z",
"moonset": "2026-09-05T15:54:55Z",
"always_up": false,
"always_down": false
},
"position_now": {
"at": "2026-09-05T12:00:00Z",
"azimuth_deg": 277.41,
"elevation_deg": 30.62,
"distance_km": 364096
}
}



