Sun & Moon times
Explore the sky, one request at a time.
API reference
/timesQuery parameters
Response guide
Errors, timezones & compatibility
Existing fields and nesting are preserved. Blank optional fields use the documented defaults. Invalid values return an error; missing astronomical events return nulls or empty arrays. Location-based dates use the detected timezone. New range ends are exclusive. Skyfield calculations support 1900–2052; the entire search window must fit.
New endpoints return HTTP 400 with error and code fields for invalid parameters. Existing endpoints retain their 400/422 validation behavior. Longitude aliases lon and long are accepted, with lng taking precedence.
/JSONQuery by coordinates
Use the root endpoint for a specific date in Tokyo.
GET /?lat=35.6762&lng=139.6503&date=2025-01-15&timeformat=12
/astronomyJSONSidereal positions
Lahiri zodiac positions, nakshatras and mean lunar nodes at a fixed UTC instant.
GET /astronomy?datetime=2000-01-01T12:00:00Z&zodiac=sidereal
Example response excerpt (Sun, Mercury and Rahu)
Values rounded to six decimal places. Moon, Venus, Mars, Jupiter, Saturn, Uranus, Neptune, Pluto and Ketu are omitted from this excerpt, along with engine metadata other than name, version and ephemeris. The full response includes all 12 bodies. This request has no location/timezone metadata.
{
"datetime": "2000-01-01T12:00:00Z",
"zodiac": "sidereal",
"ayanamsa": {
"name": "Lahiri",
"model": "J2000 anchor + IAU 2006 precession (approximation)",
"degrees": 23.853222
},
"node_convention": "mean",
"reference_frame": "geocentric apparent ecliptic and true equinox of date",
"units": {
"longitude": "degrees",
"latitude": "degrees",
"degrees_in_sign": "degrees",
"longitude_speed": "degrees/day"
},
"engine": {
"name": "Skyfield",
"version": "1.55",
"ephemeris": "JPL DE421"
},
"bodies": {
"sun": {
"type": "luminary",
"longitude": 256.515700,
"latitude": 0.000227,
"longitude_speed": 1.019394,
"retrograde": false,
"sign": "Sagittarius",
"degrees_in_sign": 16.515700,
"nakshatra": "Purva Ashadha",
"pada": 1
},
"mercury": {
"type": "planet",
"longitude": 248.036061,
"latitude": -0.994830,
"longitude_speed": 1.556215,
"retrograde": false,
"sign": "Sagittarius",
"degrees_in_sign": 8.036061,
"nakshatra": "Mula",
"pada": 3
},
"rahu": {
"type": "lunar_node",
"longitude": 101.187416,
"latitude": 0.000000,
"longitude_speed": -0.052992,
"retrograde": true,
"sign": "Cancer",
"degrees_in_sign": 11.187416,
"nakshatra": "Pushya",
"pada": 3
}
}
}
/astronomyJSONTropical positions
Tropical zodiac positions for all 12 bodies, including Uranus, Neptune and Pluto.
GET /astronomy?datetime=2000-01-01T12:00:00Z&zodiac=tropical
Response · Ready
Your next discovery starts here.
Choose an endpoint, adjust the parameters, and send a request. The actual API response will appear here.
Send a request to inspect response headers.
Send a request to see a readable summary.