API Reference / Vedic Astrology / Muhurta
/v1/muhurta/vivah
Wedding muhurta composite score.
What this tells you
Scores one proposed wedding date and time. It checks 9 factors — tithi, weekday, Moon nakshatra, Sun sign (the Sun in Sagittarius, Capricorn or Pisces scores 0 and adds a warning), Rahu Kaal, Yamaganda, Durmuhurta, Panchaka and a Chandra Bala proxy — and turns the weighted total into a 0–100 score with a grade. Use this to check one candidate time; use /v1/muhurta/best-time to scan a date range.
Request
All requests require an Authorization header with your dv_live_* API key.
curl "https://api.lifeastroapi.com/v1/muhurta/vivah?date=2027-01-15&tz=Asia%2FKolkata&lat=28.6139&lon=77.209&time=10%3A00" \
-H "Authorization: Bearer YOUR_API_KEY"Query parameters
Checked against the API: a parameter is marked required when the request fails without it.
| Name | Required | Example | Description |
|---|---|---|---|
date | yes | 2027-01-15 | Date (YYYY-MM-DD). |
tz | yes | Asia/Kolkata | Timezone: IANA name (Asia/Kolkata) or UTC offset (+05:30). |
lat | yes | 28.6139 | Latitude in decimal degrees. |
lon | yes | 77.209 | Longitude in decimal degrees. |
time | no | 10:00 | Local time (HH:MM, 24-hour). Defaults to 12:00. |
ayanamsa | no | — | Ayanamsa (sidereal offset) to use. Defaults to lahiri. |
Response (200 OK)
The real response to the example request above, generated from the API itself. Long arrays are trimmed to their first two items. Field names are stable across versions.
{
"date": "2027-01-15",
"time": "10:00",
"lat": 28.6139,
"lon": 77.209,
"ayanamsa": "lahiri",
"result": {
"score": 82,
"grade": "good",
"factors": [
{
"name": "Tithi",
"value": "Saptami",
"weight": 12,
"score": 12,
"ok": true
},
{
"name": "Vara",
"value": "Friday",
"weight": 10,
"score": 10,
"ok": true
}
],
"warnings": [
"Sun is in Capricorn (Kharmaas/inauspicious solar month) — vivah should be avoided",
"Moon is in Revati — Panchaka dosha is active"
],
"is_acceptable": true
}
}Field reference
Every field in the response, with its type, a real example, and what it means.
| Field | Type | Meaning |
|---|---|---|
| date, time | string | Local date and time that were scored, echoed from `date` and `time` (time defaults to 12:00). example: "2027-01-15", "10:00" |
| lat, lon | number | Location, used for sunrise, sunset and the time windows. example: 28.6139, 77.209 |
| ayanamsa | string | Ayanamsa used for the Moon nakshatra and Sun sign. example: "lahiri" |
| result.score | integer (0–100) | Points earned × 100 / total weight, rounded down. example: 82 |
| result.grade | string | excellent (90+), good (80–89), acceptable (60–79), inauspicious (below 60). example: "good" |
| result.is_acceptable | boolean | True when score is 60 or more. example: true |
| result.factors[] | array | The 9 factors checked: Tithi, Vara, Nakshatra, SunRashi, RahuKaal, Yamaganda, Durmuhurta, Panchaka, ChandraBala. example: […] |
| result.factors[].name | string | Factor name. example: "Tithi" |
| result.factors[].value | string | Value at the scored moment (tithi name, weekday, nakshatra, Sun sign, or "Shukla paksha" / "Krishna paksha" for ChandraBala). Left out for RahuKaal, Yamaganda, Durmuhurta and Panchaka. example: "Saptami" |
| result.factors[].weight | integer | Maximum points for the factor: Tithi 12, Vara 10, Nakshatra 15, SunRashi 7, RahuKaal 8, Yamaganda 5, Durmuhurta 5, Panchaka 7, ChandraBala 10 (79 in total). example: 12 |
| result.factors[].score | integer | Points earned, from 0 to weight. A neutral tithi or nakshatra earns partial points. example: 12 |
| result.factors[].ok | boolean | True when the factor is auspicious. A factor can be false and still earn partial points. example: true |
| result.warnings | string[] | null | Problems found, as plain sentences. null when there are none. example: ["Vara Sunday is inauspicious for vivah", …] |
Usage tips
How to use it
- Show factor barsOne bar per factor, filled to score/weight. Users like to see exactly why a time is good or bad.
- Warnings override gradeIf `warnings` is not empty (for example Kharmaas or Rahu Kaal), show the warnings prominently even when the score looks fine.
- Handle null warnings`warnings` is null, not an empty array, when nothing is wrong. Treat both the same.
Errors
Every error follows the same envelope. Use the error.code field (not the message) for conditional logic in your integration.
401 Unauthorized
{
"error": {
"code": "unauthorized",
"message": "missing or invalid API key",
"request_id": "req_01hqy7k8c3e7m1n"
}
}402 Payment Required
{
"error": {
"code": "trial_exhausted",
"message": "your free trial credits are exhausted — pick a plan to continue",
"top_up_url": "https://lifeastroapi.com/pricing",
"request_id": "req_01hqy7k8c3e7m1n"
}
}429 Too Many Requests
{
"error": {
"code": "rate_limited",
"message": "rate limit exceeded; retry after 12 seconds",
"request_id": "req_01hqy7k8c3e7m1n"
}
}Try it
Get a dv_live_* key from your dashboard and paste into the cURL snippet above. New accounts get 1,500 free credits. Sign up.