Skip to content

Repository files navigation

Panchang API

Panchang API

Complete daily panchang with tithi, nakshatra, yoga, karana, rahu kaal, abhijit muhurta, and 15 auspicious windows. One key. Location-aware. Roxy Ephemeris verified against NASA JPL Horizons.

Get API KeyTry LiveMethodology

MCP ServerSDK

What is Panchang API

The Panchang API returns a complete Hindu calendar (panchang) for any date and observer location. One call delivers all five limbs: Tithi (lunar day), Nakshatra (lunar mansion), Yoga, Karana, and Vara. It then adds sunrise, sunset, moonrise, moonset, Rahu Kaal, Yamaganda, Gulika Kaal, Abhijit Muhurta, Brahma Muhurta, Chandrabalam, Tarabalam, Varjyam, and Amrit Kalam. Powered by Roxy Ephemeris, verified against NASA JPL Horizons, and available through 12+ spiritual domains in one subscription. The Remote MCP server at https://roxyapi.com/mcp/vedic-astrology makes the panchang API instantly usable in Claude, Cursor, or any MCP-compatible agent.

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: detailed panchang using coordinates from step 1
curl -X POST https://roxyapi.com/api/v2/vedic-astrology/panchang/detailed \
-H "X-API-Key: $ROXY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"date":"2026-05-03","latitude":28.6139,"longitude":77.209,"timezone":"Asia/Kolkata"}'

Python

importosfromroxy_sdkimportcreate_roxyroxy=create_roxy(os.environ["ROXY_API_KEY"])
# Step 1: geocode the city - never hardcode coordinatesloc=roxy.location.search_cities(q="New Delhi")
city=loc["cities"][0]
latitude, longitude, timezone=city["latitude"], city["longitude"], city["timezone"]
# Step 2: detailed panchang for that locationpanchang=roxy.vedic_astrology.get_detailed_panchang(
date="2026-05-03", latitude=latitude, longitude=longitude, timezone=timezone,
)
tithi=panchang["tithi"]
print(tithi["name"], tithi["paksha"], "paksha")
print("Rahu Kaal:", panchang["rahuKaal"]["start"], "to", panchang["rahuKaal"]["end"])

JavaScript (Node)

import{createRoxy}from'@roxyapi/sdk';constroxy=createRoxy(process.env.ROXY_API_KEY);// Step 1: geocode the city - never hardcode coordinatesconst{data: loc}=awaitroxy.location.searchCities({query: {q: 'New Delhi'}});const{ latitude, longitude, timezone }=loc.cities[0];// Step 2: detailed panchang for that locationconst{ data }=awaitroxy.vedicAstrology.getDetailedPanchang({body: {date: '2026-05-03', latitude, longitude, timezone },});console.log(data.tithi.name,data.tithi.paksha,'paksha');console.log('Rahu Kaal:',data.rahuKaal.start,'to',data.rahuKaal.end);

TypeScript

import{createRoxy}from'@roxyapi/sdk';constroxy=createRoxy(process.env.ROXY_API_KEY!);// Step 1: geocode the city - never hardcode coordinatesconst{data: loc}=awaitroxy.location.searchCities({query: {q: 'New Delhi'}});const{ latitude, longitude, timezone }=loc!.cities[0];// Step 2: detailed panchang for that locationconst{ data }=awaitroxy.vedicAstrology.getDetailedPanchang({body: {date: '2026-05-03', latitude, longitude, timezone },});console.log(data?.tithi.name,data?.tithi.paksha,'paksha');console.log('Rahu Kaal:',data?.rahuKaal.start,'to',data?.rahuKaal.end);

Request schema

FieldTypeRequiredDescription
datestringyesDate in YYYY-MM-DD format. Panchang is calculated for this date.
latitudenumberyesObserver latitude in decimal degrees (-90 to 90). Determines sunrise and sunset times which define day/night boundaries for muhurta calculations.
longitudenumberyesObserver longitude in decimal degrees (-180 to 180). Affects local time calculations for sunrise, sunset, and muhurta period boundaries.
timezonenumbernoTimezone offset from UTC in decimal hours. Defaults to 5.5 (IST). Used for sunrise/sunset/moonrise/moonset search accuracy and output time formatting.

Response shape

