New Numerology API

Timing

Vimshottari, Yogini and Ashtottari Dasha API

The dasha API from API for Astrology (apiforastrology.com) turns a birth date, time and place into a timeline of planetary periods (dashas), with exact start and end dates.

Updated

© API for Astrology (apiforastrology.com). "Dashas explained". All rights reserved. Not to be copied or reused.Mars1989Rahu1996Jupiter2014Saturn2030Mercury2049John Doe's life as planetary periodsBorn 1990TodayRunning now: Jupiter, Dec 20, 2014 to Dec 20, 2030

How the dasha API works

  1. 1Vedic astrology splits a life into periods, each ruled by one planet.
  2. 2The order and length of the periods come from the Moon's place at birth.
  3. 3The API returns every period with its dates, and which one is running now.
POST /v1/dasha/vimshottari200 OK
{
  "system": "vimshottari",
  "periods": [
    {
      "lord": "Mars",
      "start": "1989-12-20T13:27:09.380502",
      "end": "1996-12-20T07:27:09.380502"
    },
    {
      "lord": "Rahu",
      "start": "1996-12-20T07:27:09.380502",
      "end": "2014-12-20T19:27:09.380502"
    },
    {
      "lord": "Jupiter",
      "start": "2014-12-20T19:27:09.380502",
      "end": "2030-12-20T19:27:09.380502"
    }
  ]
}
The first three planetary periods (dashas) of John Doe's life: the planet that rules each period, and when it starts and ends. Real output for John Doe, born Aug 15, 1990, 10:30 AM, New York.

Call the dasha API from your code

Send the details as JSON with your API key in the Authorization header. Copy the code, set ASTROLOGY_API_KEY to your key, and run it.

POST /v1/dasha/vimshottari

# John Doe, born Aug 15, 1990, 10:30 AM, New York
curl -X POST "https://apiforastrology.com/api/astrology/v1/dasha/vimshottari" \
  -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"}'
