Deep DiveApril 20267 min read

Mangal Dosha API: Developer's Guide to Mars Affliction Detection

"Is there Mangal Dosha?" is one of the most searched questions in Indian matrimonial contexts. Understanding how it is computed — and how to expose it correctly in an app — is essential for any developer building for the matrimony market.

What is Mangal Dosha?

Mangal Dosha (also called Manglik Dosha or Kuja Dosha) occurs when Mars is placed in certain houses of the birth chart. The traditional rule identifies six houses that create this condition. The severity varies by school of thought — some texts include only 4 houses, others all 6.

HouseNameWhy it matters
1thAscendantPhysical self — Mars here makes the native Mars-like in temperament
2th2nd houseFamily and speech — affects family harmony after marriage
4th4th houseHome and peace — affects domestic happiness
7th7th houseMarriage partner — most sensitive house for marital matters
8th8th houseLongevity of spouse — traditionally the most severe placement
12th12th houseBed comforts and private life — affects physical compatibility

Dosha cancellation

Mangal Dosha is cancelled under several conditions. The API computes these automatically:

The API call

const params = new URLSearchParams({
  api_key: 'vai_your_key',
  dob: '01/10/1977', tob: '11:40',
  lat: '11', lon: '77', tz: '5.5'
})

// Check both endpoints — they cover different rule sets
const [mangalDosh, manglikDosh] = await Promise.all([
  fetch(`/api/v1/dosha/mangal-dosh?${params}`).then(r => r.json()),
  fetch(`/api/v1/dosha/manglik-dosh?${params}`).then(r => r.json()),
])

Response

// mangal-dosh response
{
  "is_manglik": false,
  "mars_house": 7,
  "is_dosha_cancelled": false,
  "dosha_conditions": [
    { "house": 1, "present": false, "description": "Mars in Ascendant" },
    { "house": 2, "present": false, "description": "Mars in 2nd house" },
    { "house": 4, "present": false, "description": "Mars in 4th house" },
    { "house": 7, "present": false, "description": "Mars in 7th house" },  // ← checked
    { "house": 8, "present": false, "description": "Mars in 8th house" },
    { "house": 12,"present": false, "description": "Mars in 12th house" }
  ],
  "cancellation_factors": [
    "Mars is in own sign or exaltation — dosha cancelled",
    "7th lord is strong — mitigating factor"
  ],
  "recommendation": "No significant Mangal Dosha. No restrictions on marriage."
}

Two endpoints — what's the difference?

/dosha/mangal-dosh uses the classical Parashari 6-house rule set with cancellation logic.

/dosha/manglik-dosh applies the same rules but from the Moon and Venus ascendant as additional reference points — a stricter check used by some regional traditions. Show both if your audience is in South India or follows stricter Brahminical traditions.

All dosha endpoints available on the free plan.

Get free API key →