API Documentation
Access astronomical calculations programmatically via our REST API.
Getting Started
The AR00.space Astronomy API provides free access to astronomical calculations. All endpoints return JSON.
Access the API through Azure API Management using a free API key. The free tier allows 100 requests per day per IP address with a burst limit of 10 requests per minute.
https://api.ar00.space
eac6ba7ba5f24c528d69cee8ccb990f7
Ocp-Apim-Subscription-Key: eac6ba7ba5f24c528d69cee8ccb990f7
Endpoints
Sun
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/solar/sunrise-sunset | Sunrise, sunset, and twilight times |
| GET | /api/solar/position | Solar coordinates (RA, Dec, ecliptic) |
Parameters & Example
sunrise-sunset: year, month, day, lat, lon, elevation
GET /api/solar/sunrise-sunset?year=2026&month=3&day=21&lat=41.9&lon=12.5&elevation=0
Moon
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/lunar/position | Lunar ecliptic position, distance, angular diameter |
| GET | /api/lunar/phase | Phase name, illumination, age, next phases |
| GET | /api/lunar/features | Catalog of 45+ lunar features |
| GET | /api/lunar/features/terminator | Features near the lunar terminator |
Parameters & Example
phase: year, month, day
GET /api/lunar/phase?year=2026&month=3&day=13
Planets
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/planets/position | Single planet position, magnitude, elongation |
| GET | /api/planets/all | All planets at once |
| GET | /api/planets/jovian-moons | Galilean satellite positions (Io, Europa, Ganymede, Callisto) |
| GET | /api/planets/saturn-rings | Saturn ring geometry (tilt, axis, visibility) |
Parameters & Example
position: planet (Mercury|Venus|Mars|Jupiter|Saturn|Uranus|Neptune), year, month, day, hour
GET /api/planets/all?year=2026&month=3&day=13&hour=22
Deep Sky
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/deepsky/messier | All 110 Messier objects |
| GET | /api/deepsky/messier/{number} | Single Messier object |
| GET | /api/deepsky/stars | 50 brightest stars catalog |
| GET | /api/deepsky/doubles | 36+ double star catalog |
| GET | /api/deepsky/constellations | All 88 IAU constellations |
Optics
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/optics/telescope | Full telescope calculation suite |
| GET | /api/optics/extinction | Atmospheric extinction at given altitude |
| GET | /api/optics/bortle | Naked-eye limit from Bortle scale |
Phenomena
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/phenomena/upcoming | All upcoming events for next N months |
| GET | /api/phenomena/meteor-showers | All 16 major meteor showers |
| GET | /api/phenomena/meteor-showers/active | Active showers on a given date |
| GET | /api/phenomena/moon-phase | Detailed lunar phase information |
| GET | /api/phenomena/eclipse/solar | Solar eclipse check for a given month |
| GET | /api/phenomena/eclipse/lunar | Lunar eclipse check for a given month |
Comets
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/comets/position | Compute comet position from orbital elements |
Planner
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/planner/tonight | Full observing session plan |
| GET | /api/planner/visibility | Messier object visibility check |
| GET | /api/planner/rise-transit-set | Rise, transit, set times |
| GET | /api/planner/observing-window | Dark sky window and moon conditions |
Quick Start
cURL
curl -H "Ocp-Apim-Subscription-Key: \
eac6ba7ba5f24c528d69cee8ccb990f7" \
"https://api.ar00.space\
/api/solar/sunrise-sunset\
?year=2026&month=3&day=21\
&lat=41.9&lon=12.5"
JavaScript
const base = 'https://api.ar00.space';
const key = 'eac6ba7ba5f2...';
const res = await fetch(
`${base}/api/lunar/phase` +
`?year=2026&month=3&day=13`,
{ headers: {
'Ocp-Apim-Subscription-Key': key
}});
const phase = await res.json();
console.log(phase.phaseName);
Python
import requests
BASE = 'https://api.ar00.space'
KEY = 'eac6ba7ba5f2...'
r = requests.get(
f'{BASE}/api/planets/all',
params={'year': 2026, 'month': 3,
'day': 13, 'hour': 22},
headers={
'Ocp-Apim-Subscription-Key': KEY
})
planets = r.json()
C# / .NET
var client = new HttpClient();
client.DefaultRequestHeaders.Add(
"Ocp-Apim-Subscription-Key",
"eac6ba7ba5f2...");
var json = await client
.GetStringAsync(
"https://api.ar00.space"
+ "/api/deepsky/messier/42");
Azure APIM
The API is served through Azure API Management providing:
- 100 calls/day per IP — free tier
- 10 calls/min — burst limit
- Header
X-RateLimit-Remainingshows calls left - HTTP 429 when limit exceeded
Pass the API key via the Ocp-Apim-Subscription-Key header with every request.
Notes
- All times are in Universal Time (UT)
- Coordinates use decimal degrees
- Positive longitude = East
- Positive latitude = North
- Dates use Gregorian calendar
- All endpoints return JSON
- Errors return
{ "error": "..." }