Docs / Dates and calendars
Holidays API
Bank, government and stock market holidays.
Holidays for a year, filterable by kind and state. Each entry says who observes it.
https://api.dharun.devNo key needed for most600 units a minute, 3000 with a free keyThis page as MarkdownHolidays in a year
GET/v1/holidays/{year}
| Parameter | Description |
|---|---|
yearpath, required | Four-digit year. |
typequery | Kind of holiday. clearing days are ones on which the market trades but nothing settles. One of: bank, central_gazetted, central_restricted, market, clearing. |
statequery | State code or name, for example TN or Tamil Nadu. |
monthquery | Month number, 1 to 12. |
curl
curl "https://api.dharun.dev/v1/holidays/2026?type=market&utm_medium=docs"JavaScript
const response = await fetch("https://api.dharun.dev/v1/holidays/2026?type=market&utm_medium=docs");
const body = await response.json();
if (!response.ok) throw new Error(body.error.message);
console.log(body.data);Python
import requests
response = requests.get("https://api.dharun.dev/v1/holidays/2026?type=market&utm_medium=docs", timeout=10)
body = response.json()
if not response.ok:
raise RuntimeError(body["error"]["message"])
print(body["data"])Try it here
Change the values and send the request from your browser. Needs JavaScript.
Response, with lists and long text shortened
{
"data": [
{
"date": "2026-01-15",
"weekday": "Thursday",
"name": "Municipal Corporation Election - Maharashtra",
"type": "market",
"region": "NSE equities",
"states": [
"*"
]
},
{
"date": "2026-01-26",
"weekday": "Monday",
"name": "Republic Day",
"type": "market",
"region": "NSE equities",
"states": [
"*"
]
},
{
"date": "2026-02-15",
"weekday": "Sunday",
"name": "Mahashivratri",
"type": "market",
"region": "NSE equities",
"states": [
"*"
]
}
],
"meta": {
"total": 20,
"source": {
"name": "Trading and clearing holidays, NSE equities",
"url": "https://www.nseindia.com/resources/exchange-communication-holidays",
"licence": "Official publication",
"version": "2026",
"retrieved": "2026-11-12T00:38:28Z",
"attribution": "Trading and clearing holidays from the National Stock Exchange of India, capital market segment."
},
"note": "Compiled from official notifications. Dates of festivals fixed by moon sighting can change; check the issuing authority before relying on a date."
}
}Holidays as a calendar to subscribe to
GET/v1/holidays/{year}.ics
The same list as an iCalendar feed (RFC 5545): one all-day event per holiday. Add the address to Google Calendar (Other calendars, From URL), Outlook or a phone, and holidays added later appear by themselves. The same filters as the JSON list.
The answer returns an iCalendar file (text/calendar) to subscribe to; errors are JSON as everywhere else.
| Parameter | Description |
|---|---|
yearpath, required | Four-digit year, followed by .ics. |
typequery | Kind of holiday. One of: bank, central_gazetted, central_restricted, market, clearing. |
statequery | State code or name, for example TN or Tamil Nadu. |
monthquery | Month number, 1 to 12. |
curl
curl -o holidays.ics "https://api.dharun.dev/v1/holidays/2026.ics?type=bank&state=TN&utm_medium=docs"Python
import requests
response = requests.get("https://api.dharun.dev/v1/holidays/2026.ics?type=bank&state=TN&utm_medium=docs", timeout=60)
response.raise_for_status()
open("holidays.ics", "wb").write(response.content)Try it here
Change the values and send the request from your browser. Needs JavaScript.
Data source
Bank holidays in India, 2026. Retrieved 2026-11-12T00:38:28Z. Licence: Official publication. Bank holidays from the Reserve Bank of India holiday matrix, by regional office.
Central government holidays, 2026, 2027. Retrieved 2026-10-13. Licence: Official publication. Gazetted and restricted holidays for central government offices, from the yearly Department of Personnel and Training memorandum.
Trading and clearing holidays, NSE equities, 2026. Retrieved 2026-11-12T00:38:28Z. Licence: Official publication. Trading and clearing holidays from the National Stock Exchange of India, capital market segment.
Guides
Using an AI assistant? Connect the MCP server and it can call this API by itself. Want every endpoint on one bench? Open the playground.