Vimshottari dasha API demo
One real call to POST /v1/dasha/vimshottari (2 credits). The body holds a birth and a depth: 1 for mahadashas only, 2 to add antardashas, and up to 5 levels. The example asks for depth 2. Press Send to see the periods.
Try it
What comes back
periods is a list of mahadashas in order from birth. Each has its planet, its start and end as UTC timestamps, and, when you ask for more depth, a sub list of the periods inside it, built the same way.
The first mahadasha starts part-way through, at the balance left by the Moon's position in its nakshatra at birth. Sub-periods divide each period in proportion to the lords' years, and the cycle's years are 365.25 days. The conventions page lists the other choices.
If your screen only needs "which period is running now", POST /v1/dasha/vimshottari/current (2 credits) answers that in one smaller response. Yogini and Chara dashas are in the dasha reference.
The same call in code
curl -X POST 'https://api.astrologics.in/v1/dasha/vimshottari' \
-H 'Authorization: Bearer al_test_YOUR_KEY' \
-H 'Content-Type: application/json' \
-d '{"birth":{"date":"1990-08-13","time":"06:30","place":{"latitude":28.6139,"longitude":77.209}},"depth":2}'import json
import urllib.error
import urllib.request
body = {
"birth": {
"date": "1990-08-13",
"time": "06:30",
"place": {
"latitude": 28.6139,
"longitude": 77.209,
},
},
"depth": 2,
}
req = urllib.request.Request(
"https://api.astrologics.in/v1/dasha/vimshottari",
method="POST",
headers={"Authorization": "Bearer al_test_YOUR_KEY", "Content-Type": "application/json"},
data=json.dumps(body).encode(),
)
try:
with urllib.request.urlopen(req) as res:
print(json.dumps(json.load(res), indent=2, ensure_ascii=False))
except urllib.error.HTTPError as err:
print(err.code, err.read().decode())const res = await fetch("https://api.astrologics.in/v1/dasha/vimshottari", {
method: "POST",
headers: { Authorization: "Bearer al_test_YOUR_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"birth": {
"date": "1990-08-13",
"time": "06:30",
"place": {
"latitude": 28.6139,
"longitude": 77.209
}
},
"depth": 2
}),
});
console.log(JSON.stringify(await res.json(), null, 2));Questions
Why are the times in UTC?
So that comparing and sorting periods is never off by a zone. Convert to the reader's zone when you show them.
How deep should I go?
Most apps show two levels. Each extra level multiplies the size of the response by about nine, so ask for depth 3 or more only for the period you are showing.
Does a wrong birth time matter?
Yes: the balance at birth comes from the Moon's position, which moves about half a degree an hour.
Want your own dasha rather than an API? Use the free dasha calculator on astrologics.in.