<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Amrita Singh</title>
    <description>The latest articles on Forem by Amrita Singh (@amrita_singh_64dde42824ea).</description>
    <link>https://forem.com/amrita_singh_64dde42824ea</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3894132%2Ff20f5bd6-7a4f-4102-bc58-d9b919301688.jpeg</url>
      <title>Forem: Amrita Singh</title>
      <link>https://forem.com/amrita_singh_64dde42824ea</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/amrita_singh_64dde42824ea"/>
    <language>en</language>
    <item>
      <title>Adding Vedic Astrology Features to Your App: A Developer's Guide</title>
      <dc:creator>Amrita Singh</dc:creator>
      <pubDate>Thu, 23 Apr 2026 11:17:42 +0000</pubDate>
      <link>https://forem.com/amrita_singh_64dde42824ea/how-matrimony-platforms-are-using-astrology-apis-to-improve-match-quality-n4d</link>
      <guid>https://forem.com/amrita_singh_64dde42824ea/how-matrimony-platforms-are-using-astrology-apis-to-improve-match-quality-n4d</guid>
      <description>&lt;p&gt;If you're building anything for the Indian market, or for the Indian diaspora, there's a category of features users expect that most Western-focused dev tutorials skip entirely: Vedic astrology. Daily horoscopes, kundali generation, panchang for muhurat picking, kundali matching for matrimony products. None of this needs a custom calculation engine. We've packaged it all into REST endpoints under DivineAPI, and this post walks through how to wire the most-used ones into a Python app in a single sitting.&lt;br&gt;
Here's what we'll build by the end:&lt;br&gt;
A function that returns a full Vedic birth-chart summary (sun sign, moon sign, nakshatra, tithi, ascendant, varna, gana, nadi) from birth data&lt;br&gt;
A function that returns daily Panchang (tithi, nakshatra, yoga, karana, sunrise, sunset) for any date and location&lt;br&gt;
Pointers to where you go next for KP, Jaimini, Dasha, and Matching&lt;br&gt;
What's actually available&lt;br&gt;
DivineAPI ships 90+ Vedic endpoints organised into four buckets, all under one API key:&lt;br&gt;
Kundli API (40 endpoints): birth-chart computation, divisional charts (D1 through D60), Vimshottari and other dashas, Ashtakvarga, doshas, yogas, KP and Jaimini systems, gemstone suggestions&lt;br&gt;
Daily Panchang (28 endpoints): tithi, nakshatra, yoga, karana, choghadiya, auspicious and inauspicious timings, sunrise/sunset, planetary transits&lt;br&gt;
Festival API (15 endpoints): Hindu calendar, festival lookups, date-specific events&lt;br&gt;
Match Making (8 endpoints): Ashtakoot Milan (36-point Guna Milan), Dashakoot Milan, Manglik Dosha, Nav Pancham Yoga&lt;br&gt;
It's part of a larger stack of 225 endpoints across 8 spiritual domains, but for this tutorial we're staying inside the Vedic side.&lt;br&gt;
Prerequisites&lt;br&gt;
pip install requests&lt;/p&gt;

&lt;p&gt;You'll need two things from your DivineAPI dashboard:&lt;br&gt;
API key (goes in the request body as api_key)&lt;br&gt;
API access token (goes in the Authorization header as Bearer {token})&lt;br&gt;
Both are mandatory. You can grab them from the Profile Details page after signing up. There's a 14-day free trial; you'll need a credit card to register.&lt;br&gt;
Step 1: Get a Vedic birth chart summary&lt;br&gt;
The fastest way to get a useful Vedic profile is the Basic Astro Details endpoint. One POST and you get sun sign, moon sign, ascendant data, nakshatra, tithi at birth, varna, vashya, yoni, gana, nadi, and more. This is what most matrimony, dating, and wellness apps use to seed a user profile.&lt;br&gt;
import requests&lt;/p&gt;

&lt;p&gt;URL = "&lt;a href="https://astroapi-3.divineapi.com/indian-api/v3/basic-astro-details" rel="noopener noreferrer"&gt;https://astroapi-3.divineapi.com/indian-api/v3/basic-astro-details&lt;/a&gt;"&lt;br&gt;
HEADERS = {"Authorization": "Bearer YOUR_AUTH_TOKEN"}&lt;/p&gt;

