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.

Base URL
https://api.ar00.space
Free API Key
eac6ba7ba5f24c528d69cee8ccb990f7
Pass via header: Ocp-Apim-Subscription-Key: eac6ba7ba5f24c528d69cee8ccb990f7
100
calls / day / IP
10
calls / min burst
30
endpoints

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\
/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-Remaining shows 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": "..." }