Astrology API for Western & Sidereal Apps

Build Western, sidereal, and Vedic-oriented astrology applications with deterministic JPL DE421 calculations. Get tropical and sidereal birth charts, transits, synastry, houses, and nakshatra data as structured JSON from your backend.

  • Tropical zodiac plus Lahiri, Raman, and Krishnamurti sidereal modes
  • JPL DE421 planetary positions with documented methods and limits
  • 100 free requests per month; paid plans from $9.99/month
LIVE Sample API Request
// Run on your server; store the key in ASTROAPI_KEY
const response = await fetch("https://api.astroapi.io/api/astro/birth-chart", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": `Bearer ${process.env.ASTROAPI_KEY}`
  },
  signal: AbortSignal.timeout(20000),
  body: JSON.stringify({
    date: "2000-01-01",
    time: "12:00",
    lat: 0.0,
    lon: 0.0,
    timezone: "UTC"
  })
});
if (!response.ok) throw new Error(`AstroAPI HTTP ${response.status}`);
const data = await response.json();
console.log(data.chart);
# Run on your server; store the key in ASTROAPI_KEY
import os
import requests

url = "https://api.astroapi.io/api/astro/birth-chart"

payload = {
  "date": "2000-01-01",
  "time": "12:00",
  "lat": 0.0,
  "lon": 0.0,
  "timezone": "UTC"
}

headers = {
  "Content-Type": "application/json",
  "Authorization": f"Bearer {os.environ['ASTROAPI_KEY']}"
}

response = requests.post(url, json=payload, headers=headers, timeout=20)
response.raise_for_status()
print(response.json()["chart"])

Developer APIs for birth charts, transits, and astrology calculations

Use one calculation API for your charting website, consultation software, educational tools, or app backend. Choose the settings your practice uses.

Targeted Astrology Endpoints

Birth charts, equal and whole-sign houses, aspects, synastry, transits, and explicit sidereal calculations.

Simple, Honest Pricing

Free tier to get started. Predictable monthly subscriptions with included request quotas and no automatic overages.

Modern Developer Experience

RESTful JSON APIs with copy-paste examples for JavaScript, Python, mobile backends, and web services.

Explore the calculation tools for your tradition

Start with the zodiac and house system you need, then review the supported features.

Vedic / Jyotish building blocks

Build from sidereal charts and nakshatra/pada geometry, with Pro transition timelines for nine bodies. Explore beta D1/D3/D4/D7/D9/D10/D12/D16/D20/D24/D27/D30/D60, three-level Vimshottari including Pratyantardasha, Indian chart SVGs and instant Panchang with explicit conventions. Regional calendars, festivals and complete Jyotish analysis remain outside the current scope.

Chart graphics, Western and Vedic beta APIs

Pratyantardasha inputs and period conventions

Davison relationship chart conventions

Moon phases and iCalendar exports

Planetary ingresses, stations, and exact aspects

Planetary aspect orb windows and calendar export

Explore the nakshatra timeline API

Frequently Asked Questions

Clear answers to the questions developers actually ask.

Can I start for free?

Yes. The free plan includes 100 standard API requests per UTC calendar month, with no credit card required. Tropical and sidereal chart calculations are included.

What features are available?

Birth charts, natal-to-transit aspects, natal aspects, synastry, equal and whole-sign houses, sidereal mode, and Pro nakshatra timelines. Beta additions include Placidus, Western and Indian chart SVGs, D1/D3/D4/D7/D9/D10/D12/D16/D20/D24/D27/D30/D60, three-level Vimshottari, instant Panchang, midpoint composites, secondary-progressed planets, solar-arc directions, lunar nodes, solar/lunar returns, uncorrected Davison charts and Moon phases/calendars with optional iCalendar export.

Does AstroAPI support Western and Vedic astrology?

AstroAPI supports tropical calculations for Western astrology and sidereal charts with Lahiri, Raman, or Krishnamurti ayanamsa. Moon nakshatra/pada data and beta D1/D3/D4/D7/D9/D10/D12/D16/D20/D24/D27/D30/D60, Vimshottari, Indian SVG and instant Panchang calculations support Vedic-oriented applications. Panchang uses an explicit USNO solar-event model and latitude limits; regional calendars, festivals and a complete Jyotish system are not provided.

Which house systems and dates are supported?

Equal and whole-sign houses are supported, with opt-in beta Placidus that rejects undefined polar geometry without a fallback. Public calculation dates run from January 1, 1900 through December 31, 2050. Supply an IANA timezone for local birth times; omitted timezones default to UTC.

Does AstroAPI calculate solar-arc directions?

Yes. The beta solar-arc endpoint rotates natal planets and Ascendant/MC by the true tropical solar arc, with tropical or sidereal output and synthetic equal or whole-sign houses. It does not calculate physical event charts, converse directions or predictions. Each admitted calculation uses one standard request.

Does AstroAPI support Pratyantardasha?

Yes. The beta Vimshottari endpoint returns major periods and Antardasha by default. Set depth to 3 to include Pratyantardasha: 729 third-level periods across one theoretical 120-year cycle. It uses a fixed 365.25-day year, supports Lahiri, Raman and Krishnamurti ayanamsas, and costs one standard request per admitted calculation. Other dasha systems and deeper levels are not supported.

Are more sidereal systems, Moon phases, asteroids and fixed stars included?

AstroAPI currently supports Lahiri, Raman and Krishnamurti ayanamsas, not every sidereal system offered by other products. The six-star-only beta is available; asteroid and minor-body endpoints remain unavailable. Separate betas provide Moon-phase calendars, bounded global eclipse geometry and hourly electional filtering. They do not provide hosted feeds, notifications, local eclipse visibility or paths, crescent visibility, continuous electional guarantees, rankings or advice. Solar/lunar returns find natal-longitude returns, not new or full moons.

Can I use AstroAPI in my application?

You may integrate documented results into your application subject to the Terms; reselling raw API access is not permitted.

How do I authenticate?

Authorization: Bearer <YOUR_API_KEY>

What languages are supported?

Any language capable of sending HTTPS requests.

How accurate is the data?

Planetary positions use the bundled JPL DE421 ephemeris. House angles and lunar-node fields use documented engine approximations; see the calculation methodology for scope.

Can I change plans later?

Yes. Use Stripe's hosted billing portal to change plans or cancel. Plan changes are prorated, and cancellation takes effect at the end of the current billing period.

Is my API key secure?

API keys are returned once, stored only as one-way SHA-256 hashes, and transmitted over HTTPS. Keep them on your server.

Partnered with TimeMatrix

Explore price, time, and planetary cycles.

TimeMatrix brings advanced market charting, Gann tools, and financial-astrology research into one browser-based workspace.

Related products. Separate accounts, subscriptions, and policies.

Explore TimeMatrix