{
"date": "2026-05-03",
"vara": { "name": "Sunday", "lord": "Sun" },
"sunrise": "2026-05-03T05:39:00",
"sunset": "2026-05-03T18:57:00",
"moonrise": "2026-05-03T20:15:00",
"moonset": "2026-05-04T07:30:00",
"tithi": {
"number": 17,
"name": "Dvitiya",
"paksha": "Krishna",
"percent": 18.38,
"deity": "Brahma",
"rulingPlanet": "Moon",
"element": "Earth"
},
"nakshatra": {
"number": 16,
"name": "Vishakha",
"lord": "Jupiter",
"pada": 4,
"deity": "Indra and Agni",
"symbol": "Triumphal Arch"
},
"yoga": { "number": 18, "name": "Variyaana", "percent": 32.17 },
"karana": { "number": 4, "name": "Taitil", "type": "char" },
"rahuKaal": { "start": "2026-05-03T17:17:00", "end": "2026-05-03T18:57:00" },
"abhijitMuhurta": { "start": "2026-05-03T11:51:00", "end": "2026-05-03T12:44:00" },
"brahmaMuhurta": { "start": "2026-05-03T04:03:00", "end": "2026-05-03T04:51:00" },
"chandrabalam": {
"favorableRashis": ["Aries", "Gemini", "Virgo", "Scorpio", "Capricorn", "Aquarius"],
"ashtamaChandraRashi": "Pisces"
},
"tarabalam": {
"favorableNakshatras": ["Bharani", "Rohini", "Ardra", "Pushya"],
"unfavorableNakshatras": ["Krittika", "Mrigashira"]
}
}
FieldTypeDescription
datestringDate for which panchang is calculated.
varaobjectHindu weekday (Vara) with name and ruling planet. Vara begins at local sunrise, not midnight.
sunrisestringLocal sunrise time. Marks the start of the Hindu day.
sunsetstringLocal sunset time. Marks the transition to night muhurtas.
moonrisestring or nullMoonrise time in the requested timezone. Null if Moon does not rise on this date.
moonsetstring or nullMoonset time in the requested timezone. Null if Moon does not set on this date.
moonSignobjectMoon rashi (sidereal zodiac sign) at sunrise with Sanskrit name. Determines Chandrabalam and Tarabalam.
sunSignobjectSun rashi (sidereal zodiac sign) at sunrise with Sanskrit name. Determines the solar month (Saura Masa).
sunNakshatraobjectNakshatra the Sun occupies: number, name, lord, pada. Sun spends ~13-14 days per nakshatra.
tithiobjectLunar day (1-30). Includes name, paksha, percent elapsed, presiding deity, ruling planet, element.
nakshatraobjectLunar mansion (1-27). Includes name, lord, pada (1-4), deity, symbol, characteristics.
yogaobjectNitya Yoga (1-27) derived from combined Sun-Moon longitude. Includes name and characteristics.
karanaobjectHalf-tithi (changes twice per tithi). Includes name, type (Movable/Fixed), characteristics.
horaobjectCurrent planetary hora with ruling planet, sequence number, start and end times.
rahuKaalobjectRahu Kaal start/end. Inauspicious period ruled by Rahu. Avoid starting new ventures.
yamagandaobjectYamaganda start/end. Inauspicious period ruled by Yama.
gulikaobjectGulika Kaal start/end. Inauspicious period ruled by Saturn son Gulika.
abhijitMuhurtaobject or nullMost auspicious ~48-minute window around solar noon. Null on Wednesdays per Muhurta Chintamani.
brahmaMuhurtaobjectSacred pre-dawn period ~96 minutes before sunrise. Best for meditation and spiritual sadhana.
vijayaMuhurtaobjectAuspicious for journeys, legal proceedings, and competitions.
nishitaMuhurtaobjectSacred midnight period. Significant for Shivaratri and Janmashtami celebrations.
godhuliMuhurtaobject or nullUniversally auspicious 24-minute window around sunset.
durMuhurtaarrayInauspicious muhurta periods per weekday. Each period lasts ~48 minutes.
varjyamarrayInauspicious ~96-minute nakshatra-based periods. Avoid auspicious ceremonies.
amritKalamarrayMost auspicious ~96-minute nakshatra-based periods for muhurta selection.
chandrabalamobjectMoon strength: favorable rashis and the Ashtama Chandra rashi.
tarabalamobjectStar strength via the 9-Tara system: favorable and unfavorable birth nakshatras.
panchakaobjectActive status and type when Moon transits nakshatras 23-27.
bhadraobjectActive status and timing for Vishti (Bhadra) karana.
transitionsobjectPrecise transition times for tithi, yoga, karana, nakshatra, and Moon sign.

Common use cases

Use caseEndpoint flow
Hindu calendar appPOST /vedic-astrology/panchang/detailed with date and user location. Display all five limbs.
Muhurta selectionCheck abhijitMuhurta, brahmaMuhurta, vijayaMuhurta, amritKalam. Exclude rahuKaal, yamaganda, durMuhurta.
Daily astrology notificationCombine tithi, nakshatra, vara for a morning push notification.
Marriage and naming ceremoniesCheck chandrabalam, tarabalam, bhadra, panchaka before selecting an auspicious time.
Electional astrology toolsUse transitions to determine precise panchang change boundaries to the minute.
Hindu festival datesFeed daily tithi number into festival lookup (Purnima, Amavasya, Ekadashi) for dynamic calendar generation.

Related endpoints in this domain

  • POST /vedic-astrology/panchang/basic (getBasicPanchang) for Tithi, Nakshatra, Yoga, Karana without time-based muhurtas
  • POST /vedic-astrology/panchang/choghadiya (getChoghadiya) for 8-period day/night muhurta divisions
  • POST /vedic-astrology/panchang/hora (getHora) for all 24 planetary hours with ruling planets

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

KP Astrology APIKundli APIDasha 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

Panchang API. Tithi, nakshatra, yoga, karana plus 15 muhurtas including rahu kaal, abhijit, brahma, varjyam, chandrabalam, tarabalam.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages