Public Holidays API

Calendar / API Key Intermediate HTTPS CORS
Varies by plan (check documentation)

Overview

Abstract's Public Holidays API delivers structured data about national, regional, and religious holidays for countries worldwide. Each response includes the holiday name, date, type, and which regions within the country observe it. The API supports filtering by country, year, and month, returning results as a JSON array.

💡

Beginner Tip

Sign up at abstractapi.com for a free API key that includes 500 requests per month. Always pass the country code in ISO 3166-1 alpha-2 format (e.g. US, GB, JP) — using a full country name will return an error.

Available Data

country name and code
population
capital city
region and subregion
flag image URL
event dates and names

Example Response

JSON Response
{
  "name": "Japan",
  "capital": "Tokyo",
  "population": 125800000,
  "region": "Asia",
  "languages": [
    "Japanese"
  ],
  "flag": "https://flagcdn.com/jp.svg",
  "currencies": [
    {
      "code": "JPY",
      "name": "Japanese yen"
    }
  ]
}

Field Reference

name Official name of the holiday in English
name_local Localized name of the holiday in the country's primary language
description Brief description of the holiday's cultural or historical significance
country ISO 3166-1 alpha-2 country code for which the holiday applies
date Date of the holiday in YYYY-MM-DD format
type Classification of the holiday such as 'National', 'Religious', or 'Observance'

Implementation Example

const url = "https://www.abstractapi.com/holidays-api";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

401 Unauthorized Missing or invalid API key
Include your key as the api_key query parameter: ?api_key=YOUR_KEY
422 Unprocessable Entity Invalid or unsupported country code format
Use ISO 3166-1 alpha-2 codes such as US, GB, DE. Check the AbstractAPI docs for the full supported country list.
Empty array response No holidays exist for the specified month, or the country code has no data for that period
Try without the month filter first to confirm the country code is valid, then narrow by month.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 20/20
🔒 Security 15/15
🛠 Developer XP 17/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS YES
Category Calendar
Difficulty Intermediate
Verified: 2026-04-07

Similar APIs

View All →