Skip to content

Repository files navigation

Dasha API

Dasha API

Vimshottari Dasha API. Current Mahadasha, Antardasha, Pratyantardasha with remaining time, plus the 120 year dasha timeline and nakshatra balance at birth. Roxy Ephemeris, verified against NASA JPL Horizons.

Get API KeyTry LiveMethodologyMCP ServerSDK

What is Dasha API

The Dasha API calculates the current Vimshottari Dasha periods (Mahadasha, Antardasha, Pratyantardasha) for any birth date, time, and location, with remaining time in each period. This dasha calculator API is built for life phase prediction and planetary period analysis. The 120 year dasha system is based on the Moon nakshatra at birth, so the response also returns the birth nakshatra and its lord. Use it to understand current planetary influences, dasha transitions, and timing of events in Vedic astrology. Roxy Ephemeris, verified against NASA JPL Horizons. 12+ spiritual domains in one subscription, Remote MCP server included.

Why this API

PropertyValue
Coverage12+ spiritual domains in one subscription
CalculationRoxy Ephemeris, verified against NASA JPL Horizons
MCP serverhttps://roxyapi.com/mcp/vedic-astrology (Streamable HTTP, no local setup)
SDKsTypeScript on npm @roxyapi/sdk, Python on PyPI roxy-sdk, PHP on Packagist roxyapi/sdk, C# on NuGet RoxyApi.Sdk, Go github.com/RoxyAPI/sdk-go, WordPress plugin roxyapi
PricingOne key, flat per call, from $39/mo
LicensingPersonal and commercial use, including closed source apps. No AGPL or GPL entanglement. Full terms
Last verified2026-Q3

Quick start

  1. Get a key at roxyapi.com/pricing
  2. Pick a language below
  3. Copy the snippet, run, ship

cURL

# Step 1: geocode the city
curl -s "https://roxyapi.com/api/v2/location/search?q=New+Delhi" \
-H "X-API-Key: $ROXY_API_KEY"# Step 2: call the endpoint with latitude, longitude, and timezone from cities[0]
curl -X POST https://roxyapi.com/api/v2/vedic-astrology/dasha/current \
-H "X-API-Key: $ROXY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"date":"1990-07-04","time":"10:12:00","latitude":28.6139,"longitude":77.209,"timezone":5.5}'

Python

importosfromroxy_sdkimportcreate_roxyroxy=create_roxy(os.environ["ROXY_API_KEY"])
# Step 1: geocode the birth citycity=roxy.location.search_cities(q="New Delhi")["cities"][0]
# Step 2: get the current Vimshottari dasha periodsdasha=roxy.vedic_astrology.get_current_dasha(
date="1990-07-04",
time="10:12:00",
latitude=city["latitude"],
longitude=city["longitude"],
timezone=city["timezone"],
)
maha=dasha["mahadasha"]
print(f"Nakshatra: {dasha['nakshatraName']} (lord {dasha['nakshatraLord']})")
print(f"Mahadasha: {maha['planet']}{maha['startDate']} to {maha['endDate']}")
print("Remaining in Mahadasha:", dasha["remainingInMahadasha"])

JavaScript (Node)

import{createRoxy}from'@roxyapi/sdk';constroxy=createRoxy(process.env.ROXY_API_KEY);// Step 1: geocode the birth cityconst{data: loc}=awaitroxy.location.searchCities({query: {q: 'New Delhi'}});const{ latitude, longitude, timezone }=loc.cities[0];// Step 2: get the current Vimshottari dasha periodsconst{data: dasha}=awaitroxy.vedicAstrology.getCurrentDasha({body: {date: '1990-07-04',time: '10:12:00', latitude, longitude, timezone },});constmaha=dasha.mahadasha;console.log(`Nakshatra: ${dasha.nakshatraName} (lord ${dasha.nakshatraLord})`);console.log(`Mahadasha: ${maha.planet}${maha.startDate} to ${maha.endDate}`);console.log('Remaining in Mahadasha:',dasha.remainingInMahadasha);

TypeScript

import{createRoxy}from'@roxyapi/sdk';constroxy=createRoxy(process.env.ROXY_API_KEY!);// Step 1: geocode the birth cityconst{data: loc}=awaitroxy.location.searchCities({query: {q: 'New Delhi'}});const{ latitude, longitude, timezone }=loc.cities[0];// Step 2: get the current Vimshottari dasha periods (Mahadasha, Antardasha, Pratyantardasha)const{data: dasha}=awaitroxy.vedicAstrology.getCurrentDasha({body: {date: '1990-07-04',time: '10:12:00', latitude, longitude, timezone },});constmaha=dasha.mahadasha;console.log(`Nakshatra: ${dasha.nakshatraName} (lord ${dasha.nakshatraLord})`);console.log(`Mahadasha: ${maha.planet}${maha.startDate} to ${maha.endDate}`);console.log('Remaining in Mahadasha:',dasha.remainingInMahadasha);

Request schema

FieldTypeRequiredDescription
datestringyesBirth date in YYYY-MM-DD format. Determines the Moon nakshatra and the starting dasha lord in the Vimshottari cycle.
timestringyesBirth time in 24-hour HH:MM:SS format. The Moon moves fast, so even minutes shift the nakshatra and the partial dasha balance at birth.
latitudenumberyesBirth location latitude in decimal degrees. Example: Delhi 28.6139, Mumbai 19.0760.
longitudenumberyesBirth location longitude in decimal degrees. Example: Delhi 77.2090, Mumbai 72.8777.
timezonenumber or stringnoTimezone as decimal hours from UTC (e.g. 5.5 for IST) or IANA name (e.g. "Asia/Kolkata"). IANA strings resolve to DST-correct offset for the given date. Defaults to 5.5 (IST).

