Documentation

1. Introduction

The Holiday API returns public holidays and observances by country and/or religion. The Business days endpoint (GET /api/business-days) uses the same API key authentication. All requests require authentication with an API key. You can create and manage API keys in your dashboard. The Free plan (default) uses the same base URL and the same API key so you can test integration before going live.

2. Free plan (default)

Every verified account starts on the Free plan. You can use the same endpoints, parameters, and authentication to build and test your integration. When you outgrow the Free plan, upgrade in the dashboard.

What works the same

You get access to the same Holiday API: the same base URL,GET /api/holidays, and the same query parameters (country, religion,from, to, lang, region,provisional, type, scope). GET /api/business-days is also available with the same authentication and the response shape is identical, so you can develop and test your code against the real API without changing it when you upgrade.

Limitations

  • Monthly request quota: The Free plan includes a fixed number of requests per calendar month. When you reach the quota, requests are blocked until the next month or until you upgrade.
  • Feature limits: The Free plan limits API keys, languages, and subdivision-holiday access. See pricing for full limits.
  • No overage on Free: The Free plan does not include paid overage. Upgrade to continue once you hit the limit.

To get the full result set and production-ready limits, choose a plan from pricing or go to Usage or Billing in your dashboard.

3. Authentication

Send your API key in the Authorization header as a Bearer token. Create keys on the API Keys page in your dashboard.

curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.holidaydb.com/api/holidays?country=US"

4. Base URL

Use https://api.holidaydb.com for all API requests. For CURL and server-side integrations you must use this absolute URL.

5. GET /api/holidays

Returns holidays filtered by country and/or religion. At least one of country or religion is required.

Query parameters

ParameterTypeDescription
countrystringComma-separated 2-letter ISO country codes (e.g. US, DE, FR).
religionstringComma-separated religion slugs (e.g. christian, islamic).
regionstringSubdivision code (e.g. US-DC, DE-BY). Applies to the first country when multiple are listed. Pro and Full only; on Basic, sending region returns 403 (omit for national-only).
fromdateStart date (YYYY-MM-DD).
todateEnd date (YYYY-MM-DD).
langstringISO 639-1 language code (e.g. de, fr). Full plan only.
provisionaltrue | falseFilter by tentative (true) or confirmed (false) dates.
substitutetrue | falseFilter by substitute/observed days: true (only substitutes), false (exclude), or omit (both).
includestringOptional. Comma-separated: canonical (embed canonical on substitute rows), substitute (embed substitutes on canonical rows). meta is not supported here (use the default holiday fields on each object).
typestringpublic_holiday or observance; comma-separated for multiple.
scopestringnational or subnational; comma-separated for multiple.

Response: JSON array of holiday objects with uuid, country_code, religion_slug, type, scope, region_codes, region_names, start_date, end_date, provisional, substitute, summary, language. For country calendars (country_code not null), type and scope describe territorial categories (public holiday vs observance, national vs subnational). For religious calendars (religion_slug not null and often country_code null), type and scope may be "unknown" and should not be interpreted as territorial; use religion_slug (and dates) to work with those observances. Substitute holidays include canonical_uuid. Use include=canonical to embed the canonical holiday for each substitute; use include=substitute to embed a substitutes array for each canonical.

Examples

Request

curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.holidaydb.com/api/holidays?country=US"

Sample response

[
  {
    "uuid": "550e8400-e29b-41d4-a716-446655440000",
    "country_code": "US",
    "religion_slug": null,
    "type": "public_holiday",
    "scope": "national",
    "region_codes": [],
    "region_names": [],
    "start_date": "2026-07-04",
    "end_date": "2026-07-04",
    "provisional": false,
    "summary": "Independence Day",
    "language": "en"
  }
  // ... more holiday objects in the full response
]

6. GET /api/business-days

Try it without writing code