Response (lists shortened)200 OK
{
  "system": "vimshottari",
  "year_length_days": 365.25,
  "moon_nakshatra_index": 5,
  "nakshatra_fraction_elapsed": 0.09303881,
  "starting_lord": "Mars",
  "balance_at_birth_years": 6.348728,
  "balance_method": "time",
  "levels": 3,
  "periods": [
    {
      "lord": "Mars",
      "start": "1989-12-20T13:27:09.380502",
      "end": "1996-12-20T07:27:09.380502",
      "years": 7,
      "partial_at_birth": true,
      "balance_years": 6.348728,
      "periods": [
        {
          "lord": "Mars",
          "start": "1989-12-20T13:27:09.380502",
          "end": "1990-05-18T16:54:09.380502",
          "years": 0.408333,
          "elapsed": true,
          "periods": [
            {
              "lord": "Mars",
              "start": "1989-12-20T13:27:09.380502",
              "end": "1989-12-29T06:15:13.880502",
              "years": 0.023819,
              "elapsed": true
            },
            {
              "lord": "Rahu",
              "start": "1989-12-29T06:15:13.880502",
              "end": "1990-01-20T15:10:16.880502",
              "years": 0.06125,
              "elapsed": true
            },
            {
              "lord": "Jupiter",
              "start": "1990-01-20T15:10:16.880502",
              "end": "1990-02-09T12:25:52.880502",
              "years": 0.054444,
              "elapsed": true
            }
          ]
        },
        {
          "lord": "Rahu",
          "start": "1990-05-18T16:54:09.380502",
          "end": "1991-06-06T05:12:09.380502",
          "years": 1.05,
          "periods": [
            {
              "lord": "Rahu",
              "start": "1990-05-18T16:54:09.380502",
              "end": "1990-07-15T05:32:51.380502",
              "years": 0.1575,
              "elapsed": true
            },
            {
              "lord": "Jupiter",
              "start": "1990-07-15T05:32:51.380502",
              "end": "1990-09-04T08:47:15.380502",
              "years": 0.14
            },
            {
              "lord": "Saturn",
              "start": "1990-09-04T08:47:15.380502",
              "end": "1990-11-04T02:08:06.380502",
              "years": 0.16625
            }
          ]
        },
        {
          "lord": "Jupiter",
          "start": "1991-06-06T05:12:09.380502",
          "end": "1992-05-12T02:48:09.380502",
          "years": 0.933333,
          "periods": [
            {
              "lord": "Jupiter",
              "start": "1991-06-06T05:12:09.380502",
              "end": "1991-07-21T16:04:57.380502",
              "years": 0.124444
            },
            {
              "lord": "Saturn",
              "start": "1991-07-21T16:04:57.380502",
              "end": "1991-09-13T15:30:09.380502",
              "years": 0.147778
            },
            {
              "lord": "Mercury",
              "start": "1991-09-13T15:30:09.380502",
              "end": "1991-10-31T22:33:45.380502",
              "years": 0.132222
            }
          ]
        }
      ]
    },
    {
      "lord": "Rahu",
      "start": "1996-12-20T07:27:09.380502",
      "end": "2014-12-20T19:27:09.380502",
      "years": 18,
      "periods": [
        {
          "lord": "Rahu",
          "start": "1996-12-20T07:27:09.380502",
          "end": "1999-09-02T11:39:09.380502",
          "years": 2.7,
          "periods": [
            {
              "lord": "Rahu",
              "start": "1996-12-20T07:27:09.380502",
              "end": "1997-05-17T05:40:57.380502",
              "years": 0.405
            },
            {
              "lord": "Jupiter",
              "start": "1997-05-17T05:40:57.380502",
              "end": "1997-09-25T17:26:33.380502",
              "years": 0.36
            },
            {
              "lord": "Saturn",
              "start": "1997-09-25T17:26:33.380502",
              "end": "1998-02-28T20:54:27.380502",
              "years": 0.4275
            }
          ]
        },
        {
          "lord": "Jupiter",
          "start": "1999-09-02T11:39:09.380502",
          "end": "2002-01-26T02:03:09.380502",
          "years": 2.4,
          "periods": [
            {
              "lord": "Jupiter",
              "start": "1999-09-02T11:39:09.380502",
              "end": "1999-12-28T08:46:21.380502",
              "years": 0.32
            },
            {
              "lord": "Saturn",
              "start": "1999-12-28T08:46:21.380502",
              "end": "2000-05-15T03:51:09.380502",
              "years": 0.38
            },
            {
              "lord": "Mercury",
              "start": "2000-05-15T03:51:09.380502",
              "end": "2000-09-16T08:17:33.380502",
              "years": 0.34
            }
          ]
        },
        {
          "lord": "Saturn",
          "start": "2002-01-26T02:03:09.380502",
          "end": "2004-12-02T01:09:09.380502",
          "years": 2.85,
          "periods": [
            {
              "lord": "Saturn",
              "start": "2002-01-26T02:03:09.380502",
              "end": "2002-07-09T21:42:36.380502",
              "years": 0.45125
            },
            {
              "lord": "Mercury",
              "start": "2002-07-09T21:42:36.380502",
              "end": "2002-12-04T08:58:57.380502",
              "years": 0.40375
            },
            {
              "lord": "Ketu",
              "start": "2002-12-04T08:58:57.380502",
              "end": "2003-02-03T02:19:48.380502",
              "years": 0.16625
            }
          ]
        }
      ]
    },
    {
      "lord": "Jupiter",
      "start": "2014-12-20T19:27:09.380502",
      "end": "2030-12-20T19:27:09.380502",
      "years": 16,
      "periods": [
        {
          "lord": "Jupiter",
          "start": "2014-12-20T19:27:09.380502",
          "end": "2017-02-07T00:15:09.380502",
          "years": 2.133333,
          "periods": [
            {
              "lord": "Jupiter",
              "start": "2014-12-20T19:27:09.380502",
              "end": "2015-04-03T16:53:33.380502",
              "years": 0.284444
            },
            {
              "lord": "Saturn",
              "start": "2015-04-03T16:53:33.380502",
              "end": "2015-08-05T01:51:09.380502",
              "years": 0.337778
            },
            {
              "lord": "Mercury",
              "start": "2015-08-05T01:51:09.380502",
              "end": "2015-11-23T11:07:57.380502",
              "years": 0.302222
            }
          ]
        },
        {
          "lord": "Saturn",
          "start": "2017-02-07T00:15:09.380502",
          "end": "2019-08-21T07:27:09.380502",
          "years": 2.533333,
          "periods": [
            {
              "lord": "Saturn",
              "start": "2017-02-07T00:15:09.380502",
              "end": "2017-07-03T12:23:33.380502",
              "years": 0.401111
            },
            {
              "lord": "Mercury",
              "start": "2017-07-03T12:23:33.380502",
              "end": "2017-11-11T14:24:45.380502",
              "years": 0.358889
            },
            {
              "lord": "Ketu",
              "start": "2017-11-11T14:24:45.380502",
              "end": "2018-01-04T13:49:57.380502",
              "years": 0.147778
            }
          ]
        },
        {
          "lord": "Mercury",
          "start": "2019-08-21T07:27:09.380502",
          "end": "2021-11-26T05:03:09.380502",
          "years": 2.266667,
          "periods": [
            {
              "lord": "Mercury",
              "start": "2019-08-21T07:27:09.380502",
              "end": "2019-12-16T14:18:45.380502",
              "years": 0.321111
            },
            {
              "lord": "Ketu",
              "start": "2019-12-16T14:18:45.380502",
              "end": "2020-02-02T21:22:21.380502",
              "years": 0.132222
            },
            {
              "lord": "Venus",
              "start": "2020-02-02T21:22:21.380502",
              "end": "2020-06-19T20:58:21.380502",
              "years": 0.377778
            }
          ]
        }
      ]
    }
  ],
  "balance_conventions": {
    "longitude": {
      "fraction_elapsed": 0.09312764,
      "balance_years": 6.348107,
      "first_period_ends": "1996-12-20T02:00:06.412309"
    },
    "time": {
      "fraction_elapsed": 0.09303881,
      "balance_years": 6.348728,
      "first_period_ends": "1996-12-20T07:27:09.380502"
    },
    "used": "time",
    "other": "longitude",
    "shift_days": 0.2271,
    "sources_agree": true,
    "note": "longitude measures how far the Moon has moved through its birth nakshatra; time measures how long it has been there (bhayat over bhabhog), as a desktop program does. Every later date moves by the same shift."
  },
  "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"
    }
  }
}

