LifeAstroAPILifeAstroAPI

API Reference / Vedic Astrology / Prashna

GET
30 credits

/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.

Pass the question moment as `date`, `time`, `tz` and the querent's place as `lat`, `lon` (all required except `time`, which defaults to 12:00). `house` is required (1–12).

Request

All requests require an Authorization header with your dv_live_* API key.

example request
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.

NameRequiredExampleDescription
dateyes1990-01-15Birth date (YYYY-MM-DD).
tzyesAsia/KolkataBirth place timezone: IANA name (Asia/Kolkata) or UTC offset (+05:30).
latyes19.076Birth place latitude in decimal degrees.
lonyes72.8777Birth place longitude in decimal degrees.
houseyes7
timeno10:30Birth time (HH:MM, 24-hour, local). Defaults to 12:00.
question_houseno—House number representing the subject of the question
ayanamsano—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.

200 response
{
  "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.

FieldTypeMeaning
answerstring
"yes" when tendency_score ≥ 2, "no" when it is ≤ −2, otherwise "uncertain".
example: "no"
tendency_scoreinteger
Sum of the rule points. Positive leans yes, negative leans no.
example: -3
support_factorsstring[]
Text of each rule that added points. Empty array when none.
example: ["Lagna lord Mercury in kendra (house 10)", …]
contra_factorsstring[]
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 factors
    A 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.