Detect Vedic Yogas From a Birth Chart With One API Call
Vedic yoga detection API: one call returns 48 verdicts per birth chart, 16 classical including Dhana and Daridra plus all 32 Nabhasa, with evidence.
TL;DR
- Vedic yoga detection tests the classical formation rules against a computed sidereal birth chart instead of looking a yoga up in a glossary;
POST /vedic-astrology/yoga/detectreturns 48 verdicts per chart, each with apresentboolean and anevidencestring. - The 48 are 16 classical and 32 Nabhasa (3 Asraya, 2 Dala, 20 Akriti, 7 Sankhya). The classical 16 are Gajakesari, Sunapha, Anapha, Dhurdhura, Kemadruma, Chandra Mangala, Budha-Aditya, the five Pancha Mahapurusha yogas (Ruchaka, Bhadra, Hamsa, Malavya, Sasa), and four wealth and poverty verdicts: Dhana, Daridra, Lakshmi and Dhana Malika. Every verdict carries a
familytag. - The evidence string names the rule that triggered or failed (kendra position, dignity, lordship, malefic drishti, retrograde state), and a wealth or poverty verdict names every classical combination that matched, so no verdict ships opaque.
- Raja Yoga is not chart-detected: it lives in a separate glossary of more than 300 entries at
GET /vedic-astrology/yoga/{id}, a lookup that inspects no chart.
Vedic yoga detection is the analysis that decides whether a specific planetary combination is actually formed in a birth chart, not whether it exists in a textbook. A yoga like Gajakesari only counts if Jupiter sits in a kendra from the Moon, is free of malefic aspect, and is not retrograde. Get one of those three rules wrong and you tell a user they have a powerful yoga they do not have. The chart-driven yoga detection endpoint solves this by computing the kundli from birth data, running the classical rules in code, and returning a present verdict with a plain-language evidence string for each of 48 named yogas. This post explains what those yogas are, how the detection rules work, why automated detection beats hand-rolled logic, and how to call the endpoint end to end.
What does the yoga detection endpoint actually do?
The endpoint takes birth data, computes a sidereal Vedic chart, and runs classical detection rules against it, returning a present boolean and a classical-text evidence string for each of 48 named yogas. It is a chart-driven analyzer, not a content lookup. You send date, time, latitude, longitude, and timezone, and you receive an array of yoga verdicts plus a total count of how many are present (0 to 48).
The detection is degree- and house-based. Each yoga has its own rule set drawn from classical sources: Brihat Parashara Hora Shastra (BPHS), Mantreswara Phaladeepika, Jataka Parijata, and B.V. Raman Three Hundred Important Combinations. The engine checks kendra relationships, house lordship, dignity (own sign, moolatrikona and exaltation), Vedic drishti from malefics, and retrograde state, then writes the result into the evidence field so the verdict is auditable rather than a black box.
Yoga verdicts from one chart. The 16 classical, including four wealth and poverty verdicts, plus all 32 Nabhasa, each returned with a present verdict, a classical family tag, and classical-text evidence.
Ready to build this? Vedic Astrology API gives you chart-driven yoga detection with classical-text evidence behind one key. See pricing.
Which yogas does the detector check?
The detector checks 48 yogas: all 32 Nabhasa, plus 16 classical made up of seven that involve the Moon or planetary conjunctions, the five Pancha Mahapurusha yogas formed from the lagna, and four wealth and poverty verdicts that each weigh a whole family of classical rules. Each row below lists the formation rule the engine actually applies and the quality it reports. The five Pancha Mahapurusha yogas require their planet in its own sign or exaltation AND in a kendra (1, 4, 7, 10) counted from the lagna, not from the Moon.
| Yoga | Formation rule applied | Quality |
|---|---|---|
| Gajakesari | Jupiter in a kendra from Moon, free of malefic drishti, not retrograde | Positive |
| Sunapha | A planet other than Sun, Moon, Rahu, Ketu in the 2nd from Moon | Positive |
| Anapha | A qualifying planet in the 12th from Moon | Positive |
| Dhurdhura | Qualifying planets in BOTH the 2nd and 12th from Moon | Positive |
| Kemadruma | No qualifying planet in either the 2nd or 12th from Moon | Negative |
| Chandra Mangala | Moon and Mars conjunct or opposed within a 10 degree orb | Negative |
| Budha-Aditya | Mercury conjunct Sun within a 10 degree orb | Positive |
| Ruchaka | Mars in own sign or exaltation AND in a kendra from lagna | Positive |
| Bhadra | Mercury in own sign or exaltation AND in a kendra from lagna | Positive |
| Hamsa | Jupiter in own sign or exaltation AND in a kendra from lagna | Positive |
| Malavya | Venus in own sign or exaltation AND in a kendra from lagna | Positive |
| Sasa | Saturn in own sign or exaltation AND in a kendra from lagna | Both |
| Dhana | At least one of the eleven catalogued wealth combinations of BPHS ch. 41 holds | Positive |
| Daridra | At least one evaluated poverty combination of BPHS ch. 42 or Phaladeepika ch. 6 holds | Negative |
| Lakshmi | 9th lord in own sign, moolatrikona or exaltation, in a kendra or trikona, with a strong Lagna lord (BPHS ch. 36) | Positive |
| Dhana Malika | The seven visible grahas fill every bhava from the 2nd to the 8th, Rahu and Ketu not counted (Jataka Parijata ch. 7) | Positive |
How does the Gajakesari rule decide present or absent?
Gajakesari uses a strict three-rule definition, and all three must hold for the verdict to be present. Rule one: Jupiter must sit in a kendra (1, 4, 7, or 10) counted from the Moon. Rule two: Jupiter must be free of Vedic drishti from a natural malefic, which the engine treats as Mars, Saturn, a debilitated Sun in Libra, or Rahu and Ketu sharing Jupiter sign. Rule three: Jupiter must not be retrograde.
When the verdict is absent, the evidence string names the exact rule that failed, for example that Jupiter is not in a kendra from the Moon, or that Jupiter is in kendra but aspected by Saturn, or that Jupiter is in kendra and clean but retrograde. When present, the evidence adds non-gating strengtheners drawn from classical practice: Moon outside the 6th, 8th, or 12th house, Moon at least four houses from the Sun, and Moon not in Scorpio. This separation of gating rules from strengtheners is what lets you show a user why a yoga formed, not just that it did.
How do the five Pancha Mahapurusha yogas form?
Each Pancha Mahapurusha yoga requires one specific planet to be both dignified and angular. The planet must be in its own sign or its exaltation sign, AND it must occupy a kendra (1, 4, 7, or 10) counted from the lagna, using whole-sign houses. The five yogas map one planet each: Ruchaka to Mars, Bhadra to Mercury, Hamsa to Jupiter, Malavya to Venus, and Sasa to Saturn. These rules follow BPHS chapter 75 and Phaladeepika chapter 6.
The evidence string spells out both halves of the test. If Venus is exalted in Pisces and sits in the 7th house from lagna, the Malavya verdict reports the dignity and the kendra house together. If the dignity is met but the planet falls outside a kendra, the evidence says so explicitly, which surfaces the common almost-present case. Counting from the lagna rather than the Moon is the detail most hand-rolled implementations get wrong, because the Moon-based yogas above count from the Moon and developers tend to reuse one helper for both.
How do the Dhana, Daridra, Lakshmi and Dhana Malika verdicts decide?
Each of the four wealth and poverty verdicts is one answer over a whole family of classical rules rather than a single combination. Dhana Yoga is present when any of the eleven catalogued wealth combinations of BPHS chapter 41 holds. Daridra Yoga weighs the poverty combinations of BPHS chapter 42 and Phaladeepika chapter 6. Lakshmi Yoga follows BPHS chapter 36, and Dhana Malika follows Jataka Parijata chapter 7.
The evidence string names every rule that matched and the exact condition it matched on, and a rule resting on a single authority is excluded from the verdict with a note saying so. For a birth on 4 July 1990 at 10:12 in Delhi, the detector returns Daridra Yoga as present with this evidence:
Daridra Yoga holds on 2 of the 8 rules evaluated. daridra-7 (BPHS 42.6): the Lagna lord Sun is joined by Jupiter (the 8th lord) and receives drishti from no natural benefic; daridra-11 (BPHS 42.11): the Lagna lord Sun is joined or aspected by the maraka lord Mercury, and the Navamsa Lagna lord Mercury by Saturn. Nine of the eleven catalogued Daridra rows are evaluated, as eight rules: daridra-4 and daridra-5 are the two halves of BPHS 42.4. daridra-8 and daridra-9 are excluded because B.V. Raman is their only authority, and an unverified rule may not decide a verdict.
The same chart also returns Lakshmi Yoga as present, because its 9th lord Mars stands in its own sign Aries in the 9th house. A wealth reading built on these verdicts cites the combination that fired rather than a bare label, and it can explain why a fortune yoga and a poverty combination sit in one chart.
Why does automated detection beat hand-rolled logic?
Automated detection wins because the rules are unforgiving and the failure mode is silent. Yoga logic mixes kendra counting from two different reference points (Moon for the conjunction yogas, lagna for Pancha Mahapurusha), dignity tables per planet, drishti rules where Mars aspects the 4th and 8th and Saturn the 3rd and 10th, and retrograde gating. A single sign-offset bug produces a confident wrong answer that no type checker catches.
The endpoint runs one verified rule set against an accurate sidereal chart, so the same birth data yields the same auditable verdict every time. The evidence field means you do not just get a boolean, you get the reasoning, which you can log, display, or test against. This is part of 50+ Vedic endpoints, itself part of 258+ endpoints across 18+ insight domains like Western astrology, numerology, and tarot, all behind one key. You skip stitching together libraries with different ayanamsa defaults and house conventions.
The detector covers 48 yogas, not the full glossary. There is a separate yoga glossary of more than 300 entries at GET /yoga and GET /yoga/{id} that is a dictionary lookup and inspects no chart. All 32 Nabhasa yogas ARE chart-detected, each tagged with its classical family, and so is Dhana Yoga, as one verdict over its eleven catalogued wealth combinations. Raja Yoga is not, and lives only in the glossary. Use the glossary for browsing and definitions, and the detect endpoint for present or absent verdicts.
How do I call the yoga detection endpoint?
Resolve coordinates first, then POST the birth data. Any chart endpoint needs latitude, longitude, and a timezone, so call GET /location/search?q={city} to get those values, then feed them into POST /vedic-astrology/yoga/detect. The response carries yogas (the array of 48 verdicts), total (count where present is true), and birthDetails (an echo of the resolved input). For each entry, read the present boolean and the evidence string.
# Step 1: resolve the city to coordinates and timezone
curl -s "https://roxyapi.com/api/v2/location/search?q=Delhi" \
-H "X-API-Key: YOUR_KEY"
# Step 2: detect yogas using the resolved values
curl -s "https://roxyapi.com/api/v2/vedic-astrology/yoga/detect" \
-H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"date": "1990-07-04",
"time": "10:12:00",
"latitude": 28.6139,
"longitude": 77.209,
"timezone": "Asia/Kolkata"
}'
const base = "https://roxyapi.com/api/v2";
const headers = { "X-API-Key": "YOUR_KEY" };
// Step 1: resolve the city
const loc = await fetch(`${base}/location/search?q=Delhi`, { headers });
const { cities } = await loc.json();
const c = cities[0];
// Step 2: detect yogas
const res = await fetch(`${base}/vedic-astrology/yoga/detect`, {
method: "POST",
headers: { ...headers, "Content-Type": "application/json" },
body: JSON.stringify({
date: "1990-07-04",
time: "10:12:00",
latitude: c.latitude,
longitude: c.longitude,
timezone: c.timezone,
}),
});
const data = await res.json();
console.log(`${data.total} of ${data.yogas.length} yogas present`);
for (const yoga of data.yogas) {
if (yoga.present) console.log(`${yoga.name}: ${yoga.evidence}`);
}
import requests
base = "https://roxyapi.com/api/v2"
headers = {"X-API-Key": "YOUR_KEY"}
# Step 1: resolve the city
loc = requests.get(f"{base}/location/search", params={"q": "Delhi"}, headers=headers)
city = loc.json()["cities"][0]
# Step 2: detect yogas
res = requests.post(
f"{base}/vedic-astrology/yoga/detect",
headers={**headers, "Content-Type": "application/json"},
json={
"date": "1990-07-04",
"time": "10:12:00",
"latitude": city["latitude"],
"longitude": city["longitude"],
"timezone": city["timezone"],
},
)
data = res.json()
print(f"{data['total']} of {len(data['yogas'])} yogas present")
for yoga in data["yogas"]:
if yoga["present"]:
print(f"{yoga['name']}: {yoga['evidence']}")
Full request and response schemas live in the API reference. Accuracy of the underlying chart positions is documented on the methodology page.
FAQ
What is Vedic yoga detection?
Vedic yoga detection is the process of scanning a birth chart to decide whether specific classical planetary combinations are actually formed. Each yoga has a precise rule, such as a planet being in a kendra from the Moon or in its exaltation sign. The detection endpoint applies these rules to a computed kundli and returns a present or absent verdict for each yoga.
How many yogas does the detection endpoint find?
The endpoint detects 48 yogas: 16 classical plus all 32 Nabhasa (3 Asraya, 2 Dala, 20 Akriti, 7 Sankhya). The classical sixteen are Gajakesari, Sunapha, Anapha, Dhurdhura, Kemadruma, Chandra Mangala, Budha-Aditya, the five Pancha Mahapurusha yogas (Ruchaka, Bhadra, Hamsa, Malavya, Sasa), and the Dhana, Daridra, Lakshmi and Dhana Malika wealth and poverty verdicts. The response includes a total field counting how many of the 48 are present in the given chart.
Does the detector find Raja Yoga or Dhana Yoga?
Dhana Yoga yes, Raja Yoga no. Dhana Yoga is one of the 48 chart-driven verdicts, decided over the eleven catalogued wealth combinations of BPHS chapter 41, and its evidence names every combination that matched. Raja Yoga appears only in the separate glossary of more than 300 entries at GET /yoga and GET /yoga/{id}, a dictionary lookup that inspects no birth chart. All 32 Nabhasa yogas are chart-detected too, each tagged with its classical family of Asraya, Dala, Akriti, or Sankhya.
What is the evidence field in the response?
The evidence field is a human-readable string that names the exact rule which triggered or failed the detection. For Gajakesari it might report that Jupiter is in a kendra from the Moon, free of malefic drishti, and not retrograde, along with strengtheners. For an absent yoga it states which rule failed, so you can display or log the reasoning rather than an opaque boolean.
What birth data does the yoga detection endpoint require?
It requires date in YYYY-MM-DD format, time in 24-hour HH:MM:SS format, latitude and longitude in decimal degrees, and an optional timezone as either decimal hours from UTC or an IANA name like Asia/Kolkata. Timezone defaults to 5.5 (IST). Resolve latitude, longitude, and timezone with GET /location/search before calling the endpoint.
Conclusion
Vedic yoga detection only earns trust when the rules are exact and the verdict is explainable, which is why the endpoint returns a present boolean and a classical-text evidence string for each of 48 named yogas rather than a guess. Resolve a city, POST the birth data, and read the array to power kundli apps, matrimonial tools, and astrology chatbots without rebuilding the math yourself. Start with the Vedic Astrology API and pricing.