LifeAstroAPILifeAstroAPI

API Reference / Vedic Astrology / Prashna

GET
30 credits

/v1/prashna/answer

Prashna yes/no answer synthesis.

Try it in the Playground

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=2027-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
dateyes2027-01-15Date the question is asked (YYYY-MM-DD).
tzyesAsia/KolkataTimezone of the place of the question: IANA name (Asia/Kolkata) or UTC offset (+05:30).
latyes19.076Latitude of the place of the question, in decimal degrees.
lonyes72.8777Longitude of the place of the question, in decimal degrees.
houseyes7
timeno10:30Local time the question is asked (HH:MM, 24-hour).
question_houseno—House number representing the subject of the question
ayanamsano—Ayanamsa (sidereal offset) to use. Defaults to lahiri.
langno—Language of names, labels and readings in the response: `en` (default), `hi`, `mr`, `gu`, `bn`, `te`, `ta`, `kn`, `ml`, `pa`. `locale` is accepted as an alias.

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": "yes",
  "tendency_score": 2,
  "support_factors": [
    "Moon in same house as Saturn or Sun"
  ],
  "contra_factors": []
}

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": "unknown or revoked API key",
    "request_id": "52a520f261d3db37"
  }
}

402 Payment Required

{
  "error": {
    "code": "daily_cap_exceeded",
    "message": "free-plan daily limit reached — try again tomorrow or upgrade to a paid plan",
    "request_id": "52a520f261d3db37"
  }
}

429 Too Many Requests

{
  "error": {
    "code": "rate_limited",
    "message": "rate limit exceeded — retry after 12 seconds",
    "request_id": "52a520f261d3db37"
  }
}

Try it

Get a dv_live_* key from your dashboard and paste into the cURL snippet above. New accounts get 7,500 welcome credits plus 1,500 free credits a month. Sign up.