A public API that calculates Sankashti Chaturthi and Purnima (Full Moon) dates using astronomical calculations based on the Hindu lunar calendar (Panchang).
This project uses SunβMoon angular mathematics (Tithi calculation) to determine lunar events instead of hardcoding calendar dates.
The API provides endpoints to:
- Check if today is Sankashti
- Find the next Sankashti
- Get the full Sankashti calendar for a year
- Check if today is Purnima
- Find the next Purnima
- Generate the full Purnima calendar for a year
https://sankashti-api.vercel.app/
https://sankashti.onrender.com/
- π Accurate Sankashti calculation using moonrise rule
- π Purnima calculation using sunrise tithi rule
- π Full year lunar event calendar
- π Check specific dates
- π Public REST API
- β‘ Fast responses
- π‘ Ready for integration with apps, bots, and websites
In the Hindu calendar, time is divided into 30 lunar days called Tithis.
Each Tithi corresponds to 12Β° difference between Moon and Sun.
Angle = (Moon Longitude β Sun Longitude) % 360
# Sankashti Chaturthi API
A high-performance API providing accurate dates and timings for Sankashti Chaturthi.
## π Features
- Accurate fasting dates for the current year.
- Easy-to-use JSON format.
- Lightweight and fast response times.
## π Usage
Provide a simple example request:
```bash
curl [https://your-api-url.com/api/sankashti](https://your-api-url.com/api/sankashti)
Tithi = int(angle / 12) + 1
Sankashti occurs when:
Tithi = 19
Which corresponds to:
Krishna Paksha Chaturthi
Unlike most festivals, Sankashti is determined by Moonrise.
Rule:
If Chaturthi tithi is present at moonrise, that day is Sankashti.
Purnima occurs when:
Tithi = 15
Which corresponds to the Full Moon.
Rule:
If Purnima tithi is present at sunrise, that day is Purnima.
GET /sankashti/today
Example:
https://sankashti.onrender.com/sankashti/today
Response:
{
"date": "2026-03-21",
"is_sankashti": false
}GET /sankashti/next
Example:
https://sankashti.onrender.com/sankashti/next
Response:
{
"date": "2026-03-21",
"days_until": 6
}GET /sankashti/year/{year}
Example:
https://sankashti.onrender.com/sankashti/year/2026
Response:
{
"year": 2026,
"total": 12,
"dates": [
"2026-01-08",
"2026-02-07",
"2026-03-08"
]
}GET /sankashti/check/{date}
Example:
https://sankashti.onrender.com/sankashti/check/2026-03-21
Response:
{
"date": "2026-03-21",
"is_sankashti": true
}GET /purnima/today
Example:
https://sankashti.onrender.com/purnima/today
GET /purnima/next
Example:
https://sankashti.onrender.com/purnima/next
Response:
{
"date": "2026-04-02",
"days_until": 18
}GET /purnima/year/{year}
Example:
https://sankashti.onrender.com/purnima/year/2026
GET /purnima/check/{date}
Example:
https://sankashti.onrender.com/purnima/check/2026-04-02
FastAPI automatically generates interactive documentation:
https://sankashti.onrender.com/docs
You can test all endpoints directly in the browser.
- Python
- FastAPI
- Swiss Ephemeris
- Pytz
- Render (API deployment)
- Vercel (frontend)
moon-events-api
β
βββ main.py
βββ astronomy.py
βββ sankashti.py
βββ purnima.py
βββ requirements.txt
βββ README.md
Possible upgrades:
- Ekadashi API integration
- Amavasya calculation
- Full Panchang engine
- Nakshatra calculations
- Multi-location moonrise support
- Hindu festival calendar API
Hari Prajwal
If you find this project useful:
β Star the repository
π Share it with others
π Build something using the API
π Bringing traditional lunar calendars into modern software.