Developer API · beta

Vedic astrology, as an API

Sidereal charts, the Vimśottarī daśā, plain-language guidance, domain readings, compatibility and muhūrta, computed deterministically and grounded in the classical texts. JSON in, JSON out, one key.

Ephemeris built in. Raw planet positions, cusps, ayanamsa and sunrise from our own NASA JPL DE440 engine, on the same key: no Swiss Ephemeris licence or second ephemeris API needed.

Sandbox keys are free with no time limit and return fixed sample responses. Every account also gets 100 free live credits once (not monthly), valid for 60 days from your first live key and spent before paid credits. When they are used up or expire, live calls return 402 credits_exhausted until you buy a pack; sandbox keys keep working. Free terms

100
free live credits, once (60 days)
Free
sandbox keys, no time limit
120/min
rate limit
2xx only
charged

Ephemeris built in

No second provider for raw positions

The 5 Ephemeris operations — positions, ascendant and house cusps, ayanamsa values, sunrise and sunset, and position series — run on AstroNest's own NASA JPL DE440 engine, on the same key and the same credits as the readings. You do not need a Swiss Ephemeris licence or a separate ephemeris API.

Ephemeris reference
12 bodies
Sun to Pluto, mean and true Rāhu (Ketu = node + 180°)
3 house systems
whole sign, equal, Placidus
4 ayanamsas
Lahiri, Raman, Krishnamurti, Fagan–Bradley, or tropical
1800–2149
UTC coverage, about a millisecond per position

0.1 credit per call: 1 credit per started block of 10 calls (series: 1 per started 100 points). Not covered: asteroids, fixed stars, and dates outside 1800–2149.

Quickstart

Your first call in three steps

  1. Sign in at /developer and create a sandbox key. Sandbox calls are free, with no time limit, and return fixed sample responses.
  2. Call any endpoint. A sandbox key validates your request exactly as live does, then returns a fixed sample response.
  3. When your integration works, create a live key for real readings. Your account gets 100 free live credits once, valid for 60 days from your first live key; after that, buy a credit pack. See the free terms.
curl -X POST https://www.astronest.ai/api/developer/v1/chart \
  -H "Authorization: Bearer astro_sandbox_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"birthData":{"date":"1990-05-12","time":"14:35","timezone":"Asia/Kolkata","latitude":28.6139,"longitude":77.209}}'

Call the API from your server. Keys are secret, and the API sends no CORS headers, so browser calls fail by design.

Keys

Live and sandbox

KeyWhat it returnsCost
astro_sandbox_…Validates your request with the same error codes as live, then returns a fixed sample (the example on each endpoint below), marked sandbox: true and with an X-AstroNest-Sandbox: true header. Your inputs are checked, not used.Free, no time limit
astro_live_…A real computation for the birth data you send.Credits per call

Send the key as Authorization: Bearer <key>. Each key is scoped to the endpoints you choose; all keys on an account share one credit balance. The secret is shown once; if you lose it, rotate the key in the portal.

Credits and pricing

Free to start, pay as you go

Every account gets 100 free live credits once, spent first. They do not renew and are valid for 60 days from your first live key; any left after that expire. Beyond that, buy a pack in the portal. Paid credits are one-time purchases and do not expire. Only successful (2xx) calls are charged; a failed call costs nothing. When credits run out the API answers 402 credits_exhausted.

Free terms

Free to start: sandbox keys, plus 100 free live credits once

Sandbox key — free, no time limit

  • Every endpoint and MCP tool answers with a fixed sample response; your input is validated exactly as live, never used.
  • Never charged and never expires. Limits: 120 requests a minute, 2 at a time.
  • It does not compute real readings: for that you need a live key.

100 free live credits — once, valid 60 days

  • Granted once per account, for live keys. A live key needs the beta terms accepted and a verified email.
  • Valid for 60 days from when you create your first live key; any left after that expire. They do not renew.
  • Spent before any paid credits, on successful calls only (a chart costs 1, a domain reading 5).

When the free credits are used up or expire

  • After 100 credits or 60 days, whichever comes first, live calls return 402 credits_exhausted. Nothing is charged automatically: sandbox keys keep working, and your keys and settings stay.

What to do next

  • Buy a credit pack in the portal: Starter $49 for 1,000 credits, Builder $199 for 5,000, Growth $499 for 15,000. One-time purchases, no subscription; paid credits never expire.
  • High volume or a platform? Talk to us about Platform (custom pricing).

