Hindu festival calendar
Compute all major Hindu festival dates for a given year and location. Returns 20 pan-Hindu festivals including solar sankrantis (Makar Sankranti, Vaisakhi) and tithi-based festivals (Diwali, Holi, Dussehra, Janmashtami, Ganesh Chaturthi, Ram Navami, and 12 others). All dates are astronomically computed — no hardcoded dates. Tithi festivals use the Sun-Moon elongation at local sunrise with Lahiri sidereal ayanamsa. Location is required for accurate sunrise-based tithi determination.
Endpoint
GET /v1/astro/panchanga/festivals
Request parameters
| Field | Type | Required | Description |
|---|---|---|---|
| year | integer | Yes | Calendar year |
| location | string | null | No | City name |
| latitude | number | null | No | |
| longitude | number | null | No | |
| timezone | string | null | No | IANA timezone |
Example request
- curl
- Python
- TypeScript
curl -X GET "https://api.asterwise.com/v1/astro/panchanga/festivals?year=2026&latitude=28.6139&longitude=77.209&timezone=Asia%2FKolkata" \
-H "Authorization: Bearer YOUR_API_KEY"
import asterwise
from asterwise.api.astrology_api import AstrologyApi
configuration = asterwise.Configuration(
host="https://api.asterwise.com",
access_token="YOUR_API_KEY",
)
with asterwise.ApiClient(configuration) as client:
api = AstrologyApi(client)
result = api.panchanga_festivals(year=2026,
latitude=28.6139,
longitude=77.209,
timezone="Asia/Kolkata")
print(result)
import { createClient, createConfig, panchangaFestivals } from 'asterwise';
const client = createClient(createConfig({
baseUrl: 'https://api.asterwise.com',
headers: { Authorization: 'Bearer YOUR_API_KEY' },
}));
const result = await panchangaFestivals({
client,
query: {
"year": 2026,
"latitude": 28.6139,
"longitude": 77.209,
"timezone": "Asia/Kolkata"
},
});
console.log(result.data);
Example response
Response fields
| Field | Type | Description |
|---|---|---|
| success | boolean | True if the request succeeded |
| message | string | Human-readable status message |
| data | object | |
| data.year | integer | Calendar year for which festivals are computed. |
| data.timezone | string | IANA timezone used for sunrise-based tithi calculations. |
| data.total | integer | Total number of festivals found. |
| data.festivals | array[object] | Festivals sorted chronologically by date. |
| data.festivals[].name | string | Festival name. |
| data.festivals[].date | string | Festival date in YYYY-MM-DD format. |
| data.festivals[].type | string | Festival type: 'solar' (sankranti-based) or 'tithi' (lunar day-based). |
| data.festivals[].description | string | Classical basis for the festival date (tithi or sankranti). |
| data.festivals[].significance | string | Cultural and religious significance. |
Errors
| Code | Description | Reference |
|---|---|---|
| authentication_failed | Missing or invalid API key. | authentication_failed |
| ephemeris_unavailable | Upstream ephemeris service error. | ephemeris_unavailable |
| insufficient_tier | API key tier does not include this endpoint. | insufficient_tier |
| internal_error | Unexpected server error. | internal_error |
| ip_rate_limit_exceeded | Too many requests in a short window. | ip_rate_limit_exceeded |
| payload_too_large | Request body exceeds the size limit. | payload_too_large |
| resource_not_found | Referenced resource was not found. | resource_not_found |
| validation_error | Request body failed schema validation. | validation_error |