WhenOff

Public Holidays API

Free REST API for public holidays worldwide. No authentication required. CORS enabled.

Base URL

https://www.whenoff.com

Parameters

country: ISO 3166-1 alpha-2 code (e.g. IT, US, GB). year: 2024–2028.

Rate limiting

No rate limit. Please be reasonable. Responses are cached for 24 hours.

Endpoints

GET/api/holidays?type=countries

List all available countries

Response
{
  "count": 122,
  "countries": [
    { "code": "IT", "name": "Italy" },
    { "code": "US", "name": "United States" },
    ...
  ]
}
GET/api/holidays?country={CC}&year={YYYY}

Get holidays for a country and year

Response
{
  "country": "IT",
  "year": 2026,
  "count": 11,
  "holidays": [
    {
      "date": "2026-01-01",
      "name": "New Year's Day",
      "localName": "Capodanno",
      "countryCode": "IT",
      "global": true,
      "counties": null,
      "types": ["Public"]
    },
    ...
  ]
}
GET/api/holidays?country={CC}&year={YYYY}&type=long-weekends

Get long weekends for a country and year

Response
{
  "country": "IT",
  "year": 2026,
  "count": 5,
  "longWeekends": [
    {
      "startDate": "2026-01-01",
      "endDate": "2026-01-04",
      "dayCount": 4,
      "needBridgeDay": true,
      "bridgeDays": ["2026-01-02"]
    },
    ...
  ]
}
GET/api/calendar?country={CC}&year={YYYY}

Download .ics calendar file for a country

Response
Returns .ics file (text/calendar)
GET/api/calendar?country={CC}&year={YYYY}&slug={slug}

Download .ics for a single holiday