1. Docs
  2. Domain Guides
  3. Vedic Astrology

Kundli API and Vedic Astrology, what to build and how to call it

Ship a kundli generator, a Gun Milan matchmaker, a panchang calendar, or a full KP chart in under 30 minutes. No Jyotish knowledge required.

Vedic astrology is the depth moat. The India astrology market is on a 49% CAGR, and every matrimonial platform, muhurat app, and KP tool needs the same handful of endpoints. Kundli, panchang, dasha, dosha, and KP are the five search-dominant queries in the space. Roxy gives you all of them under one key.

What you can build with this

  • Kundli generators and matrimonial matchmaking platforms
  • Gun Milan 36-point compatibility checks with dosha cancellation
  • Vimshottari Dasha timelines with mahadasha, antardasha, pratyantardasha
  • Panchang calendars with rahu kaal, abhijit muhurta, choghadiya, hora
  • KP (Krishnamurti Paddhati) horary and birth charts with sub-lords
  • Manglik, Kaal Sarp, and Sade Sati dosha reports

What you need, 30 seconds

  1. A Roxy API key. Get one on the pricing page.
  2. The birth city. We geocode it for you in step 1.

Step 1, call your first endpoint

The #1 Vedic call is the birth chart (kundli). Every matrimonial and Jyotish product starts here. The canonical two-step pattern is geocode the city, then post the chart. Pick a language.

# 1. geocode the city
curl "https://roxyapi.com/api/v2/location/search?q=Mumbai" \
  -H "X-API-Key: $ROXY_API_KEY"
# returns cities[0] with latitude, longitude, timezone (IANA)

# 2. post the kundli request
curl -X POST https://roxyapi.com/api/v2/vedic-astrology/birth-chart \
  -H "X-API-Key: $ROXY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "date": "1990-07-15",
    "time": "14:30:00",
    "latitude": 19.076,
    "longitude": 72.8777,
    "timezone": "Asia/Kolkata"
  }'

The response groups planets two ways. The 12 rashi keys (aries through pisces) each list the planets sitting in that sign, so you can render the north-Indian 12-house chart by iterating them. The top-level meta keyed by planet name gives you direct lookup with rashi, longitude, nakshatra (with ratio and left decimals for pada precision), isRetrograde, combustion, and planetaryWar.

Step 2, render it to the user

The Moon nakshatra is the most important Vedic placement because it determines the dasha sequence. Show the "big four" at the top, then drop into the 12-sign grid.

'use client';

export function Kundli({ chart }: { chart: any }) {
  const { Sun, Moon, Mars } = chart.meta;
  const rashiOrder = ['aries','taurus','gemini','cancer','leo','virgo',
                      'libra','scorpio','sagittarius','capricorn','aquarius','pisces'] as const;

  return (
    <section>
      <h2>Core placements</h2>
      <dl>
        <dt>Moon nakshatra</dt><dd>{Moon.nakshatra.name} (pada {Moon.nakshatra.pada})</dd>
        <dt>Sun rashi</dt><dd>{Sun.rashi}</dd>
        <dt>Lagna</dt><dd>{chart.ascendant?.rashi ?? '—'}</dd>
      </dl>

      <h2>12-sign chart</h2>
      <div className="grid grid-cols-4 gap-2">
        {rashiOrder.map(r => (
          <div key={r}>
            <strong>{r}</strong>
            <ul>{chart[r].signs.map((p: any) => <li key={p.graha}>{p.graha}</li>)}</ul>
          </div>
        ))}
      </div>
    </section>
  );
}

Step 3, ship the rest

Gun Milan, the matrimonial core

POST /vedic-astrology/compatibility takes two people and returns the full 36-point Ashtakoota score with 8 sub-scores (Varna, Vasya, Tara, Yoni, Maitri, Gana, Bhakoot, Nadi) plus dosha cancellation logic. This is the endpoint behind every Indian matrimonial app.

curl -X POST https://roxyapi.com/api/v2/vedic-astrology/compatibility \
  -H "X-API-Key: $ROXY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "person1": {"date":"1990-07-15","time":"14:30:00","latitude":19.076,"longitude":72.8777,"timezone":5.5},
    "person2": {"date":"1992-03-22","time":"09:00:00","latitude":28.6139,"longitude":77.209,"timezone":5.5}
  }'

breakdown[] returns all 8 kutas with individual scores. Show the total as the headline and the sub-scores as a radar chart. doshas[] and doshaCancellations[] tell you which red flags apply and whether they cancel out.

Vimshottari Dasha, the life-phase engine

Three endpoints in the dasha series.

Panchang, the Hindu calendar

Doshas, the matrimonial red flags

KP system, the practitioner differentiator

KP (Krishnamurti Paddhati) endpoints expose sub-lord and sub-sub-lord data that generic Vedic APIs do not return. Three endpoints, same BirthDataSchema plus optional ayanamsa (kp-newcomb default, kp-old, lahiri, or custom).

POST /vedic-astrology/navamsa returns the classical marriage chart with vargottama planets.

See the full list at the Vedic Astrology API reference.

Gotchas

  • Timezone accepts decimal or IANA string (2026-04-23). Pass 5.5 or "Asia/Kolkata". IANA is DST-resolved against the birth date. Vedic endpoints default to 5.5 (IST) if omitted, but do not rely on this for non-Indian births.
  • Ayanamsa is server-side. Lahiri is the default for standard Vedic endpoints, KP uses kp-newcomb. Do not subtract ayanamsa in client code to "correct" positions, the server already did.
  • Tithi count is 30, not 2. There are 15 Shukla and 15 Krishna tithis. Older LLM training data conflates Purnima and Amavasya, our split is authoritative.
  • Rahu and Ketu are shadow points, not planets. KP endpoints let you pick true-node or mean-node via nodeType. Default is mean node. Pick consciously if your product compares against a specific set of practitioner tables.
  • Nakshatra count is 27. Abhijit is not an endpoint in the standard 27 scheme.
  • The detailed panchang endpoint takes date, not time. Sunrise and sunset anchor the muhurtas for that full day at that location.

What to build next

The AI chatbot tutorial wires Vedic endpoints through MCP so an agent can answer kundli questions in conversation. For hand-rolled integrations, the Next.js integration guide is the fastest path to a deployed matrimonial UI. Power users building KP tooling should read the SDK guide for typed calls.