API Overview

This open-source REST API serves official Indian government holidays for the Central Government and all 36 States and Union Territories. No API key or sign-up is needed.

Cold starts: The API runs on a free server that sleeps after 15 minutes without traffic. The first request after that can take about a minute; requests after it are fast.

Base URL

All requests are issued to the production deployment URL below. Always use HTTPS.

https://calendar-api-d7a8.onrender.com

API Endpoints

The API provides five lightweight, database-free routes to query holiday data. Review details and parameter schemas below.

GET

/v1/holidays

Returns sorted chronological lists of holidays. If a 2-letter region code is passed, state-specific holidays are dynamically combined with central holidays, and matching duplicates are automatically filtered out.

Query Parameters

ParameterRequiredTypeDescription
countryYesstringMust be IN.
yearYesnumber4-digit year, e.g. 2026.
regionNostring2-letter state code (any case) or central. Defaults to central.
scopeNostringall (default) adds the Central list to a state's holidays. state returns only the state's own list, with no Central entries and no cross-list duplicates.

Example Response

{
  "country": "IN",
  "year": 2026,
  "region": "KA",
  "data": [
    {
      "name": "New Year's Day",
      "date": "2026-01-01",
      "type": "restricted_holiday"
    },
    {
      "name": "Makar Sankranti",
      "date": "2026-01-14",
      "type": "restricted_holiday"
    },
    {
      "name": "Republic Day",
      "date": "2026-01-26",
      "type": "gazetted_holiday"
    }
  ],
  "meta": {
    "apiVersion": "v1",
    "totalResults": 3,
    "generatedAt": "2026-05-28T07:00:00Z"
  }
}
GET

/v1/date/is-holiday

Quickly verifies if a specific calendar date is a public holiday.

Query Parameters

ParameterRequiredTypeDescription
countryYesstringMust be IN.
dateYesstringFormat YYYY-MM-DD.
regionNostring2-letter state code (any case) or central.
scopeNostringall (default) adds the Central list to a state's holidays. state returns only the state's own list, with no Central entries and no cross-list duplicates.

Example Response

{
  "country": "IN",
  "year": 2026,
  "region": "central",
  "data": [
    {
      "date": "2026-01-26",
      "is_holiday": true,
      "holidays": [
        {
          "name": "Republic Day",
          "date": "2026-01-26",
          "type": "gazetted_holiday",
          "region": [
            "IN"
          ],
          "description": "Gazetted Holiday",
          "source": "https://www.india.gov.in/calendar"
        }
      ]
    }
  ],
  "meta": {
    "apiVersion": "v1",
    "totalResults": 1,
    "generatedAt": "2026-05-28T07:00:00Z"
  }
}
GET

/v1/date/next-holiday

Finds the next upcoming holiday(s) chronologically after a given date. Automatically wraps around to check the first holiday of the following year.

Query Parameters

ParameterRequiredTypeDescription
countryYesstringMust be IN.
dateYesstringBase date in format YYYY-MM-DD.
regionNostring2-letter state code (any case) or central.
scopeNostringall (default) adds the Central list to a state's holidays. state returns only the state's own list, with no Central entries and no cross-list duplicates.

Example Response

{
  "country": "IN",
  "year": 2026,
  "region": "central",
  "data": [
    {
      "name": "Hazarat Ali's Birthday",
      "date": "2026-01-03",
      "type": "restricted_holiday",
      "region": [
        "IN"
      ],
      "description": "Restricted Holiday",
      "source": "https://www.india.gov.in/calendar"
    }
  ],
  "meta": {
    "apiVersion": "v1",
    "totalResults": 1,
    "generatedAt": "2026-05-28T07:00:00Z"
  }
}
GET

/v1/holidays/range

Filters holidays within a custom range, supporting boundary traversals.

Query Parameters

ParameterRequiredTypeDescription
countryYesstringMust be IN.
startYesstringStart date boundary YYYY-MM-DD.
endYesstringEnd date boundary YYYY-MM-DD.
regionNostring2-letter state code (any case) or central.
scopeNostringall (default) adds the Central list to a state's holidays. state returns only the state's own list, with no Central entries and no cross-list duplicates.

Example Response

{
  "country": "IN",
  "year": 2026,
  "region": "KA",
  "data": [
    {
      "name": "New Year's Day",
      "date": "2026-01-01",
      "type": "restricted_holiday",
      "region": [
        "IN"
      ],
      "description": "Restricted Holiday",
      "source": "https://www.india.gov.in/calendar"
    }
  ],
  "meta": {
    "apiVersion": "v1",
    "totalResults": 1,
    "generatedAt": "2026-05-28T07:00:00Z"
  }
}
GET

/v1/calendar