&lt;p&gt;payload = {&lt;br&gt;
    "api_key": "YOUR_API_KEY",&lt;br&gt;
    "full_name": "Rahul Kumar",&lt;br&gt;
    "day": 24,&lt;br&gt;
    "month": 5,&lt;br&gt;
    "year": 1998,&lt;br&gt;
    "hour": 14,        # 24-hour format&lt;br&gt;
    "min": 40,&lt;br&gt;
    "sec": 43,&lt;br&gt;
    "gender": "male",&lt;br&gt;
    "place": "New Delhi",&lt;br&gt;
    "lat": 28.7041,&lt;br&gt;
    "lon": 77.1025,&lt;br&gt;
    "tzone": 5.5,      # IST. Float, not int, not string&lt;br&gt;
    "lan": "en"        # optional. en/hi/bn/ma/tm/tl/ml/kn&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;response = requests.post(URL, headers=HEADERS, json=payload)&lt;br&gt;
data = response.json()["data"]&lt;/p&gt;

&lt;p&gt;print(f"{data['full_name']} is a {data['sunsign']} sun, {data['moonsign']} moon")&lt;br&gt;
print(f"Born under {data['nakshatra']} nakshatra, in {data['tithi']} tithi, {data['paksha']} paksha")&lt;br&gt;
print(f"Varna: {data['varna']}, Gana: {data['gana']}, Nadi: {data['nadi']}")&lt;/p&gt;

&lt;p&gt;What comes back, trimmed for readability:&lt;br&gt;
{&lt;br&gt;
  "success": 1,&lt;br&gt;
  "data": {&lt;br&gt;
    "full_name": "Rahul Kumar",&lt;br&gt;
    "place": "New Delhi",&lt;br&gt;
    "latitude": "28.7041",&lt;br&gt;
    "longitude": "77.1025",&lt;br&gt;
    "timezone": "5.5",&lt;br&gt;
    "sunrise": "1998-05-24 05:25:56",&lt;br&gt;
    "sunset": "1998-05-24 19:10:28",&lt;br&gt;
    "sunsign": "Taurus",&lt;br&gt;
    "moonsign": "Gemini",&lt;br&gt;
    "nakshatra": "Aradra",&lt;br&gt;
    "tithi": "Chaturdashi",&lt;br&gt;
    "paksha": "Krishna",&lt;br&gt;
    "vaar": "Sunday",&lt;br&gt;
    "yoga": "Harshana",&lt;br&gt;
    "karana": "Vishti",&lt;br&gt;
    "varna": "Shudra",&lt;br&gt;
    "vashya": "Biped",&lt;br&gt;
    "yoni": "Shwan",&lt;br&gt;
    "gana": "Manushya",&lt;br&gt;
    "nadi": "Adi",&lt;br&gt;
    "tatva": "Airy",&lt;br&gt;
    "rashi_akshar": "का, की, कू, घ, ङ, छ, के, को, ह",&lt;br&gt;
    "ayanamsha": "24.298085"&lt;br&gt;
  }&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;A few things worth knowing:&lt;br&gt;
Timezone is a Float, not a string. 5.5 for IST. Sending "5.5" or "Asia/Kolkata" will silently produce wrong dates. Cast at the boundary if you're reading from a form.&lt;br&gt;
Birth time fields are separate integers. day, month, year, hour, min, sec. Not a single ISO string. The API doesn't parse ISO; you have to break it apart.&lt;br&gt;
rashi_akshar returns the Hindi syllables traditionally used to start a name based on moonsign nakshatra. Useful for any Indian-baby-name or matrimony profile feature.&lt;br&gt;
lan parameter switches the response language. Supported: en (English), hi (Hindi), bn (Bengali), ma (Marathi), tm (Tamil), tl (Telugu), ml (Malayalam), kn (Kannada). Default is English.&lt;br&gt;
That's a complete Vedic birth-chart starter in one call.&lt;br&gt;
Step 2: Get daily Panchang (Tithi, Nakshatra, Yoga, Karana)&lt;br&gt;
Panchang is the Hindu calendar at the day-and-place level. It's what muhurat-picking apps, daily astrology widgets, and festival-aware products consume. The Find Panchang endpoint returns all five panchanga elements (tithi, nakshatra, yoga, karana, vaar) plus sunrise, sunset, and related calendar data in one call.&lt;br&gt;
import requests&lt;/p&gt;

&lt;p&gt;URL = "&lt;a href="https://astroapi-1.divineapi.com/indian-api/v2/find-panchang" rel="noopener noreferrer"&gt;https://astroapi-1.divineapi.com/indian-api/v2/find-panchang&lt;/a&gt;"&lt;br&gt;
HEADERS = {"Authorization": "Bearer YOUR_AUTH_TOKEN"}&lt;/p&gt;

&lt;p&gt;payload = {&lt;br&gt;
    "api_key": "YOUR_API_KEY",&lt;br&gt;
    "day": 24,&lt;br&gt;
    "month": 5,&lt;br&gt;
    "year": 2026,&lt;br&gt;
    "place": "New Delhi",&lt;br&gt;
    "lat": 28.6139,&lt;br&gt;
    "lon": 77.2090,&lt;br&gt;
    "tzone": 5.5,&lt;br&gt;
    "lan": "en"&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;response = requests.post(URL, headers=HEADERS, json=payload)&lt;br&gt;
panchang = response.json()["data"]&lt;/p&gt;

&lt;p&gt;print(f"Tithi: {panchang['tithis'][0]['tithi']} ({panchang['tithis'][0]['paksha']})")&lt;br&gt;
print(f"Nakshatra: {panchang['nakshatras']['nakshatra_pada'][0]['nak_name']}")&lt;br&gt;
print(f"Yoga: {panchang['yogas'][0]['yoga_name']}")&lt;br&gt;
print(f"Karana: {panchang['karnas'][0]['karana_name']}")&lt;br&gt;
print(f"Sunrise: {panchang['sunrise']}, Sunset: {panchang['sunset']}")&lt;/p&gt;

&lt;p&gt;Each element returns as an array because tithi, nakshatra, yoga, and karana can change during a single day. The response gives you the active windows with start and end times so you can render "current" or "upcoming" views correctly.&lt;br&gt;
If you only need one element (just tithi for a calendar widget, just nakshatra for an astrology card), there are dedicated single-purpose endpoints too:&lt;br&gt;
POST /indian-api/v1/find-tithi&lt;br&gt;
POST /indian-api/v2/find-nakshatra&lt;br&gt;
POST /indian-api/v2/find-yoga&lt;br&gt;
POST /indian-api/v1/find-karana&lt;br&gt;
Same auth, same date+location params. Skinnier responses, slightly faster.&lt;br&gt;
Going deeper: KP and Jaimini&lt;br&gt;
If your product targets users who care about specific Vedic systems beyond standard parashari astrology, both KP (Krishnamurti Paddhati) and Jaimini are first-class:&lt;br&gt;
KP astrology endpoints (5):&lt;br&gt;
KP Planetary Positions (/indian-api/v2/kp/planetary-positions)&lt;br&gt;
KP Cuspal (/indian-api/v2/kp/cuspal)&lt;br&gt;
KP Planetary Sub&lt;br&gt;
KP Cuspal Sub&lt;br&gt;
KP Planetary and Cuspal Significator Table&lt;br&gt;
Jaimini astrology endpoints (4):&lt;br&gt;
Jaimini Planetary Positions (/indian-api/v2/jaimini-astrology/planetary-positions)&lt;br&gt;
Jaimini Chara Dasha&lt;br&gt;
Jaimini Karakamsha Lagna&lt;br&gt;
Jaimini Padas&lt;br&gt;
Same authentication pattern. Same day/month/year/hour/min/sec/lat/lon/tzone request body. KP and Jaimini are not afterthoughts in this API; they're built in alongside parashari from the start.&lt;br&gt;
Going further&lt;br&gt;
Three other endpoint families worth knowing about for a serious Vedic feature build:&lt;br&gt;
Vimshottari Dasha endpoints under Kundli API for the major and minor planetary periods (Maha, Antar, Pratyantar, plus prana-dasha and deha-dasha for sub-sub periods)&lt;br&gt;
Match Making endpoints (Ashtakoot Milan, Dashakoot Milan, Manglik Dosha) if you're building anything matrimony-adjacent&lt;br&gt;
Festival API for date-specific Hindu calendar events, useful for content sites and notification triggers&lt;br&gt;
All run on Swiss Ephemeris under the hood, which is the same NASA JPL-derived calculation engine most serious astrology software is built on. The math is precise to sub-milliarcsecond accuracy, so you don't have to defend your output against a family astrologer's hand calculations.&lt;br&gt;
Wrapping up&lt;br&gt;
Two endpoints. Maybe 30 lines of Python. That's the foundation for a working Vedic astrology feature in a web app: birth-chart summaries on user profile creation, daily Panchang on a dashboard or calendar widget. From here you can stack matching, dasha analysis, KP, Jaimini, or panchang-based muhurat suggestions without changing API providers.&lt;br&gt;
Full docs at developers.divineapi.com, with the live "Run In Postman" button on every endpoint page so you can poke at the request and response before writing any code. 14-day free trial at divineapi.com.&lt;br&gt;
If you ship something with this, drop a comment, always curious to see what people end up building.&lt;/p&gt;

</description>
      <category>api</category>
      <category>python</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