The business days calculator on this site lets you choose a country and year, optionally a single month, and optionally a state or province when regional public holidays should come off the count. You can also set which weekdays count as work. The result matches this API.

Returns how many working days fall in a calendar month or full year for one ISO country. By default the working week is Western Monday to Friday (ISO weekdays 1,2,3,4,5); override with optional weekdays. By default only national public holidays are excluded. With optional region, the count also excludes subnational public holidays whose region_codes include that ISO 3166-2 code: the same rule as GET /api/holidays?country=...&region=... (national days are always included; region does not mean “region-only”). This endpoint requires the same Bearer API key and token abilities as GET /api/holidays.

Subdivision filtering requires a plan that includes subdivision holidays (Pro/Full), same as the holidays API.

Query parameters

ParameterTypeDescription
countrystringRequired. Two-letter ISO 3166-1 alpha-2 country code (e.g. KE, NG).
regionstringOptional. ISO 3166-2 subdivision (e.g. US-CA or CA with country=US). Excludes national public holidays plus subnational public holidays tagged for that region. Omit for national-only counts. Subdivision filtering is only available on Pro and Full plans. On Basic, if you send region, the API returns 403 with an error that subdivision holidays are not included (there is no silent fallback to national-only); omit region for national-only counts on Basic.
yearintegerRequired in calendar mode. Must fall within a rolling window around the server's current calendar year: by default five years before through five years after (inclusive), so the range stays close to the holiday data we publish. Do not send with from/to.
monthintegerOptional in calendar mode. Month 1-12; omit for the full calendar year (January 1 through December 31). Do not send with from/to.
fromdateRange mode: start date YYYY-MM-DD, inclusive. Use with to only (no year/month). Same counting rules as calendar mode. The inclusive calendar-day span from from through to may not exceed 731 days (about two years).
todateRange mode: end date YYYY-MM-DD, inclusive. Must be on or after from. Together with from, the span is at most 731 inclusive calendar days.
weekdaysstringOptional. Comma-separated ISO weekday numbers 1 (Monday) through 7 (Sunday), e.g. 1,2,3,4,5 for Mon-Fri (the default when omitted). Duplicates are ignored; order is normalized ascending. Invalid values return 422.
langstringOptional. Language for holiday names (ISO 639-1 code like de or fr). Applies to the holidays array when include=1. Defaults to en. If a translation is unavailable (or your plan only includes English), HolidayDB falls back to English.
includestringOptional. On: 1 or true adds a holidays array (full row metadata and nested canonical / substitutes when the calendar defines them). Off: omit, empty, 0, or false (no holidays in the JSON).

Response: JSON object with country_code, region (normalized code or null), weekdays (array of integers actually used for the count), year and month (both null in range mode), range (from, to dates, always the resolved inclusive window), and business_days (integer count). When include is 1 or true, the response also has holidays: public holidays that fed the count (national only when region is omitted; national plus matching subnational when region is set), with full fields as in the last example tab.

If we do not yet cover that country's calendar, the API returns 404 with code: "country_not_supported" and an error message (not the same body as "Country not found" on GET /api/holidays).

The first four example tabs omit include (no holidays in the sample JSON). The last tab shows include=1 with a holidays array.

The examples below use 2026. The business_days numbers were checked manually against official national rules: US federal holidays (OPM); German holidays observed in all states on that date; Canada federal statutory holidays (July 2026 has Canada Day on a Wednesday only). Weekend-fixed holidays do not reduce the weekday count. Live API values follow HolidayDB's stored holidays and should match for the same rules; if a row is added or corrected in our data, counts can change slightly.

Examples

Request

curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.holidaydb.com/api/business-days?country=US&year=2026&month=1"

Sample response

{
  "country_code": "US",
  "region": null,
  "weekdays": [1, 2, 3, 4, 5],
  "year": 2026,
  "month": 1,
  "range": { "from": "2026-01-01", "to": "2026-01-31" },
  "business_days": 20
}