Constructs a full 365 or 366 day dataset tagged with weekends, holidays, names, classifications and business day evaluations.

Query Parameters

ParameterRequiredTypeDescription
countryYesstringMust be IN.
yearYesnumber4-digit year, e.g. 2026.
regionNostring2-letter state code (any case) or central.
scopeNostringall (default) adds the Central list to a state's holidays. state returns only the state's own list, with no Central entries and no cross-list duplicates.
restrictedNostringholiday (default) counts restricted (optional) holidays as days off. working keeps days that only have restricted holidays as working days.

Example Response

{
  "country": "IN",
  "year": 2026,
  "region": "KA",
  "data": [
    {
      "date": "2026-01-25",
      "day": "Sunday",
      "is_weekend": true,
      "is_holiday": false,
      "holiday_name": null,
      "holiday_type": null,
      "is_working_day": false
    },
    {
      "date": "2026-01-26",
      "day": "Monday",
      "is_weekend": false,
      "is_holiday": true,
      "holiday_name": "Republic Day",
      "holiday_type": "gazetted_holiday",
      "is_working_day": false
    },
    {
      "date": "2026-01-27",
      "day": "Tuesday",
      "is_weekend": false,
      "is_holiday": false,
      "holiday_name": null,
      "holiday_type": null,
      "is_working_day": true
    }
  ],
  "meta": {
    "apiVersion": "v1",
    "totalResults": 3,
    "generatedAt": "2026-05-28T07:00:00Z"
  }
}

Response Schema

All success requests return JSON matching the standard schema format:

  • country: ISO alpha 2 country code (IN).
  • year: The calendar year requested.
  • region: The state code requested, or central.
  • data: Array containing corresponding holiday records. Each holiday carries level: state when it is on the requested state's own list, otherwise central. Filter on level to get one state's list only.
  • meta: Contains payload metadata like apiVersion, totalResults and generation timestamp. When part of a request falls in a year with no published data yet, yearsWithoutData lists those years (for example a next-holiday lookup on 31 December).

Successful responses are cacheable for one hour (Cache-Control: public, max-age=3600).

Errors & Rate Limits

When queries fail, validation checks fail, or limits are exceeded, the API returns a standardized JSON structure with the corresponding HTTP status code.

Error Response Format

All error responses include the following three parameters:

  • error: Always set to true.
  • message: Human-readable explanation of why the query failed.
  • status: The HTTP status code corresponding to the response header.

Validation Check Catalog

StatusAPI Error Message (`message`)Trigger Condition
400 Bad RequestMissing required parameter: countryThe `country` query parameter was not provided.
400 Bad RequestMissing required parameter: yearThe `year` parameter is required for lists and calendar endpoints.
400 Bad RequestInvalid year format. Use a 4-digit numberThe `year` value is not formatted as YYYY (e.g. `26` or `20265`).
400 Bad RequestRegion parameter must be a 2-letter state/UT code or 'central'The state code did not match the 2-letter format. Any case is accepted (`ka` works like `KA`).
400 Bad RequestMissing required parameter: dateRequired parameter `date` is missing for checkers or next-holiday queries.
400 Bad RequestInvalid date format. Use YYYY-MM-DDThe `date`, `start`, or `end` values are not matching standard ISO formats.
400 Bad RequestMissing required parameters: start and endThe `/holidays/range` endpoint requires both query bounds.
400 Bad RequestStart date cannot be after end dateThe start range parameter occurs chronologically after the end parameter.
400 Bad RequestParameter 'scope' must be one of: all, state`scope` or `restricted` has a value outside the listed options.
400 Bad RequestParameter '<name>' must be given once as plain textA query parameter was repeated (e.g. `country=IN&country=IN`) or sent as a nested value.
400 Bad RequestRange cannot span more than 5 calendar yearsThe `/holidays/range` start and end fall in more than five calendar years.
404 Not FoundOnly IN is supported in v1The `country` query parameter is not `IN`.
404 Not FoundData not available for this yearData has not been scraped or generated for the requested year folder.
404 Not FoundRegion not foundThe state/UT code provided does not exist in our system database.
404 Not FoundData not available for the requested year rangeThe range query dates do not match any year directories on the server.
404 Not FoundEndpoint not foundThe requested API route path or method is invalid.
503 Service UnavailableHoliday data unavailable for this regionThe data file for that year and region is missing or unreadable on the server. Retry later.
500 Internal Server ErrorInternal Server ErrorAn unexpected server error. No internal details are returned.
429 Rate LimitedToo many requests, please try again laterYour IP exceeded 100 queries within a 15-minute window.

Example Validation Error Response (400)

Errors always return in the standard format below, making handling consistent across environments.

{
  "error": true,
  "message": "Missing required parameter: country",
  "status": 400
}