API Documentation
Integrate reliable Nepali Tithi, Panchanga, Lagan, and Planetary details directly into your applications.
⚡ Overview & Base URL
The Nepali Date API provides standard HTTP REST endpoints returning clean JSON responses. All response payloads follow a unified data format.
https://nepali-date-api.vercel.app(or local http://localhost:3000)🔑 API Authentication & Mobile App Headers
All API requests require authentication via an API Key/Token. Mobile apps and external clients must pass the token in standard HTTP headers. Default Mobile App Token: np_live_mobile_app_default
Authorization: Bearer YOUR_API_TOKENx-api-key: YOUR_API_TOKEN🌐 Public Endpoints
/api/panchanga/[year]/[month]Fetch the complete Panchanga data array for a specific Nepali Year and Month.
yearnumber: Nepali Bikram Sambat year (e.g.2081,2082,2083)monthnumber: Nepali month (1 for Baisakh, 12 for Chaitra)
curl -X GET "http://localhost:3000/api/panchanga/2083/4"/api/panchanga/by-english-date/[YYYY-MM-DD]Fetch a specific day's Panchanga details using its Gregorian (English) date equivalent.
datestring: Gregorian date formatted asYYYY-MM-DD(e.g.2026-07-26)
curl -X GET "http://localhost:3000/api/panchanga/by-english-date/2026-07-26"/api/panchanga/available-monthsRetrieve all available Nepali years and months currently stored in the database.
curl -X GET "http://localhost:3000/api/panchanga/available-months"🔒 Admin Endpoints (Authenticated)
Note: Mutation endpoints require an active admin session established via the Admin Panel.
/api/panchangaAdd or update single day Panchanga record in the database.
/api/panchanga/importImport a bulk monthly Panchanga JSON file generated by OCR parser.
/api/panchanga/deleteDelete all Panchanga records for a specific year and month.
💻 Code Example & Response Payload
JavaScript / TypeScript (Fetch API):
async function getNepaliToday() {
const today = '2026-07-26';
const res = await fetch(
`https://nepali-date-api.vercel.app/api/panchanga/by-english-date/${today}`
);
const json = await res.json();
console.log('Today Panchanga:', json.data);
}
getNepaliToday();Sample JSON Response:
{
"success": true,
"data": {
"year": 2083,
"month": 4,
"gate": 10,
"baar": "आइतबार",
"englishDate": "2026-07-26",
"tithi": "12",
"tithiName": "द्वादशी",
"tithiEnds": "18:45",
"sunrise": "05:16",
"sunset": "18:52",
"festivals": "प्रदोष व्रत"
}
}