7. GET /api/working-hours

Try it without writing code

The working hours calculator on this site uses the same holiday rules as business-days, plus a workday duration (workday) so you can calculate total working minutes and hours.

Returns how many working minutes (and a convenience hours/minutes breakdown) fall in a calendar month, full year, or inclusive date range for one ISO country. It uses the same weekday and public-holiday rules as GET /api/business-days, then multiplies by a required workday duration.

Subdivision filtering (region) requires a plan that includes subdivision holidays (Pro/Full), same as the holidays API and business-days.

Query parameters

ParameterTypeDescription
countrystringRequired. Two-letter ISO 3166-1 alpha-2 country code (e.g. KE, NG).
regionstringOptional. ISO 3166-2 subdivision (e.g. US-CA or CA with country=US). Same rules and plan limits as business-days.
yearintegerRequired in calendar mode. Same rolling window rules as business-days. Do not send with from/to.
monthintegerOptional in calendar mode. Month 1-12; omit for the full calendar year. Do not send with from/to.
fromdateRange mode: start date YYYY-MM-DD, inclusive. Use with to only (no year/month). Same max span rules as business-days.
todateRange mode: end date YYYY-MM-DD, inclusive. Must be on or after from.
weekdaysstringOptional. Same as business-days: comma-separated ISO weekday numbers 1 7. Default Mon-Fri.
langstringOptional. Language for holiday names (ISO 639-1 code like de). Applies to the holidays array when include=1. Defaults to en, with English fallback when unavailable (or when your plan only includes English).
includestringOptional. Same as business-days: 1/true includes a holidays array; omit/empty/0/false omits it.
workdaystringRequired. Workday duration in H:MM or HH:MM format (e.g. 08:00, 7:30). Must be at least 00:01 and at most 24:00.

Response: JSON object with the same base fields as business-days plus working_days, workday, workday_minutes, working_minutes, and working_hours (hours/minutes breakdown).

Examples

Request

curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.holidaydb.com/api/working-hours?country=US&year=2026&month=1&workday=08:00"

Sample response

{
  "country_code": "US",
  "region": null,
  "weekdays": [1, 2, 3, 4, 5],
  "year": 2026,
  "month": 1,
  "range": { "from": "2026-01-01", "to": "2026-01-31" },
  "working_days": 20,
  "workday": "08:00",
  "workday_minutes": 480,
  "working_minutes": 9600,
  "working_hours": { "hours": 160, "minutes": 0 }
}

8. GET /api/salary-proration

Try it without writing code

Use the salary proration calculator on this site to prorate a salary by working days inside a payroll period (weekdays minus public holidays).

Prorates a salary amount based on working days in a selected window inside a payroll period. Working days are counted as selected ISO weekdays (default Mon-Fri) minus public holidays (and optional regional holidays when region is used).

You can choose the payroll period via calendar mode (year/month) or via explicit dates (period_from/period_to). Optionally, provide a custom proration window (from/to) inside that payroll period; otherwise the window is the full payroll period.

Query parameters

ParameterTypeDescription
countrystringRequired. Two-letter ISO 3166-1 alpha-2 country code (e.g. US, KE).
regionstringOptional. ISO 3166-2 subdivision (Pro/Full). Adds subnational public holidays on top of national rules.
weekdaysstringOptional. Comma-separated ISO weekday numbers 17. Default is Mon-Fri (1,2,3,4,5).
langstringOptional. Language for holiday names (ISO 639-1 code like de). Applies to the holidays array when include=1. Defaults to en, with English fallback when unavailable (or when your plan only includes English).
salarystringRequired. Decimal string amount (e.g. 5000, 5000.00, 1234.5).
salary_scaleintegerOptional. Decimal places to normalize salary to (0–6). Default: 2.
yearintegerCalendar mode. Required when using month or when period_from/period_to are omitted. Same rolling year window rules as business-days.
monthintegerCalendar mode. Optional 1–12; omit for a full-year payroll period. Do not combine with period_from/period_to.
period_fromdateExplicit period mode. Payroll period start date YYYY-MM-DD, inclusive. Must be used together with period_to. Do not combine with year/month.
period_todateExplicit period mode. Payroll period end date YYYY-MM-DD, inclusive. Must be on or after period_from.
fromdateOptional proration window start YYYY-MM-DD, inclusive. Must be inside the payroll period. Use with to.
todateOptional proration window end YYYY-MM-DD, inclusive. Must be inside the payroll period.
includestringOptional. Same semantics as business-days: 1/true includes a holidays array for the proration window; omit/empty/0/false omits it.

Response: JSON object with period_working_days, window_working_days, ratio, salary, and prorated_salary. Use period for the payroll period bounds and range for the proration window.

Examples

Request

curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.holidaydb.com/api/salary-proration?country=US&year=2026&month=1&salary=5000"

Sample response

{
  "country_code": "US",
  "region": null,
  "weekdays": [1, 2, 3, 4, 5],
  "year": 2026,
  "month": 1,
  "period": { "from": "2026-01-01", "to": "2026-01-31" },
  "range": { "from": "2026-01-01", "to": "2026-01-31" },
  "period_working_days": 20,
  "window_working_days": 20,
  "ratio": "1.000000",
  "salary": "5000.00",
  "salary_scale": 2,
  "prorated_salary": "5000.00"
}

9. GET /api/leave-pto

Try it without writing code

Use the Leave / PTO calculator on this site to model accrual, leave taken, and ending balance (hours + days).

Calculates accrued leave, taken leave (optional leave window), and ending balance for a reporting period. Working time is derived from selected weekdays minus public holidays for the selected country and optional region.

Query parameters

ParameterTypeDescription
countrystringRequired. Two-letter ISO 3166-1 alpha-2 country code (e.g. US, DE).
regionstringOptional. ISO 3166-2 subdivision (Pro/Full). Adds subnational public holidays on top of national rules.
weekdaysstringOptional. Comma-separated ISO weekday numbers 17. Default is Mon-Fri (1,2,3,4,5).
workdaystringRequired. Workday duration in H:MM or HH:MM format (e.g. 08:00, 7:30). Used to compute hours and derived days.
langstringOptional. Language for holiday names (ISO 639-1 code like de). Applies to the holidays array when include=1. Defaults to en, with English fallback when unavailable (or when your plan only includes English).
includestringOptional. 1/true includes a holidays array (for the leave window when provided, otherwise for the full reporting period).
yearintegerCalendar mode. Required when using month or when period_from/period_to are omitted.
monthintegerCalendar mode. Optional 1–12; omit for a full-year reporting period. Do not combine with period_from/period_to.
period_fromdateExplicit period mode. Reporting period start YYYY-MM-DD, inclusive. Must be used together with period_to. Do not combine with year/month.
period_todateExplicit period mode. Reporting period end YYYY-MM-DD, inclusive. Must be on or after period_from.
fromdateOptional leave window start YYYY-MM-DD, inclusive. Must be inside the reporting period. Use with to.
todateOptional leave window end YYYY-MM-DD, inclusive. Must be inside the reporting period.
from[] / to[]date[]Optional. Multiple leave windows. Provide repeated pairs of from[] and to[] (same number of items). Windows may overlap; overlaps are merged so days are not double-counted. When multiple windows are provided, the response includes leave_windows and leave is null.
taken_hours_overridestringOptional. Overrides computed taken time for the leave window (decimal hours string, e.g. 7.5).
carryover_hoursstringOptional. Starting balance (can be negative), as a decimal hours string.
accrual_rate_hours_per_workdaystringOptional. Accrual rate per working day (decimal hours). Mutually exclusive with accrual_hours_per_month / accrual_hours_per_year.
accrual_hours_per_monthstringOptional. Accrual amount for a full calendar month (decimal hours). Requires the reporting period to be a full calendar month (use year+month).
accrual_hours_per_yearstringOptional. Accrual amount for a full calendar year (decimal hours). Requires the reporting period to be a full calendar year (use year without month).
accrual_cap_hoursstringOptional. If provided, ending balance is capped at this value (decimal hours).

Response: JSON object with period bounds, working totals, and hybrid balance fields: accrued_hours/taken_hours/ending_balance_hours plus derived *_days values.

Examples

Request

curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.holidaydb.com/api/leave-pto?country=US&year=2026&month=1&workday=08:00&accrual_hours_per_month=8"

Sample response

{
  "country_code": "US",
  "region": null,
  "weekdays": [1, 2, 3, 4, 5],
  "year": 2026,
  "month": 1,
  "workday": "08:00",
  "workday_minutes": 480,
  "period": { "from": "2026-01-01", "to": "2026-01-31" },
  "period_working_days": 21,
  "accrued_hours": "8.00",
  "taken_hours": "0.00",
  "ending_balance_hours": "8.00"
}

10. GET /api/sla-deadline

Calculates a due date by adding business days to a start date, excluding weekends and public holidays for the selected country and optional region.

Try it without writing code

Use the SLA deadline calculator on this site for a quick deadline check.

Query parameters

Required parameters are country, start, and sla_business_days.

ParameterTypeDescription
countrystringRequired. Two-letter ISO 3166-1 alpha-2 country code (e.g. US, DE).
startdateRequired. Start date YYYY-MM-DD. The start date is treated as day 0.
sla_business_daysintegerRequired. Number of business days to add after start (0 returns the same day).
regionstringOptional. ISO 3166-2 subdivision (Pro/Full). Adds subnational holidays on top of national rules.
weekdaysstringOptional. Comma-separated ISO weekday numbers 17 (default Mon-Fri).
includestringOptional. 1/true includes a holidays array for the scan range.
langstringOptional. Language for holiday names when include=1 (ISO 639-1, e.g. de).

Response: JSON object with deadline and related context fields (country/region, weekdays, and scan range).

Examples

Request

curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.holidaydb.com/api/sla-deadline?country=US&start=2026-01-02&sla_business_days=1"

Sample response

{
  "country_code": "US",
  "region": null,
  "weekdays": [1, 2, 3, 4, 5],
  "start": "2026-01-02",
  "sla_business_days": 1,
  "deadline": "2026-01-05"
}

11. GET /api/delivery-date

Calculates an estimated delivery date by adding business days to a start date, excluding weekends and public holidays for the selected country and optional region.

Try it without writing code

Use the delivery date calculator on this site for a quick estimate.

Query parameters

Required parameters are country, start, and delivery_business_days.

ParameterTypeDescription
countrystringRequired. Two-letter ISO 3166-1 alpha-2 country code (e.g. US, DE).
startdateRequired. Start date YYYY-MM-DD. The start date is treated as day 0.
delivery_business_daysintegerRequired. Number of business days to add after start (0 returns the same day).
regionstringOptional. ISO 3166-2 subdivision (Pro/Full). Adds subnational holidays on top of national rules.
weekdaysstringOptional. Comma-separated ISO weekday numbers 17 (default Mon-Fri).
includestringOptional. 1/true includes a holidays array for the scan range.
langstringOptional. Language for holiday names when include=1 (ISO 639-1, e.g. de).

Response: JSON object with delivery_date and related context fields (country/region, weekdays, and scan range).

Examples

Request

curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.holidaydb.com/api/delivery-date?country=US&start=2026-01-02&delivery_business_days=3"

Sample response

{
  "country_code": "US",
  "region": null,
  "weekdays": [1, 2, 3, 4, 5],
  "start": "2026-01-02",
  "delivery_business_days": 3,
  "delivery_date": "2026-01-07"
}

12. GET /api/bridge-days

Returns "bridge day" opportunities for a country and year - short runs of working days sandwiched between non-working days where at least one neighbor block contains a public holiday. Each opportunity includes the resulting consecutive off-block and an efficiency ratio so you can rank long-weekend plays.

Try it without writing code

Use the bridge days calculator on this site to plan long weekends from the browser.

Query parameters

Required parameters are country and year.

ParameterTypeDescription
countrystringRequired. Two-letter ISO 3166-1 alpha-2 country code (e.g. US, DE).
yearintegerRequired. Calendar year within the rolling allowed window.
monthintegerOptional. 1-12 to limit the scan to a single month.
regionstringOptional. ISO 3166-2 subdivision (Pro/Full). Adds subnational holidays on top of national rules.
weekdaysstringOptional. Comma-separated ISO weekday numbers 1-7 (default Mon-Fri).
max_gapintegerOptional. Maximum bridge length in working days (1-3, default 1). Higher values surface 2- and 3-day plays such as a Tuesday holiday plus the following weekend.
includestringOptional. 1/true includes a holidays array for the queried range.
langstringOptional. Language for holiday names (ISO 639-1, e.g. de).

Response: JSON object with a bridge_opportunities array sorted by efficiency descending. Each opportunity exposes the working days that need to be taken off, the resulting consecutive off-block, the off-day count, the efficiency ratio (off-days / bridge days), and the anchor holidays.

Examples

Request

curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.holidaydb.com/api/bridge-days?country=DE&year=2026"

Sample response

{
  "country_code": "DE",
  "region": null,
  "weekdays": [1, 2, 3, 4, 5],
  "year": 2026,
  "month": null,
  "max_gap": 1,
  "range": { "from": "2026-01-01", "to": "2026-12-31" },
  "bridge_opportunities": [
    {
      "bridge_days": ["2026-05-15"],
      "bridge_days_count": 1,
      "off_block": { "from": "2026-05-14", "to": "2026-05-17" },
      "off_days_count": 4,
      "efficiency": 4,
      "anchor_holidays": [
        {
          "uuid": "...",
          "summary": "Christi Himmelfahrt",
          "start_date": "2026-05-14",
          "end_date": "2026-05-14"
        }
      ]
    }
  ]
}

13. GET /api/languages

Returns the list of language codes supported by HolidayDB for translated holiday names. This endpoint is available for plans that include multiple languages (Full). If your plan only includes English, the API returns 403.

Query parameters

None.

Response

JSON object with a languages array. Each item contains a language code (ISO 639-1) and a display name.

curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.holidaydb.com/api/languages"
{
  "languages": [
    { "code": "en", "name": "English" },
    { "code": "de", "name": "German" }
  ]
}

Calculator pages on this site use a public helper endpoint GET /api/tools/languages to populate language dropdowns without requiring an API key.

14. Errors

StatusMeaning
401Missing or invalid API key.
403Subdivision filter or feature not included in your plan (e.g. Pro/Full required).
404Country not found.
422Validation error: at least one of country/religion required (query form), invalid type/scope, provisional, substitute, or include on GET /api/holidays, invalid date range, invalid religion slug, invalid include on GET /api/business-days (use 0, false, 1, or true), invalid workday on GET /api/working-hours, or invalid business-days/working-hours fields (e.g. weekdays).

Error response body

Error responses are JSON. Authentication/validation errors include an error string (and validation errors also include errors). Other errors may use diagnostic fields like id/status/code/title/detail.

Missing or invalid API key.

{
  "error": "Unauthorized. Provide a valid API key in the Authorization header as Bearer token."
}

15. Plan limits

The region parameter (subdivision holidays) and the lang parameter (multiple languages) require Pro or Full plans. Basic includes national holidays in English only. See pricing or your Billing and Usage pages for details.