New Numerology API

Chart basics

Ayanamsa in Vedic astrology

Ayanamsa is the gap, in degrees, between the Western (tropical) zodiac and the Vedic (sidereal) zodiac. It grows by about 50 arc seconds a year and is a little over 24 degrees today. The API uses the Lahiri ayanamsa by default.

Updated

More terms in Chart basics

© API for Astrology (apiforastrology.com). "Glossary houses chart". All rights reserved. Not to be copied or reused.123456789101112A North Indian chart has 12 houses

Ayanamsa: how the API computes it

Every planet position in the API is sidereal, which means measured against the fixed stars. The API works out the tropical (Western) position first, then subtracts the ayanamsa. By default it uses Lahiri.

India chose this ayanamsa for its national calendar. The API uses it across its whole date range, 1850 to 2149. That is the range of the JPL DE440s ephemeris, a published table of planet positions. It agrees with Swiss Ephemeris within 0.001 arc seconds, checked on 8 dates from 1900 to 2100.

Send "ayanamsa": "kp" for the KP (Krishnamurti) ayanamsa, about 6 arc minutes less. An arc minute is 1/60 of a degree. Send "raman" for B. V. Raman's ayanamsa, about 1 degree 27 arc minutes less. Both are fixed distances from Lahiri, checked against Swiss Ephemeris.

