Holidays API - GET /holidays/{country}/{year}
REST-convention read endpoint. Pass a 2-letter ISO 3166-1 alpha-2 country code and a 4-digit year in the path. Returns every public holiday for that country-year pair with date, English name, local name, types array, counties (for regional holidays), and launch year when known. Supported year range: 1900-2100.
Code examples
curl -X POST https://api.botoi.com/v1/holidays/{country}/{year} \
-H "Content-Type: application/json" \
-d '{"country":"US","year":2026}'When to use this API
Cache holiday calendars in a static build
Run this GET at build time for every country you support and commit the JSON alongside your site. Users get offline-capable holiday data with zero runtime API calls.
Cross-check delivery SLA calculators
When quoting a delivery date, subtract every holiday in the destination country-year from the working-day count. The counties field lets you refine for regional variants where it matters.
Power "what is today?" homepage widgets
Fetch the current year once, then compare today's date to the holidays array client-side. Show banners like "Offices closed for Thanksgiving" without a server round-trip per view.
Frequently asked questions
Why is this a GET endpoint?
What does the counties field contain?
What year range is supported?
What happens for a country with no holiday data?
Get your API key
Free tier includes 5 requests per minute with no credit card required. Upgrade for higher limits.