/astronomy namespace · APlicious

Astronomy API — planet positions, eclipses, rise/set times, and sky events

Build planetarium widgets, stargazing apps, and sky-event trackers with Swiss Ephemeris precision — no local ephemeris files, no library to install. One APlicious key covers planet positions, eclipses, rise/set times, and seasonal events.

14+astronomy endpoints
Get free API key View docs
GET /api/v1/astronomy/planet-positions
const res = await fetch(
  'https://aplicious.com/api/v1/astronomy/planet-positions' +
  '?datetime=2026-09-08T12:00:00Z&lat=28.6139&lon=77.2090',
  { headers: { 'X-API-Key': 'lapi_live_••••' } }
);
const { data } = await res.json();
// { planets: [
//   { name: "Mars", longitude: 127.4, latitude: 1.2,
//     distance_au: 1.58, is_retrograde: false,
//     rise: "05:12", set: "18:44" }, ... ] }

No credit card · Free to start · X-API-Key header auth

What's included in /astronomy

Planet positions

Ecliptic longitude, latitude, distance (AU), and right ascension/declination for all 8 planets + Moon and Sun for any datetime.

Rise & set times

Sunrise, sunset, moonrise, moonset — and rise/set for Mercury through Neptune — for any lat/lon and date.

Eclipses

GET /astronomy/eclipses?type=solar or lunar for upcoming eclipse events with dates, type (total/partial/annular), and visibility regions.

Moon phase & distance

Lunar phase (new/crescent/quarter/gibbous/full), illumination percentage, and Earth–Moon distance in km for any date.

Equinoxes & solstices

GET /astronomy/equinox-solstice?year=2026 for exact UTC timestamps of all four seasonal events.

Start using the astronomy API today

Free tier — 250 calls/month, no credit card. Upgrade when you need more.

Get free API keyExplore /astronomy docs

Frequently asked questions

Is this for Western astronomy or Vedic astrology?

This is the astronomy namespace — tropical (heliocentric/geocentric) coordinates suitable for scientific and stargazing apps. For Vedic (sidereal) positions, use /astrology or /vedic.

What coordinate system is returned?

Ecliptic longitude/latitude and equatorial RA/Dec are both returned. Distance is in AU for planets and km for the Moon.

Can I get visibility windows for all planets?

Yes — GET /astronomy/planetary-visibility?datetime=...&lat=...&lon=... returns rise/set and whether each planet is visible tonight from your location.

Related API guides

Astrology API for Developers — Birth Charts, Transits, Synastry

REST API for Western astrology: natal charts, planet positions, aspects, house s

Read guide

Vedic Astrology API — Kundli, Dasha, Nakshatra, Yoga, Free Tier

REST API for Vedic astrology: kundli (birth chart), Vimshottari dasha, nakshatra

Read guide

Panchang API — Daily Hindu Calendar, Tithi, Nakshatra, Muhurta

REST API for Hindu Panchang: daily tithi, nakshatra, yoga, karana, sunrise/sunse

Read guide

One key unlocks all 22 namespaces — finance, legal, property, jobs, wellness, and more.

View all plans and pricing →