Accurate Public Holiday Data
For Every Country/Region
Free and open-source API providing comprehensive public holiday information for 60 countries/regions worldwide. Perfect for scheduling, calendar apps, and HR systems.
Why Choose Our API?
🌐
60 Countries/Regions Covered
Comprehensive coverage across Asia-Pacific, Europe, Americas, Middle East, and Africa with accurate regional data.
📅
Historical & Future Data
Access holiday data from 2020 through 2026, with accurate dates for all years.
🎯
Rich Metadata
Includes local names, holiday types, duration support.
Try It Out
API Endpoint
GET /api/public-holidays?year=2026&code=cnAPI Documentation
Available Endpoints
GET
/api/public-holidaysGet public holidays for a specific country and year
Parameters: year, code
GET
/api/yearsGet all supported years
Parameters: none
GET
/api/countriesGet all supported countries/regions with codes and names
Parameters: none
Get Public Holidays
GET /api/public-holidaysQuery Parameters
| Parameter | Type | Description |
|---|---|---|
year | string | Year (e.g., "2020", "2023", "2026") |
code | string | ISO 2-letter country/region code (e.g., "cn", "us", "uk") |
Response Format
{data: [0: {localName: "元旦"name: "New Year's Day"code: "CN"fixed: trueglobal: truecounties: nulllaunchYear: nulltypes: [0: "Public"]startDate: "2026-01-01T00:00:00.000Z"endDate: "2026-01-01T23:59:59.999Z"}]}Supported Countries & Regions
United Arab Emirates
AE
Argentina
AR
Austria
AT
Australia
AU
Barbados
BB
Bangladesh
BD
Belgium
BE
Brazil
BR
Canada
CA
Switzerland
CH
Chile
CL
China
CN
Example Usage
JavaScript / Fetch API
1fetch('https://public-holidays.toolhub.run/api/public-holidays?year=2026&code=cn')
2 .then(res => res.json())
3 .then(console.log)cURL Command
1curl "https://public-holidays.toolhub.run/api/public-holidays?year=2026&code=cn"Python / Requests
1import requests
2
3response = requests.get(
4 'https://public-holidays.toolhub.run/api/public-holidays',
5 params={'year': '2026', 'code': 'cn'}
6)
7data = response.json()
8print(data)