Calendarific API
calendarific.com · Developer Tools
Public holidays and observances for 230+ countries and 3,000+ states/regions. JSON API. Free tier: 1,000 requests/month.
Authentication
API Key
Free API key at calendarific.com. Pass as ?api_key= query parameter.
Sample Requests
GET
Get US holidays
Get all US public holidays for 2026.
https://calendarific.com/api/v2/holidays?year=2026&api_key=YOUR_KEY&country=US
Hover any highlighted part to learn what it does
curl -X GET "https://calendarific.com/api/v2/holidays?year=2026&api_key=YOUR_KEY&country=US"
import requests
params = {
"year": "2026",
"api_key": "YOUR_KEY",
"country": "US"
}
response = requests.get(
"https://calendarific.com/api/v2/holidays",
params=params,
)
print(response.json())const url = new URL('https://calendarific.com/api/v2/holidays');
url.searchParams.set('year', '2026');
url.searchParams.set('api_key', 'YOUR_KEY');
url.searchParams.set('country', 'US');
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://calendarific.com/api/v2/holidays")
q := baseURL.Query()
q.Set("year", "2026")
q.Set("api_key", "YOUR_KEY")
q.Set("country", "US")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://calendarific.com/api/v2/holidays")
uri.query = URI.encode_www_form({
"year" => "2026",
"api_key" => "YOUR_KEY",
"country" => "US"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://calendarific.com/api/v2/holidays?" . http_build_query([
"year" => "2026",
"api_key" => "YOUR_KEY",
"country" => "US"
]);
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Postman Setup Guide
- Get a free API key at calendarific.com
- GET /holidays?api_key=KEY&country=US&year=2026
- Country code: ISO 3166-1 alpha-2 (US, GB, DE, FR, JP, etc.)
- Type filter: ?type=national,religious,observance
- Location-specific: ?location=us-ny for New York state holidays