What the dasha API returns

  • Vimshottari: the nine main periods (mahadashas) of the 120-year cycle, each with its ruling planet and its start and end dates.
  • The sub-periods inside each one: antardasha, then pratyantardasha, and down to five levels with levels=1 to 5. The default is three levels.
  • The balance at birth: how much of the first period was left when the person was born. It is measured by time, the classical way. The common distance shortcut comes back beside it, with the days between the two. The first period is listed at full length, so it starts before birth.
  • Sub-periods that ended before birth are marked elapsed, so you can hide them.
  • Yogini: eight periods that add up to 36 years, each with its yogini, its ruling planet, its dates and one level of sub-periods.
  • Ashtottari: eight periods that add up to 108 years, up to three levels. It also checks whether the classical texts use it for this chart.
  • Every date is in the local time of the birth place, ready for a timeline or a "current period" screen.

All three systems start from the same Moon position, so they never disagree about where the timeline begins. They come side by side, and none of them overrides another. To say what a period means in words, use the readings endpoints.

Dasha API endpoints

What it uses from your plan

Each call to these endpoints uses 1 call from your monthly allowance. Failed requests are free.

See the plans

A full Vimshottari timeline from the dasha API

One call to POST /v1/dasha/vimshottari returns all nine main periods. John Doe's Moon was in Mrigashira at birth, a nakshatra ruled by Mars. So his timeline starts with Mars, with about 6.3 of its 7 years left when he was born.