Response shape

{
"moonNakshatra": 17,
"nakshatraName": "Anuradha",
"nakshatraLord": "Saturn",
"mahadasha": {
"planet": "Ketu",
"startDate": "2023-08-23T10:12:00",
"endDate": "2030-08-23T10:12:00",
"durationYears": 7,
"interpretation": "This period is often spiritually oriented..."
},
"antardasha": {
"planet": "Mars",
"mahadashaLord": "Ketu",
"startDate": "2026-02-24T16:24:00",
"endDate": "2026-07-23T20:12:00",
"durationYears": 0.408
},
"pratyantardasha": {
"planet": "Ketu",
"mahadashaLord": "Ketu",
"antardashaLord": "Mars",
"startDate": "2026-05-31T09:26:00",
"endDate": "2026-06-09T02:15:00",
"durationYears": 0.024
},
"remainingInMahadasha": { "years": 4, "months": 2, "days": 23, "totalDays": 1545 },
"remainingInAntardasha": { "years": 0, "months": 1, "days": 24, "totalDays": 54 },
"remainingInPratyantardasha": { "years": 0, "months": 0, "days": 9, "totalDays": 9 }
}
FieldTypeDescription
moonNakshatranumberBirth Moon nakshatra number (1-27). This nakshatra determines the starting dasha lord in the Vimshottari 120-year cycle.
nakshatraNamestringName of the birth Moon nakshatra (lunar mansion). One of 27 Vedic nakshatras from Ashwini to Revati.
nakshatraLordstringVimshottari dasha lord of the birth nakshatra. This planet rules the first Mahadasha in the native life cycle.
mahadashaobjectCurrently running Mahadasha (major planetary period). Start and end dates are determined by Moon nakshatra at birth.
mahadasha.planetstringRuling graha of this dasha period. One of 9 planets in the Ketu-Venus-Sun-Moon-Mars-Rahu-Jupiter-Saturn-Mercury sequence.
mahadasha.startDatestringStart datetime of this dasha period. Adjusted to the requested timezone offset.
mahadasha.endDatestringEnd datetime of this dasha period. Adjusted to the requested timezone offset.
mahadasha.durationYearsnumberDuration in years. Mahadasha durations range from 6 years (Sun) to 20 years (Venus).
mahadasha.interpretationstringVedic interpretation of the planetary period describing themes, karmic lessons, and life areas affected by this graha.
antardashaobjectCurrently running Antardasha (bhukti), the sub-period within a Mahadasha. Adds mahadashaLord (parent Mahadasha lord).
pratyantardashaobjectCurrently running Pratyantardasha (sub-sub-period), the third level of the hierarchy for finer event timing. Adds mahadashaLord and antardashaLord.
remainingInMahadashaobjectTime remaining in the currently running Mahadasha, as years, months, days, and totalDays.
remainingInAntardashaobjectTime remaining in the currently running Antardasha, as years, months, days, and totalDays.
remainingInPratyantardashaobjectTime remaining in the currently running Pratyantardasha, as years, months, days, and totalDays.

Common use cases

Use caseEndpoint flow
Current life phase for a birth date and cityCall /location/search?q={city} first, take latitude, longitude, timezone from cities[0], POST to /vedic-astrology/dasha/current
Dasha transition countdown widgetRead remainingInMahadasha, remainingInAntardasha, and remainingInPratyantardasha for a live countdown to the next period change.
Full 120 year dasha timelineCall /vedic-astrology/dasha/major for all 9 Mahadasha periods from birth with the birth dasha balance.
Antardasha breakdown of a single MahadashaCall /vedic-astrology/dasha/sub/{mahadasha} for the 9 proportional sub-periods within one Mahadasha.
Event timing in Vedic astrology softwareCombine current dasha with the natal chart from /vedic-astrology/birth-chart for prediction and planetary period analysis.

Related endpoints in this domain

Use this in your AI agent

Connect Claude, GPT, Gemini, or Cursor to RoxyAPI through the remote MCP server. No Docker. No self hosting. The full MCP tool catalog for this domain is at https://roxyapi.com/mcp/vedic-astrology.

{
"mcpServers": {
"vedic-astrology": {
"url": "https://roxyapi.com/mcp/vedic-astrology",
"headers": { "X-API-Key": "$ROXY_API_KEY" }
}
}
}

See docs/mcp for Claude Desktop, Cursor, Windsurf, VS Code, and Claude Code setup.

For AI coding agents

This repo ships an AGENTS.md execution playbook. Cursor, Claude Code, Aider, Codex, Windsurf, RooCode, and Gemini CLI will pick it up automatically. Top level overview lives at roxyapi.com/AGENTS.md.

Resources

Other RoxyAPI samples

Kundli APIKP Astrology APIPanchang API

License

MIT for this sample repo. See LICENSE.

Catalog licensing: Personal and commercial use, including closed source proprietary apps. No AGPL or GPL entanglement. RoxyAPI APIs and SDKs are safe to embed in commercial products. Full terms at roxyapi.com/policy/license.

Contact

About

Vimshottari Dasha API. Current Mahadasha, Antardasha, Pratyantardasha plus full 120 year timeline. Nakshatra balance at birth.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages