How do I specify which country's holidays I want?
Use the country parameter with ISO2 codes (US), ISO3 codes (USA), or full names (United States), and comma-separate multiple values to merge calendars. If omitted, the API defaults to US.
Query holiday calendars by ISO2, ISO3, or full country name. Filter by year, month, or date range, and export straight to CSV for reporting.
This calls the live Public Holidays API. Pick countries and a period; the response includes US, EU, and ISO date formats for every holiday.
Production also accepts ISO3 codes and full names, e.g. USA or United States.
| date | holiday | country |
|---|---|---|
| Loading live response... | ||
Why Public Holidays API
Flexible country input
Pass ISO2 codes, ISO3 codes, or full country names, in any mix. US, USA, and United States all resolve to the same calendar.
Multi-country queries
Comma-separate countries to merge calendars in one request, ideal for teams and payroll spanning several regions.
Year, month, and range filters
Filter by year, narrow to a single month, or use start_date and end_date for exact windows like a fiscal quarter.
Three date formats per row
Every holiday includes date_us_format, date_eu_format, and date_iso_format, so no locale reformatting is needed downstream.
CSV export
Set format=csv on the same query to get an export-ready file for spreadsheets, BI tools, and reporting workflows.
Country metadata endpoint
GET /countries lists every supported country with ISO2, ISO3, and numeric codes for building pickers and validation.
/api/v1/public-holidays
Query holidays
Holiday rows for one or more countries, filtered by year, month, or explicit date range. JSON by default, CSV via format=csv.
Supported countries
Country metadata with ISO2 code, name, ISO3 code, and numeric code for building pickers.
Service health
Status, service name, version, timestamp, and uptime.
Prometheus metrics
Request counts and latency histograms in Prometheus exposition format.
| Parameter | Type | Required | Description |
|---|---|---|---|
| country | string | no | Country selector: ISO2, ISO3, full names, or comma-separated combinations. Defaults to US. |
| year | integer | no | Year filter, e.g. 2026. |
| month | integer | no | Month filter (1 to 12), used together with year. |
| start_date / end_date | string | no | Explicit date-range filter in YYYY-MM-DD format, as an alternative to year and month. |
| format | string | no | "json" (default) or "csv" for an export-ready file with the same columns. |
Error reference
Failures return an error, an optional message with fix hints, and a correlationId.
No valid countries resolved from the country input. Provide ISO2 codes (US), ISO3 codes (USA), or full names (United States).
Missing or invalid API key at the gateway. Send x-api-key or api_key with every request.
CSV was requested but the query matched zero holiday rows. Widen the filters and retry.
The holiday query exceeded 30 seconds. Narrow the country list or date range and retry.
Query or processing failure. Include the correlationId when reporting the issue.
Example error response
{
"error": "No valid countries found",
"message": "Please provide valid ISO2 codes (US), ISO3 codes (USA), or full country names (United States)",
"correlationId": "req-abc123"
}FAQ
Use the country parameter with ISO2 codes (US), ISO3 codes (USA), or full names (United States), and comma-separate multiple values to merge calendars. If omitted, the API defaults to US.
Yes. country=US,CA returns both calendars in one response, with each row labeled by country code and country name so you can group results downstream.
Every holiday row carries date_us_format (MM/DD/YYYY), date_eu_format (DD/MM/YYYY), and date_iso_format (YYYY-MM-DD), plus the raw timestamp, so no locale conversion is needed.
Add format=csv to any query. The API returns a CSV file with the same columns as the JSON response, ready for Excel, Google Sheets, or BI tools. If the query matches no rows, CSV requests return a 404.
Send your Datpaq API key as an x-api-key header or an api_key query parameter. Keys are created in the Datpaq dashboard and a free tier is included.
Query holiday calendars by country and period, get three date formats per row, and export CSV for reporting. No calendar files to maintain.