Nager.Date API

⭐ Beginner's Pick Calendar / No Auth Required Beginner HTTPS
Free to Use Varies (check documentation)

Overview

Nager.Date is a completely free, open-source REST API providing public holidays for over 90 countries with no API key required. It supports querying holidays by year and country, checking whether a specific date is a public holiday, and listing all supported countries. The project is actively maintained and widely used in production applications.

💡

Beginner Tip

This is an ideal first API: no sign-up, no key, and clean JSON output. Fetch all US public holidays for 2024 with a single call to https://date.nager.at/api/v3/PublicHolidays/2024/US.

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

[].date Date of the public holiday in YYYY-MM-DD format.
[].localName Name of the holiday in the local language of the country.
[].name English-language name of the holiday.
[].countryCode ISO 3166-1 alpha-2 country code the holiday belongs to.
[].fixed True if the holiday always falls on the same calendar date every year.
[].types List of holiday type strings such as "Public", "Bank", "School", or "Optional".

Implementation Example

const url = "https://date.nager.at/";
const response = await fetch(url);
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

404 Not Found Unsupported country code or wrong API version prefix
Use /api/v3/ prefix and uppercase ISO 3166-1 alpha-2 country codes. Call /api/v3/AvailableCountries to see the full supported list.
Empty array returned Querying a year outside the supported data range
Nager.Date supports years roughly from 2000 up to 5 years into the future; years outside this range return an empty array.
CORS error in browser Nager.Date does not enable CORS on its endpoints
Call the API from your server-side backend rather than directly from browser JavaScript to avoid CORS restrictions.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 20/20
🔒 Security 15/15
🛠 Developer XP 12/20
✓ Reliability 7/15
Response Time 42ms

Fully tested on Apr 5, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS NO
Category Calendar
Difficulty Beginner
Verified: 2026-04-04

Similar APIs

View All →