API reference › Calendar

Tithi Timings API

Tithi start and end moments between two dates, and the tithi at each sunrise

GET/v1/calendar/tithis

1 credit · Secret or publishable key · getTithis

from and to are local dates at the place, at most 62 days apart (inclusive). tithis: every tithi overlapping those days, to the minute (the instants do not depend on the place). sunrise_tithis: the tithi at each local sunrise (upper limb, refracted), the one a day is named after. Where the Sun does not rise on one of the days (polar latitudes) the request is refused.

Parameters

NameInTypeNotes
from requiredquerystring (date) e.g. "1990-08-13"
to requiredquerystring (date) e.g. "1990-08-13"
lat requiredquerynumber ≥ -90 · ≤ 90
lon requiredquerynumber ≥ -180 · ≤ 180

Response

JSON { data, meta, warnings }, where data is:

  • from string (date) required

    e.g. "1990-08-13"

  • to string (date) required

    e.g. "1990-08-13"

  • tithis array of object required
    • number integer required

      ≥ 1 · ≤ 30

    • id string required
    • paksha string required

      one of shukla, krishna

    • start string (date-time) required
    • end string (date-time) required
  • sunrise_tithis array of object required
    • date string (date) required

      e.g. "1990-08-13"

    • sunrise string (date-time) required
    • tithi object required
      Fields
      • number integer required

        ≥ 1 · ≤ 30

      • id string required
      • paksha string required

        one of shukla, krishna

Errors: 400, 401, 403, 404, 422, 429, 500. See error codes.

Example request

curl 'https://api.astrologics.in/v1/calendar/tithis?from=2026-11-16&to=2026-11-22&lat=28.6139&lon=77.209' \
  -H 'Authorization: Bearer al_test_YOUR_KEY'
Node.js
const res = await fetch("https://api.astrologics.in/v1/calendar/tithis?from=2026-11-16&to=2026-11-22&lat=28.6139&lon=77.209", {
  headers: { Authorization: "Bearer al_test_YOUR_KEY" },
});
console.log(JSON.stringify(await res.json(), null, 2));
Python
import json
import urllib.error
import urllib.request

req = urllib.request.Request(
    "https://api.astrologics.in/v1/calendar/tithis?from=2026-11-16&to=2026-11-22&lat=28.6139&lon=77.209",
    method="GET",
    headers={"Authorization": "Bearer al_test_YOUR_KEY"},
)
try:
    with urllib.request.urlopen(req) as res:
        print(json.dumps(json.load(res), indent=2, ensure_ascii=False))
except urllib.error.HTTPError as err:
    print(err.code, err.read().decode())
PHP
<?php
$ch = curl_init('https://api.astrologics.in/v1/calendar/tithis?from=2026-11-16&to=2026-11-22&lat=28.6139&lon=77.209');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer al_test_YOUR_KEY'],
    CURLOPT_RETURNTRANSFER => true,
]);
echo curl_exec($ch), PHP_EOL;

Example response

200 OK · 3,146 characters
{
  "data": {
    "from": "2026-11-16",
    "to": "2026-11-22",
    "tithis": [
      {
        "number": 6,
        "id": "shashthi",
        "paksha": "shukla",
        "start": "2026-11-14T17:55:00.000Z",
        "end": "2026-11-15T20:32:00.000Z"
      },
      {
        "number": 7,
        "id": "saptami",
        "paksha": "shukla",
        "start": "2026-11-15T20:32:00.000Z",
        "end": "2026-11-16T22:51:00.000Z"
      },
      {
        "number": 8,
        "id": "ashtami",
        "paksha": "shukla",
        "start": "2026-11-16T22:51:00.000Z",
        "end": "2026-11-18T00:36:00.000Z"
      },
      {
        "number": 9,
        "id": "navami",
        "paksha": "shukla",
        "start": "2026-11-18T00:36:00.000Z",
        "end": "2026-11-19T01:37:00.000Z"
      },
      {
        "number": 10,
        "id": "dashami",
        "paksha": "shukla",
        "start": "2026-11-19T01:37:00.000Z",
        "end": "2026-11-20T01:47:00.000Z"
      },
      {
        "number": 11,
        "id": "ekadashi",
        "paksha": "shukla",
        "start": "2026-11-20T01:47:00.000Z",
        "end": "2026-11-21T01:02:00.000Z"
      },
      {
        "number": 12,
        "id": "dwadashi",
        "paksha": "shukla",
        "start": "2026-11-21T01:02:00.000Z",
        "end": "2026-11-21T23:27:00.000Z"
      },
      {
        "number": 13,
        "id": "trayodashi",
        "paksha": "shukla",
        "start": "2026-11-21T23:27:00.000Z",
        "end": "2026-11-22T21:08:00.000Z"
      }
    ],
    "sunrise_tithis": [
      {
        "date": "2026-11-16",
        "sunrise": "2026-11-16T01:14:00.000Z",
        "tithi": {
          "number": 7,
          "id": "saptami",
          "paksha": "shukla"
        }
      },
      {
        "date": "2026-11-17",
        "sunrise": "2026-11-17T01:15:00.000Z",
        "tithi": {
          "number": 8,
          "id": "ashtami",
          "paksha": "shukla"
        }
      },
      {
        "date": "2026-11-18",
        "sunrise": "2026-11-18T01:16:00.000Z",
        "tithi": {
          "number": 9,
          "id": "navami",
          "paksha": "shukla"
        }
      },
      {
        "date": "2026-11-19",
        "sunrise": "2026-11-19T01:17:00.000Z",
        "tithi": {
          "number": 9,
          "id": "navami",
          "paksha": "shukla"
        }
      },
      {
        "date": "2026-11-20",
        "sunrise": "2026-11-20T01:18:00.000Z",
        "tithi": {
          "number": 10,
          "id": "dashami",
          "paksha": "shukla"
        }
      },
      {
        "date": "2026-11-21",
        "sunrise": "2026-11-21T01:18:00.000Z",
        "tithi": {
          "number": 12,
          "id": "dwadashi",
          "paksha": "shukla"
        }
      },
      {
        "date": "2026-11-22",
        "sunrise": "2026-11-22T01:19:00.000Z",
        "tithi": {
          "number": 13,
          "id": "trayodashi",
          "paksha": "shukla"
        }
      }
    ]
  },
  "meta": {
    "request_id": "req_example",
    "api_version": "v1",
    "engine_version": "2026.10.10",
    "mode": "live",
    "credits_charged": 1
  },
  "warnings": []
}
Try it

Leave empty to use the shared demo key (limited). Test keys only: never charged. Kept in this browser tab and sent through this site to the API. Create one

More in Calendar

Get a free API key Calendar product page