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.

REST Base URL (via APIM)
https://api.ar00.space/ar00
MCP Endpoint (via APIM)
https://api.ar00.space/ar00-mcp
Model Context Protocol server (Streamable HTTP) — 13 astronomy tools for AI agents.
Free API Key
eac6ba7ba5f24c528d69cee8ccb990f7
Pass via header: Ocp-Apim-Subscription-Key: eac6ba7ba5f24c528d69cee8ccb990f7
100
calls / day / IP
10
calls / min burst
30
endpoints

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.

MCP Endpoint
https://api.ar00.space/ar00-mcp
Transport: Streamable HTTP · Auth: Ocp-Apim-Subscription-Key header
13 Tools available
get_sunrise_sunset — sunrise, sunset & twilight
get_solar_position — solar coordinates
get_lunar_position — lunar position & distance
get_moon_phase — phase, illumination, next phases
get_planet_position — single planet ephemeris
get_all_planets — all planets at once
check_solar_eclipse — solar eclipse lookup
check_lunar_eclipse — lunar eclipse lookup
get_active_meteor_showers — showers on a date
plan_tonight — full observing session plan
check_messier_visibility — Messier visibility
get_messier_object — Messier object details
get_rise_transit_set — rise, transit & set times
Client configuration
{
  "mcpServers": {
    "astrocalc": {
      "type": "http",
      "url": "https://api.ar00.space/ar00-mcp",
      "headers": {
        "Ocp-Apim-Subscription-Key": "eac6ba7ba5f24c528d69cee8ccb990f7"
      }
    }
  }
}

REST Endpoints

Sun
MethodEndpointDescription
GET/api/solar/sunrise-sunsetSunrise, sunset, and twilight times
GET/api/solar/positionSolar 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
MethodEndpointDescription
GET/api/lunar/positionLunar ecliptic position, distance, angular diameter
GET/api/lunar/phasePhase name, illumination, age, next phases
GET/api/lunar/featuresCatalog of 45+ lunar features
GET/api/lunar/features/terminatorFeatures near the lunar terminator
Parameters & Example

phase: year, month, day

GET /api/lunar/phase?year=2026&month=3&day=13
Planets
MethodEndpointDescription
GET/api/planets/positionSingle planet position, magnitude, elongation
GET/api/planets/allAll planets at once
GET/api/planets/jovian-moonsGalilean satellite positions (Io, Europa, Ganymede, Callisto)
GET/api/planets/saturn-ringsSaturn 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
MethodEndpointDescription
GET/api/deepsky/messierAll 110 Messier objects
GET/api/deepsky/messier/{number}Single Messier object
GET/api/deepsky/stars50 brightest stars catalog
GET/api/deepsky/doubles36+ double star catalog
GET/api/deepsky/constellationsAll 88 IAU constellations
Optics
MethodEndpointDescription
GET/api/optics/telescopeFull telescope calculation suite
GET/api/optics/extinctionAtmospheric extinction at given altitude
GET/api/optics/bortleNaked-eye limit from Bortle scale
Phenomena
MethodEndpointDescription
GET/api/phenomena/upcomingAll upcoming events for next N months
GET/api/phenomena/meteor-showersAll 16 major meteor showers
GET/api/phenomena/meteor-showers/activeActive showers on a given date
GET/api/phenomena/moon-phaseDetailed lunar phase information
GET/api/phenomena/eclipse/solarSolar eclipse check for a given month
GET/api/phenomena/eclipse/lunarLunar eclipse check for a given month
Comets
MethodEndpointDescription
POST/api/comets/positionCompute comet position from orbital elements
Planner
MethodEndpointDescription
GET/api/planner/tonightFull observing session plan
GET/api/planner/visibilityMessier object visibility check
GET/api/planner/rise-transit-setRise, transit, set times
GET/api/planner/observing-windowDark 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-Remaining shows 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": "..." }