LifeAstroAPILifeAstroAPI

API Reference / Vedic Astrology / Hindu Calendar

GET
10 credits

/v1/calendar/solstices

Equinoxes and solstices of a year — exact moment, Uttarayana/Dakshinayana, and sunrise/sunset/day length at your location.

What this tells you

Equinoxes and solstices for any year: the moments the tropical Sun reaches 0°, 90°, 180° and 270°. The December solstice is the tropical Uttarayana; Indian panchangs celebrate the sidereal Uttarayana at Makara Sankranti about 24 days later, and the response says so in the December `note` to avoid the common confusion.

`year` is required. lat/lon are optional; without them `location`, `sunrise`, `sunset` and `day_length` are omitted.

Request

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

example request
curl "https://api.lifeastroapi.com/v1/calendar/solstices?year=2027&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
yearyes2027Year (YYYY).
latno28.6139Latitude in decimal degrees.
lonno77.209Longitude in decimal degrees.

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
{
  "year": 2027,
  "tz": "Asia/Kolkata",
  "location": {
    "lat": 28.6139,
    "lon": 77.209,
    "tz": "Asia/Kolkata",
    "month_system": ""
  },
  "events": [
    {
      "event": "march_equinox",
      "name_en": "Vernal Equinox",
      "name_hi": "वसन्त विषुव",
      "sun_tropical_lon": 0,
      "jd": 2461485.350478,
      "utc": "2027-03-20T20:24:41Z",
      "local": "2027-03-21 01:55",
      "local_date": "2027-03-21",
      "ayana_begins": "",
      "sunrise": "06:24",
      "sunset": "18:33",
      "day_length": "12:09",
      "note": "Day and night of equal length; Sun enters tropical Aries."
    },
    {
      "event": "june_solstice",
      "name_en": "Summer Solstice",
      "name_hi": "ग्रीष्म अयनान्त",
      "sun_tropical_lon": 90,
      "jd": 2461578.090863,
      "utc": "2027-06-21T14:10:50Z",
      "local": "2027-06-21 19:41",
      "local_date": "2027-06-21",
      "ayana_begins": "Dakshinayana",
      "ayana_begins_hi": "दक्षिणायन",
      "sunrise": "05:24",
      "sunset": "19:22",
      "day_length": "13:58",
      "note": "Longest day in the northern hemisphere; the Sun turns south (tropical Dakshinayana begins)."
    }
  ]
}

Field reference

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

FieldTypeMeaning
yearinteger
Gregorian year, echoed (1800–2200).
example: 2027
tzstring
Timezone used for `local`, `sunrise` and `sunset`. Defaults to Asia/Kolkata.
example: "Asia/Kolkata"
locationobject
Present only when lat and lon are passed. `month_system` is always an empty string on this endpoint.
example: {"lat": 28.6139, "lon": 77.209, "tz": "Asia/Kolkata", "month_system": ""}
events[]array (4 items)
March equinox, June solstice, September equinox and December solstice, in that order.
example: […]
events[].eventstring
march_equinox, june_solstice, september_equinox or december_solstice.
example: "march_equinox"
events[].name_enstring
Vernal Equinox, Summer Solstice, Autumnal Equinox or Winter Solstice (northern-hemisphere names).
example: "Vernal Equinox"
events[].name_histring
Hindi name.
example: "वसन्त विषुव"
events[].sun_tropical_lonnumber
Tropical longitude of the Sun at the event: 0, 90, 180 or 270.
example: 0
events[].jdnumber
Julian Day (UT) of the event.
example: 2461485.350478
events[].utcstring (ISO 8601, UTC)
Exact moment in UTC.
example: "2027-03-20T20:24:41Z"
events[].localstring (YYYY-MM-DD HH:MM)
Same moment in the requested tz, rounded to the minute.
example: "2027-03-21 01:55"
events[].local_datestring (YYYY-MM-DD)
Local civil date of the event.
example: "2027-03-21"
events[].ayana_beginsstring
Tropical ayana that begins: "Dakshinayana" at the June solstice, "Uttarayana" at the December solstice, empty string for the equinoxes.
example: ""
events[].ayana_begins_histring
Hindi for `ayana_begins`. Omitted for the equinoxes.
example: "दक्षिणायन"
events[].sunrisestring (HH:MM)
Only when lat/lon are given: sunrise on `local_date` at the place, in tz.
example: "06:24"
events[].sunsetstring (HH:MM)
Only when lat/lon are given: sunset on `local_date`.
example: "18:33"
events[].day_lengthstring (HH:MM)
Only when lat/lon are given: sunset minus sunrise.
example: "12:09"
events[].notestring
One-line explanation. The December note says that the panchang's sidereal Uttarayana is Makara Sankranti, about 24 days later.
example: "Day and night of equal length; Sun enters tropical Aries."

Usage tips

How to use it

  • Longest / shortest day cards
    Pass the user's lat/lon (and tz) to get sunrise, sunset and day length on each event date.
  • Uttarayana vs Makara Sankranti
    Use `ayana_begins` for the astronomical ayana and /v1/festivals/month for the Sankranti festival date. Show both, with the one-line `note`.

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.