Nager.Date API

Beginner's Pick Calendar / No Auth Required Beginner HTTPS
Free to Use
88 A
Measured Score 0 50 100 Speed 25/30 Consistency 20/20 Security 20/20 Browser access 15/15 Transparency 8/15 TESTED 2026-08-10

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.

Measurement Record

What actually happened when we called this API from our own infrastructure. Every value below was recorded by the request, not copied from the provider's documentation.

Request
GET https://date.nager.at/api/v3/PublicHolidays/2024/US
Result
HTTP 200 · application/json · 3,700 bytes · compressed
Response time
44 ms (median of 3) · fastest 43 ms
Transport
TLSv1.3 · TLS_AES_256_GCM_SHA384 · certificate issued by Google Trust Services
Browser CORS
Allowed — Access-Control-Allow-Origin: *
Served by
cloudflare
Recorded
2026-08-10

Fields Returned

Top-level fields present in the response we captured, with the type and value we actually received.

Field Type Value received
date string (date) 2024-01-01
localName string New Year's Day
name string New Year's Day
countryCode string US
fixed boolean false
global boolean true
counties null null
launchYear null null
types array [1 item]

Captured Response

Captured from a real request to https://date.nager.at/api/v3/PublicHolidays/2024/US on 2026-08-10. Long arrays and nested objects are truncated to keep the shape readable.

JSON Response · Captured
[
  {
    "date": "2024-01-01",
    "localName": "New Year's Day",
    "name": "New Year's Day",
    "countryCode": "US",
    "fixed": false,
    "global": true,
    "counties": null,
    "launchYear": null,
    "types": [
      "Public"
    ]
  }
]

Implementation Example

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
const url = "https://date.nager.at/api/v3/PublicHolidays/2024/US";
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.

How This API Fails

We deliberately sent this API a broken request and recorded exactly what came back on 2026-08-10. Knowing the shape of an error before you hit it makes error handling much easier to write.

HTTP 404 Requesting a path that does not exist unknown

Returned an HTML error page rather than JSON — worth knowing if your client assumes every response can be parsed as JSON.

Common Errors & Troubleshooting

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

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.

Measured Score Breakdown

Live HTTP request to the API endpoint

Speed 25/30
Consistency 20/20
Security 20/20
Browser access 15/15
Transparency 8/15
Endpoint Response Time 44ms

Fully tested on Aug 10, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS NO
Category Calendar
Difficulty Beginner
Endpoint last called: 2026-08-10

Related Tags

Similar APIs

View All →