The transits, sade sati (Saturn's seven-and-a-half-year period) and forecasts for that chart use the same ayanamsa. A match or a couple forecast needs the same ayanamsa for both people. Every response has a meta block with the ayanamsa's name and its value at that moment, so you can show or log it.

The API does not return tropical positions. If you compare results with other software, first check that both use the same ayanamsa. A different ayanamsa moves every planet by a few arc minutes to more than a degree.

Near the edge of a sign, that changes the sign.

Ayanamsa in a real API answer

POST /v1/planets200 OK
{
  "meta": {
    "ayanamsa": "lahiri",
    "ayanamsa_value": 23.7260727
  }
}
The ayanamsa used and its value in degrees at the birth moment. Every response carries this in its meta block. Real output for John Doe, born Aug 15, 1990, 10:30 AM, New York.

Get it from the API

Planet positions and the ascendant. Here is the call to API for Astrology (apiforastrology.com) for our sample, John Doe, born Aug 15, 1990, 10:30 AM, New York.

POST /v1/planets

# John Doe, born Aug 15, 1990, 10:30 AM, New York
curl -X POST "https://apiforastrology.com/api/astrology/v1/planets" \
  -H "Authorization: Bearer $ASTROLOGY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"year":1990,"month":8,"day":15,"hour":10,"minute":30,"second":0,"latitude":40.7128,"longitude":-74.006,"timezone":"America/New_York"}'
Answer (long lists shortened)200 OK
{
  "meta": {
    "ayanamsa": "lahiri",
    "ayanamsa_value": 23.7260727,
    "julian_day": 2448119.10483,
    "ephemeris": "JPL DE440s",
    "node": "true",
    "timezone": {
      "source": "zone",
      "offset_hours": -4,
      "zone": "America/New_York",
      "abbreviation": "EDT",
      "dst": true,
      "dst_hours": 1,
      "ambiguous_resolved_by_fold": null,
      "note": "read from the IANA tz database at this instant, so daylight saving and historical offset changes are included"
    }
  },
  "ascendant": {
    "name": "Ascendant",
    "longitude": 169.934155,
    "sign": "Virgo",
    "sign_number": 6,
    "degree_in_sign": 19.934155,
    "degree_dms": "19 : 56 : 03",
    "house": 1,
    "nakshatra": "Hast",
    "nakshatra_lord": "Moon",
    "pada": 3,
    "speed": 0,
    "retrograde": false,
    "combust": false,
    "dignity": "n/a",
    "vargottama": false,
    "pushkara": {
      "navamsa": false,
      "navamsa_number": 6,
      "bhaga": false,
      "bhaga_degree": 9,
      "bhaga_by_element": false,
      "bhaga_degree_by_element": 14,
      "sources_agree": true,
      "orb_degrees": 1
    }
  },
  "positions": [
    {
      "name": "Sun",
      "longitude": 118.7753409,
      "sign": "Cancer",
      "sign_number": 4,
      "degree_in_sign": 28.7753409,
      "degree_dms": "28 : 46 : 31",
      "house": 11,
      "nakshatra": "Ashlesha",
      "nakshatra_lord": "Mercury",
      "pada": 4,
      "speed": 0.9610665,
      "retrograde": false,
      "combust": false,
      "dignity": "friend",
      "vargottama": false,
      "pushkara": {
        "navamsa": false,
        "navamsa_number": 9,
        "bhaga": false,
        "bhaga_degree": 8,
        "bhaga_by_element": false,
        "bhaga_degree_by_element": 7,
        "sources_agree": true,
        "orb_degrees": 1
      }
    },
    {
      "name": "Moon",
      "longitude": 54.5750352,
      "sign": "Taurus",
      "sign_number": 2,
      "degree_in_sign": 24.5750352,
      "degree_dms": "24 : 34 : 30",
      "house": 9,
      "nakshatra": "Mrigashira",
      "nakshatra_lord": "Mars",
      "pada": 1,
      "speed": 14.258194,
      "retrograde": false,
      "combust": false,
      "dignity": "mulatrikona",
      "vargottama": false,
      "pushkara": {
        "navamsa": false,
        "navamsa_number": 8,
        "bhaga": false,
        "bhaga_degree": 14,
        "bhaga_by_element": false,
        "bhaga_degree_by_element": 14,
        "sources_agree": true,
        "orb_degrees": 1
      }
    },
    {
      "name": "Mars",
      "longitude": 27.7149328,
      "sign": "Aries",
      "sign_number": 1,
      "degree_in_sign": 27.7149328,
      "degree_dms": "27 : 42 : 54",
      "house": 8,
      "nakshatra": "Krittika",
      "nakshatra_lord": "Sun",
      "pada": 1,
      "speed": 0.5753266,
      "retrograde": false,
      "combust": false,
      "dignity": "own sign",
      "vargottama": false,
      "pushkara": {
        "navamsa": true,
        "navamsa_number": 9,
        "bhaga": false,
        "bhaga_degree": 21,
        "bhaga_by_element": false,
        "bhaga_degree_by_element": 21,
        "sources_agree": true,
        "orb_degrees": 1
      }
    }
  ],
  "planetary_war": []
}

Where the API returns it

POST/v1/planetsPlanet positions and the ascendant
GET/v1/metaSupported options and limits
POST/v1/kpKrishnamurti Paddhati: cusps, sub lords, significators
POST/v1/prashna/kpKP horary: a question read from a number between 1 and 249
POST/v1/varshaphalThe Tajik annual chart (varshaphal) for one year
POST/v1/varshaphal/dinaTajik daily return (dina pravesh) for a day or a short window
POST/v1/ascendantThe ascendant only

What the API reference says

Each line is quoted from the reference page of the endpoint named above it.

  • POST /v1/kp · Krishnamurti Paddhati: cusps, sub lords, significatorsKP uses its own ayanamsa (the Krishnamurti value, about 6 arcminutes below Lahiri) and Placidus house cusps.
  • POST /v1/prashna/kp · KP horary: a question read from a number between 1 and 249This is Krishnamurti Paddhati (KP): Placidus houses in the KP ayanamsa.
  • meta endpointsService health, and what the API supports: ayanamsas, the house system, divisional charts and the date range.

Feature page: Kundli and birth charts. Who uses it: Astrology apps. The ayanamsa choices compared: Lahiri, KP, Raman and more. The classical rules the API follows are in the rulebook.

How we check the numbers

Every value here starts from planet positions worked out from NASA JPL planet data (DE440). We test them against NASA JPL Horizons, NASA's planet position service. On 25,571 positions from 1850 to 2149, the Sun and planets agree within 0.001 arc seconds. The Moon agrees within 0.011. On 2,000 random birth charts, the rising sign agrees with Swiss Ephemeris within 0.004 arc seconds. An arc second is 1/3,600 of a degree. A practicing astrologer reviews the rules behind these answers. See how we test.

Related terms

Free tools

See it with your own details

Runs on the same API call. Enter your details and see the answer in your browser.

  • Free kundli

    Your Vedic birth chart: the rising sign and all nine planets, with sign, house and nakshatra.

    Make my kundli

From the blog

Astrology API

Get these values from the API

Create a free test key and call any endpoint on this page. Or try a request in the API reference first.

Your first answer

John Doe, New York

POST /v1/planets200 OK
  • RisingVirgoHast
  • SunCancerAshlesha
  • MoonTaurusMrigashira
  • MarsAriesKrittika

Real API output. A free test key gets the same answer.

  1. 01

    Test key: 1,000 test calls a month to build with

  2. 02

    Free plan: 2,000 live calls a month, no card needed

  3. 03

    Open rules: every rule is published, so you can check any answer