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 is provided exclusively through Azure API Management using a free API key — direct calls to the web app are not permitted. The free tier allows 100 requests per day per IP address with a burst limit of 10 requests per minute.
https://api.ar00.space/ar00
https://api.ar00.space/ar00-mcp
eac6ba7ba5f24c528d69cee8ccb990f7
Ocp-Apim-Subscription-Key: eac6ba7ba5f24c528d69cee8ccb990f7
MCP Server for AI agents
Beyond the REST API, AR00.space exposes a Model Context Protocol (MCP) server over Streamable HTTP. AI assistants — Claude, GitHub Copilot, VS Code, and any MCP-compatible client — can call astronomical calculations directly as tools, secured by the same free API key through Azure API Management.
https://api.ar00.space/ar00-mcp
Ocp-Apim-Subscription-Key header
13 Tools available
get_sunrise_sunset — sunrise, sunset & twilightget_solar_position — solar coordinatesget_lunar_position — lunar position & distanceget_moon_phase — phase, illumination, next phasesget_planet_position — single planet ephemerisget_all_planets — all planets at oncecheck_solar_eclipse — solar eclipse lookupcheck_lunar_eclipse — lunar eclipse lookupget_active_meteor_showers — showers on a dateplan_tonight — full observing session plancheck_messier_visibility — Messier visibilityget_messier_object — Messier object detailsget_rise_transit_set — rise, transit & set timesClient configuration
{
"mcpServers": {
"astrocalc": {
"type": "http",
"url": "https://api.ar00.space/ar00-mcp",
"headers": {
"Ocp-Apim-Subscription-Key": "eac6ba7ba5f24c528d69cee8ccb990f7"
}
}
}
}
REST 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/ar00\
/api/solar/sunrise-sunset\
?year=2026&month=3&day=21\
&lat=41.9&lon=12.5"
JavaScript
const base = 'https://api.ar00.space/ar00';
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/ar00'
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/ar00"
+ "/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.
MCP Server
AI agents (Claude, GitHub Copilot, VS Code…) can call AstroCalc directly through the Model Context Protocol endpoint, secured by the same free API key.
{
"mcpServers": {
"astrocalc": {
"type": "http",
"url": "https://api.ar00.space/ar00-mcp",
"headers": {
"Ocp-Apim-Subscription-Key":
"eac6ba7ba5f2..."
}
}
}
}
Exposes 13 tools: sunrise/sunset, solar & lunar position, moon phase, planet positions, eclipses, meteor showers, tonight’s plan, Messier visibility and more.
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": "..." }