Main period (mahadasha)LengthStartsEnds
Mars7 yearsDec 20, 1989Dec 20, 1996
Rahu18 yearsDec 20, 1996Dec 20, 2014
Jupiter16 yearsDec 20, 2014Dec 20, 2030
Saturn19 yearsDec 20, 2030Dec 20, 2049
Mercury17 yearsDec 20, 2049Dec 20, 2066
Ketu7 yearsDec 20, 2066Dec 20, 2073
Venus20 yearsDec 20, 2073Dec 20, 2093
Sun6 yearsDec 20, 2093Dec 20, 2099
Moon10 yearsDec 20, 2099Dec 21, 2109

Real output for John Doe, born Aug 15, 1990, 10:30 AM, New York. Dates are in New York time. The nine periods add up to 120 years. Each one also comes with its antardashas (sub-periods), which this table leaves out.

The rules behind the dasha API

Vimshottari has nine periods in a fixed order that add up to 120 years (DA-01). The first period belongs to the ruler of the nakshatra (birth star) the Moon was in at birth (DA-02). How long the Moon had been in that nakshatra tells how much of the first period was already used up. It is counted out of the whole time the Moon takes to cross the nakshatra (DA-03). Each period splits into sub-periods in the same order, starting with its own ruler (DA-04). Yogini has eight periods over 36 years (YD-01), and it stops at two levels, because a third would last only days (YD-04). Both systems use a year of 365.25 days (YD-03), and neither overrules the other (YD-05). Ashtottari has eight rulers over 108 years, and Ketu rules no period (AD-01). Sources differ on when it applies, so the response gives both readings (AD-05).

How we check the numbers

Every answer 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. An arc second is 1/3,600 of a degree. Our tests fail if a result drifts past these figures.

A practicing astrologer reviews the rules behind these answers. Each rule has an ID you can look up in the public rulebook.

See how we test accuracy

From the blog

Dasha API questions

All questions
Which dasha systems does the API support?

Three, each from its own endpoint. Vimshottari is the 120-year system most apps show. Yogini is a 36-year system, and Ashtottari is a 108-year one. All three start from the same birth Moon and come side by side, never averaged. Two Jaimini systems count periods in signs instead: chara dasha comes from POST /v1/jaimini, and Narayana dasha from POST /v1/dasha/narayana.

See the dasha endpoints
How many levels of sub-periods can I get?

Vimshottari goes down to five levels. Send levels from 1 to 5: 1 gives the mahadashas only, and the default, 3, adds antardashas and pratyantardashas. Yogini stops at two levels, periods and sub-periods, because a third level would last only days.

What a pratyantardasha is
How far into the future does the timeline go?

At least 100 years past birth. Vimshottari returns all nine main periods of the 120-year cycle, starting with the one running at birth. So the first period begins before the birth date. Yogini runs for 100 years from birth, repeating its 36-year cycle.

How exact does the birth time need to be?

Fairly exact. The timeline starts from where the Moon was in its nakshatra, and the Moon moves about half a degree an hour. An hour's error can move every date by a few months. When the first period is a long one, such as Venus, it can move them by almost a year.

Why do dasha dates differ between two apps by a few days?

Most often, the balance at birth is measured another way. The classical way, used here, measures by time. It asks how long the Moon had been in its birth nakshatra, out of the whole time it takes to cross it. Many programs measure the distance instead. The two can differ by days, up to about a month. balance_conventions gives both, with shift_days between them, and dasha_balance set to longitude switches every date to the distance way.

Read rule DA-03
Does the dasha response include written meanings?

No, the dasha endpoints return dates. For text, fetch the dasha or yogini section from POST /v1/reading/section/{section_id}. Only the first three Vimshottari levels get readings; the two deepest levels last days or hours, so they stay as dates.

Read rule DR-04

Astrology API

Call it with a free test key

Create an account and a test key, then 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