starter

$49

1,000 credits · 4.9¢ each

builder

$199

5,000 credits · 4.0¢ each

growth

$499

15,000 credits · 3.3¢ each

Platform

Custom pricing

Volume pricing · Higher concurrency · Dedicated support · Commercial SLA

Talk to us →

For astrology platforms, practitioner networks, matchmaking services and high-volume applications. Volume pricing · Higher concurrency · Dedicated support · Commercial SLA · Custom integration · Consolidated billing. Talk to us.

Ephemeris calls are fractional. Positions, angles, ayanamsa and sunrise cost 0.1 credit each: the call that opens each block of 10 is charged 1 credit and the next nine are free, counted across the four per account. Failed calls do not count. A series costs 1 credit per started 100 points.

Free accounts may run 2 requests at once; buying any pack raises that to 5.

Endpoints

Reference

Base URL https://www.astronest.ai/api/developer. Every endpoint is POST with a JSON body. Full request and response schemas are in the OpenAPI spec; the OpenAPI guide shows how to import it into Postman, generate a client, or connect an AI app over MCP. The MCP server is listed on Smithery and in the official MCP Registry, and every endpoint is ready to send in our public Postman workspace.

EndpointWhat it doesCredits
/v1/chartNatal chart Calculation1
/v1/dashaVimśottarī daśā timeline Calculation1
/v1/guidanceLifestyle guidance for the running daśā periods Interpretation3
/v1/interpretDomain reading Interpretation5
/v1/compatibilityCompatibility of two charts Interpretation12
/v1/muhurtaAuspicious windows (muhūrta) in a date range Interpretation10
/v1/forecastForward-looking reading for a question Narrated8
/v1/timing/resolveDecision timing Narrated7
/v1/ephemeris/positionsPositions at a moment Ephemeris0.1
/v1/ephemeris/anglesAscendant, MC and house cusps Ephemeris0.1
/v1/ephemeris/ayanamsaAyanamsa values Ephemeris0.1
/v1/ephemeris/sunriseSunrise and sunset Ephemeris0.1
/v1/ephemeris/seriesPositions over a range Ephemeris1

Calculation

Deterministic computation. No language model is called.

POST/v1/chart

1 credit

Natal chart.

Sidereal (Lahiri) chart: ascendant, the nine grahas, twelve houses, yogas and the Vimśottarī daśā. A modern Western block is added unless `western` is false. With `location`, also astrocartography lines at that place and the chart's own frame relocated there.

Required: birthData

{
  "birthData": {
    "date": "1990-05-12",
    "time": "14:35",
    "timezone": "Asia/Kolkata",
    "latitude": 28.6139,
    "longitude": 77.209
  }
}

POST/v1/dasha

1 credit

Vimśottarī daśā timeline.

Required: birthData

{
  "birthData": {
    "date": "1990-05-12",
    "time": "14:35",
    "timezone": "Asia/Kolkata",
    "latitude": 28.6139,
    "longitude": 77.209
  }
}

Interpretation

Deterministic readings over the classical corpus. No language model is called.

POST/v1/guidance

3 credits

Lifestyle guidance for the running daśā periods.

Plain-language guidance cards for each running daśā level (mahādaśā, antardaśā, …) at `referenceDate` (default: now).

Required: birthData

{
  "birthData": {
    "date": "1990-05-12",
    "time": "14:35",
    "timezone": "Asia/Kolkata",
    "latitude": 28.6139,
    "longitude": 77.209
  }
}

POST/v1/interpret

5 credits

Domain reading.

Deterministic reading of one life domain: verdict, supporting and cautionary factors, timing windows, method agreement and the weighed corpus position. No language model is called.

Required: birthData, domain

{
  "birthData": {
    "date": "1990-05-12",
    "time": "14:35",
    "timezone": "Asia/Kolkata",
    "latitude": 28.6139,
    "longitude": 77.209
  },
  "domain": "career"
}

POST/v1/compatibility

12 credits

Compatibility of two charts.

Computes both charts and reads them together. Each partner object is a BirthData object plus optional `name` and `gender`.

Required: a, b

{
  "a": {
    "date": "1990-05-12",
    "time": "14:35",
    "timezone": "Asia/Kolkata",
    "latitude": 28.6139,
    "longitude": 77.209,
    "name": "A"
  },
  "b": {
    "date": "1991-11-03",
    "time": "06:10",
    "timezone": "Asia/Kolkata",
    "latitude": 19.076,
    "longitude": 72.8777,
    "name": "B"
  }
}

