Documentation

1. Introduction

The Holiday API returns public holidays and observances by country and/or religion. All requests require authentication with an API key. You can create and manage API keys in your dashboard. Development Mode (free) uses the same base URL and the same API key (create one in your dashboard when you have no paid plan) so you can test integration before going live.

2. Development mode

If you have an account but no active paid subscription, your API requests run in Development mode. You can use the same endpoints, parameters, and authentication to build and test your integration. Development mode is intended for evaluation only; it is not suitable for production use.

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). The response shape is identical, so you can develop and test your code against the real API without changing it when you upgrade.

Limitations

  • Subset of results only: The API does not return the full set of holidays. Results are filtered server-side (e.g. only a fraction of matching holidays are included). You will see a smaller list than you would on a paid plan, but the structure and fields of each holiday are the same. This lets you verify your integration without exposing the complete dataset.
  • Response header: When running in Development mode, the API adds the header X-Dev-Mode: true to every response. You can use this in your application to detect dev mode (e.g. for logging or to show a warning in a test environment).
  • One API key only: You can create and use only one API key in Development mode. Paid plans allow more keys (see pricing).
  • Not for production: Development mode is not intended for production traffic. Data completeness, rate limits, and availability may differ from paid plans. For production use, subscribe to Basic, Pro, or Full from Billing.

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). Pro/Full only; applies to first country when multiple.
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).
includestringComma-separated list of related resources: canonical (embed canonical holiday for substitutes), substitute (embed substitutes array for canonicals).
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"
  }
]

6. 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/include, invalid date range, or invalid religion slug.

Error response body

All error responses are JSON with a single error key containing the message.

Missing or invalid API key.

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

7. 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.