API Reference / Vedic Astrology / Prashna
/v1/prashna/answer
Prashna yes/no answer synthesis.
What this tells you
A yes/no tendency for a question, from the Prashna chart. Pass the question moment and place, plus `house` (1–12): the house the question belongs to (for example 7 for marriage or partnership, 10 for career). Rules and points: +2 lagna lord in a kendra (1, 4, 7, 10); +2 lagna lord in a trikona (5, 9); +2 Moon in the same house as the lagna lord or the question-house lord (skipped when the Moon is the lagna lord); +1 question-house lord in a kendra or trikona; −2 for each malefic (Saturn, Mars, Rahu, Ketu) in the 1st house; −2 when the 8th lord conjoins or aspects the lagna lord's house (7th aspect for all, plus Mars 4th/8th, Jupiter 5th/9th, Saturn 3rd/10th; skipped when the 8th lord is the lagna lord); −1 lagna lord debilitated; −1 lagna lord combust. Houses are whole-sign. Costs 30 credits.
Request
All requests require an Authorization header with your dv_live_* API key.
curl "https://api.lifeastroapi.com/v1/prashna/answer?date=1990-01-15&tz=Asia%2FKolkata&lat=19.076&lon=72.8777&house=7&time=10%3A30" \
-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 | 1990-01-15 | Birth date (YYYY-MM-DD). |
tz | yes | Asia/Kolkata | Birth place timezone: IANA name (Asia/Kolkata) or UTC offset (+05:30). |
lat | yes | 19.076 | Birth place latitude in decimal degrees. |
lon | yes | 72.8777 | Birth place longitude in decimal degrees. |
house | yes | 7 | |
time | no | 10:30 | Birth time (HH:MM, 24-hour, local). Defaults to 12:00. |
question_house | no | — | House number representing the subject of the question |
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.
{
"answer": "no",
"tendency_score": -3,
"support_factors": [],
"contra_factors": [
"8th lord Mercury aspects/conjoins lagna lord Saturn",
"Lagna lord Saturn is combust"
]
}Field reference
Every field in the response, with its type, a real example, and what it means.
| Field | Type | Meaning |
|---|---|---|
| answer | string | "yes" when tendency_score ≥ 2, "no" when it is ≤ −2, otherwise "uncertain". example: "no" |
| tendency_score | integer | Sum of the rule points. Positive leans yes, negative leans no. example: -3 |
| support_factors | string[] | Text of each rule that added points. Empty array when none. example: ["Lagna lord Mercury in kendra (house 10)", …] |
| contra_factors | string[] | Text of each rule that took points away. Empty array when none. example: ["8th lord Saturn aspects/conjoins lagna lord Mercury", …] |
Usage tips
How to use it
- Always show factorsA bare "yes" is unsatisfying. Render `support_factors` and `contra_factors` so users understand why.
- Uncertain answers"uncertain" covers scores from −1 to +1. Show both factor lists so the user sees what pulled each way.
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.