POST/v1/muhurta

10 credits

Auspicious windows (muhūrta) in a date range.

Scans each day in the range and ranks windows for the subject. The pañcāṅga is computed for `eventPlace`, never defaulted to the birthplace.

Required: subject, eventPlace, rangeStart, rangeEnd

{
  "subject": {
    "date": "1990-05-12",
    "time": "14:35",
    "timezone": "Asia/Kolkata",
    "latitude": 28.6139,
    "longitude": 77.209
  },
  "eventPlace": {
    "latitude": 19.076,
    "longitude": 72.8777,
    "timezone": "Asia/Kolkata",
    "label": "Mumbai"
  },
  "freeText": "signing a lease",
  "rangeStart": "2026-11-01",
  "rangeEnd": "2026-11-15"
}

Narrated

Readings voiced by a language model, grounded in the deterministic verdict. Slower (tens of seconds).

POST/v1/forecast

8 credits

Forward-looking reading for a question.

The interpret verdict for `domain`, voiced as a narrative answer to `question` by a language model grounded in the classical statements for the domain. Expect tens of seconds; set a client timeout of at least 90 s.

Required: birthData, domain, question

{
  "birthData": {
    "date": "1990-05-12",
    "time": "14:35",
    "timezone": "Asia/Kolkata",
    "latitude": 28.6139,
    "longitude": 77.209
  },
  "domain": "career",
  "question": "How will the next year unfold for my work?"
}

POST/v1/timing/resolve

7 credits

Decision timing.

Like forecast, for a decision question, optionally anchored to `targetDate` or `dateRange`. Expect tens of seconds.

Required: birthData, domain, question

{
  "birthData": {
    "date": "1990-05-12",
    "time": "14:35",
    "timezone": "Asia/Kolkata",
    "latitude": 28.6139,
    "longitude": 77.209
  },
  "domain": "career",
  "question": "Should I accept the offer?",
  "targetDate": "2026-11-15"
}

Ephemeris

Raw astronomical positions from AstroNest’s own JPL DE440 engine: no Swiss Ephemeris licence or other astrology API needed. Deterministic, about a millisecond per position, no language model. One key scope (`ephemeris`) covers all five operations.

POST/v1/ephemeris/positions

0.1 credit

Positions at a moment.

Sun, Moon, planets and lunar nodes at one moment: longitude, latitude, distance, speed and retrograde flag, with sign, and nakṣatra and pada when sidereal. `equatorial: true` adds apparent right ascension and declination.

Required: datetime

{
  "datetime": "2026-10-06T06:00:00Z",
  "bodies": [
    "Sun",
    "Moon",
    "Mars",
    "Jupiter",
    "Saturn",
    "TrueNode"
  ],
  "zodiac": "sidereal",
  "ayanamsa": "lahiri"
}

POST/v1/ephemeris/angles

0.1 credit

Ascendant, MC and house cusps.

Ascendant, midheaven and twelve cusps for a moment and place. Placidus is undefined beyond the polar circles at some moments; the call then returns 422 houses_undefined_at_latitude.

Required: datetime, latitude, longitude

{
  "datetime": "1990-05-12T14:35:00+05:30",
  "latitude": 28.6139,
  "longitude": 77.209,
  "houseSystem": "placidus"
}

POST/v1/ephemeris/ayanamsa

0.1 credit

Ayanamsa values.

Lahiri, Raman, Krishnamurti and Fagan–Bradley (mean, without nutation) at a moment.

Required: datetime

{
  "datetime": "2026-10-06T00:00:00Z"
}

POST/v1/ephemeris/sunrise

0.1 credit

Sunrise and sunset.

Sunrise, sunset and the next sunrise for a local date and place: upper limb at the sea-level horizon with 36.6′ refraction. The Vedic day runs from sunrise to the next sunrise.

Required: date, timezone, latitude, longitude

{
  "date": "2026-10-06",
  "timezone": "Asia/Kolkata",
  "latitude": 28.6139,
  "longitude": 77.209
}

POST/v1/ephemeris/series

1 credit

Positions over a range.

Positions from start to end (inclusive) every stepMinutes, for transit tables and station finding. At most 1,000 points (too_many_points beyond). **Price: 1 credit per started 100 points** (a 365-point daily table costs 4).

Required: start, end, stepMinutes

