LifeAstroAPILifeAstroAPI

API Reference / Vedic Astrology / Panchang

GET
10 credits

/v1/panchang/varjyam

Varjyam window.

What this tells you

Varjyam (also called tyajya, "to be avoided") is a short window inside each nakshatra. The classical tables give, for each of the 27 nakshatras, a start offset in ghatis counted from the nakshatra's start, for a nakshatra 60 ghatis long. The API scales the offset and the 1.6-ghati duration to the real length of the nakshatra. Varjyam is considered inauspicious for most activities, especially travel and new ventures.

Request

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

example request
curl "https://api.lifeastroapi.com/v1/panchang/varjyam?date=2027-01-15&tz=Asia%2FKolkata&lat=28.6139&lon=77.209" \
  -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 (YYYY-MM-DD).
tzyesAsia/KolkataTimezone: IANA name (Asia/Kolkata) or UTC offset (+05:30).
latyes28.6139Latitude in decimal degrees.
lonyes77.209Longitude in decimal degrees.
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
{
  "date": "2027-01-15",
  "location": {
    "lat": 28.6139,
    "lon": 77.209,
    "alt": 0
  },
  "tz": "Asia/Kolkata",
  "nakshatra": "Revati",
  "nakshatra_index": 26,
  "offset_ghatika": 38,
  "window": {
    "start_jd": 2461420.889678,
    "end_jd": 2461420.916943,
    "start_local": "2027-01-15 14:51:08",
    "end_local": "2027-01-15 15:30:24"
  },
  "duration_seconds": 2355
}

Field reference

Every field in the response, with its type, a real example, and what it means.

FieldTypeMeaning
datestring (YYYY-MM-DD)
The requested date.
example: "2027-01-15"
locationobject
Echo of lat, lon and alt (metres).
example: { "lat": 28.6139, "lon": 77.209, "alt": 0 }
tzstring
Echo of the tz you sent. All *_local times are in this zone.
example: "Asia/Kolkata"
nakshatrastring
Nakshatra running at local sunrise of `date`. The Varjyam window lies inside this nakshatra. Translated when you pass `locale`.
example: "Revati"
nakshatra_indexinteger (0–26)
0 = Ashwini … 26 = Revati.
example: 26
offset_ghatikanumber
Where Varjyam starts, in ghatis from the start of the nakshatra, on a 60-ghati scale.
example: 38
Jyotish: Each nakshatra has its own fixed offset (tyajya ghati) in the classical tables (Muhurta Chintamani).
window.start_jd / end_jdnumber
Start and end of Varjyam as Julian Day in UT.
example: 2461420.889678
window.start_local / end_localstring (YYYY-MM-DD HH:MM:SS)
Start and end of Varjyam in local time (request tz). Can be on the day before `date`, as here.
example: "2027-01-15 14:51:08"
duration_secondsinteger
Length of the window in seconds. It is 1.6 ghatis of the nakshatra's real length, so it varies with the Moon's speed (about 33–44 minutes).
example: 2355

Usage tips

How to use it

  • Check the date of the window
    The window belongs to the nakshatra running at sunrise. That nakshatra often began the day before, so the window can fall before sunrise, even on the previous date. It can also fall after the next sunrise. Compare it with the day's sunrise before labelling it "today".
  • Nakshatras that start later in the day
    Only the sunrise nakshatra is used. To get the Varjyam of a nakshatra that begins later in the day, call again with the next date.
  • Pair with Amrit Kalam
    Varjyam and Amrit Kalam are computed the same way from different offset tables. Show them together: "avoid this, prefer this".

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.