{
  "start": "2026-10-01T00:00:00Z",
  "end": "2026-10-10T00:00:00Z",
  "stepMinutes": 1440,
  "bodies": [
    "Mercury",
    "Venus"
  ]
}

Birth data

One object, validated before anything runs

Every reading takes a birthData object: date (YYYY-MM-DD), time (HH:MM or HH:MM:SS, local; omit if unknown), timezone (IANA, e.g. Asia/Kolkata), latitude and longitude. It is validated before anything is computed, so a malformed request is never charged. The API is stateless: birth data is used for the call and not stored.

Ephemeris inputs

A moment, not birth data

The Ephemeris operations take a moment instead of birth data: ISO 8601 with Z or an explicit offset (2026-10-06T06:00:00Z, 1990-05-12T14:35:00+05:30). A time without a zone is refused rather than guessed. Coverage is 1800-01-02 to 2149-12-31 UTC, from NASA JPL DE440. The zodiac defaults to sidereal with the Lahiri ayanamsa; pass zodiac: "tropical" or another ayanamsa to change it. One key scope, ephemeris, covers all five operations; keys created before it existed gain it by editing the key's scopes in the portal.

Domains

What a reading can be about

For interpret, forecast and timing/resolve:

careerbusinessfinancechildrenpropertyeducationtravelspiritualitylineagereputationpartnershipslegalfamilymarriagehealth

Errors

Every failure is named, and none is charged

Errors return { "error": "<code>", "message": "…", "requestId": "…", "statusCode": n }. Quote the requestId in any support request. No error is charged.

StatusMeaning
400Invalid request. Codes: invalid_json, missing_birthdata, invalid_birthdata, invalid_timezone, invalid_coordinates, missing_required_field, invalid_domain, invalid_reference_date, invalid_range, no_days_evaluable. Not charged.
401missing_api_key, invalid_api_key, revoked_key or expired_key. Not charged.
402credits_exhausted: the one-time free credits are used or have expired (60 days from the first live key) and the paid balance is too low for this call; buy a credit pack in the developer portal. key_credit_limit_reached: this key has reached the monthly credit limit set on it in the portal (resets on the 1st, UTC). Never charged.
403insufficient_scope: the key is not scoped for this endpoint. Not charged.
422chart_integrity_failed, dasha_failed or guidance_failed: the birth data could not produce a valid result. Not charged.
429rate_limited (over 120 requests a minute for this account) or concurrency_limit (too many requests at once). Retry-After says when to retry. Not charged.
500Our error. Not charged.
502narration_failed: the language model did not return a reading. Not charged.

Readings carry qualitative confidence and plain-language reasons. They never include internal scores, rule identifiers or verbatim passages from the source texts. Where an endpoint cites its classical grounding, it names book titles only.

Rate limits

120 requests a minute per account

Each account may make up to 120 requests a minute (sandbox included) and run 2 at once (5 after any purchase). Over the limit, the API answers 429 rate_limited or 429 concurrency_limit with a Retry-After header; neither is charged. Responses carry X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset when limited.

Beta terms

What you agree to

Version beta-1-2026-10-07. You accept these in the portal before creating a live key or buying credits.

  1. The API is in beta. It is provided as is, without an SLA, and may change; we will try to give notice of breaking changes.
  2. Readings are symbolic interpretation only — not medical, legal, financial or psychological advice. You show the response's disclaimer to your users and do not present a reading as a diagnosis or a guarantee.
  3. You do not use readings to make decisions about people in employment, credit, insurance, housing or matchmaking on the basis of caste or religion, or any decision with legal effect based solely on a reading.
  4. You keep your keys secret and call the API from your server. You are responsible for calls made with your keys.
  5. You may display responses inside your own product. You do not resell raw API access, scrape the API to build a competing dataset or model, or try to reverse-engineer the rules behind the readings.
  6. You are responsible for your end users' personal data and for having a lawful basis to send it. We process birth data only to answer each call and do not store request bodies or responses.
  7. Credits are prepaid and non-refundable except where the law requires; failed calls are never charged. We may suspend keys used in breach of these terms.
  8. Full terms of service and a data processing addendum are being finalised. When they are published you will be asked to accept them before your next live key or purchase.

Use responsibly

Symbolic interpretation only — not medical, legal, financial or psychological advice. Show the disclaimer field to your users. The API is in beta: there is no SLA yet, and the terms of service are being finalised.