Getting started overview

Integrating with the Holidays API involves a series of steps to ensure successful data retrieval. This guide outlines the process from account creation and API key retrieval to executing your initial API call. The Holidays API offers access to various types of holiday data, including public, school, and bank holidays, through a RESTful interface with JSON responses (Holidays API documentation).

The API is designed for applications requiring global holiday information for scheduling, planning, or informational purposes. It supports a free tier for initial exploration and development, providing 500 requests per month (Holidays pricing page).

Here’s a quick reference for the getting started process:

Step What to do Where
1. Sign Up Create a new account. Holidays.app Signup
2. Get API Key Locate and copy your unique API key. Holidays Dashboard
3. Construct Request Formulate your API request with required parameters. Holidays API Reference
4. Execute Call Send the request using a tool like cURL or a programming language. Command Line / Development Environment
5. Process Response Parse the JSON response to extract holiday data. Your Application Logic

Create an account and get keys

To access the Holidays API, you must first create an account on the Holidays.app platform. This process establishes your user profile and provides access to your personal dashboard, where you can manage your API subscription and retrieve your API key.

  1. Navigate to the Signup Page: Go to the official Holidays.app signup page.
  2. Provide Required Information: Fill in the registration form with your email address and a secure password.
  3. Complete Registration: Follow any on-screen prompts to complete the account creation, which may include email verification.
  4. Access Your Dashboard: Once registered and logged in, you will be directed to your personal dashboard.
  5. Locate Your API Key: Within the dashboard, there will be a dedicated section for API Keys or Credentials. Your unique API key will be displayed here. Copy this key, as it is essential for authenticating all your API requests. Treat your API key as sensitive information to prevent unauthorized access to your account and usage quota (Holidays API authentication guide).

The API key is a unique identifier, often a long string of alphanumeric characters, that authenticates your application every time it communicates with the Holidays API. Without it, requests will be rejected. For security best practices, avoid hardcoding API keys directly into client-side code and consider using environment variables or secure key management systems (Google Maps API key security recommendations).

Your first request

After obtaining your API key, you can make your first request to the Holidays API. This example demonstrates how to retrieve public holidays for a specific country and year using cURL, a common command-line tool for making HTTP requests. The Holidays API typically requires the API key to be passed as a query parameter.

The base URL for the API is generally https://api.holidays.app/v1/. For retrieving public holidays, a common endpoint might be /holidays, requiring parameters such as country and year.

Example cURL Request for Public Holidays in the United States for 2026:

curl -X GET \
  'https://api.holidays.app/v1/holidays?country=US&year=2026&api_key=YOUR_API_KEY'

Breakdown of the request:

  • -X GET: Specifies the HTTP method as GET, which is used for retrieving data.
  • 'https://api.holidays.app/v1/holidays?country=US&year=2026&api_key=YOUR_API_KEY': This is the full URL, including the base endpoint and query parameters.
    • country=US: Specifies the United States as the target country. You can find supported country codes in the Holidays API country list.
    • year=2026: Specifies the year for which to retrieve holidays.
    • api_key=YOUR_API_KEY: Replace YOUR_API_KEY with the actual API key you obtained from your dashboard.

Expected JSON Response Structure:

A successful response will typically return a JSON object containing an array of holiday objects. Each holiday object will include details such as the holiday name, date, type, and associated country.

{
  "status": 200,
  "holidays": [
    {
      "name": "New Year's Day",
      "date": "2026-01-01",
      "type": "public",
      "country_code": "US"
    },
    {
      "name": "Martin Luther King, Jr. Day",
      "date": "2026-01-19",
      "type": "public",
      "country_code": "US"
    }
    // ... more holidays
  ]
}

This structure allows you to parse the JSON and integrate the holiday data into your application logic. For a comprehensive list of endpoints and response formats, consult the Holidays API reference documentation.

Common next steps

After successfully making your first API call, consider these next steps to further integrate the Holidays API into your application:

  1. Explore Additional Endpoints: The Holidays API offers various endpoints beyond public holidays, such as school holidays and bank holidays. Review the API reference to understand all available data types and query parameters.
  2. Implement Error Handling: Integrate robust error handling into your code to gracefully manage cases such as invalid API keys, rate limit exceedances, or malformed requests. The API typically returns HTTP status codes and error messages in the JSON response to indicate issues.
  3. Manage Rate Limits: Be aware of the API's rate limits, which specify the maximum number of requests you can make within a given timeframe. Implement a strategy, such as exponential backoff, to handle rate limit errors and prevent your application from being temporarily blocked. Details on rate limits are usually found in the API documentation on rate limits.
  4. Utilize SDKs (if available): Although the Holidays API primarily supports direct HTTP requests, check the Holidays documentation for any community-contributed or official SDKs (Software Development Kits) that might simplify integration in your preferred programming language.
  5. Monitor Usage: Regularly check your API usage within your Holidays.app dashboard to ensure you stay within your free tier limits or subscribed plan. This helps in planning for scaling and cost management.
  6. Secure Your API Key: Reinforce security practices by not exposing your API key in client-side code or public repositories. Use environment variables, server-side proxies, or secure configuration management systems.

Troubleshooting the first call

If your initial API call to the Holidays API does not return the expected data, consider these common troubleshooting steps:

  • Check Your API Key:
    • Verify Accuracy: Ensure your API key is copied correctly from your Holidays dashboard. Even a single incorrect character will lead to authentication failure.
    • Key Status: Confirm that your API key is active and not revoked or expired in your Holidays.app dashboard.
  • Review Request URL and Parameters:
    • Endpoint Correctness: Double-check that the base URL (e.g., https://api.holidays.app/v1/) and the specific endpoint (e.g., /holidays) are correct as per the API reference.
    • Parameter Formatting: Ensure all query parameters (e.g., country, year, api_key) are correctly spelled, case-sensitive if required, and properly URL-encoded.
    • Required Parameters: Verify that all mandatory parameters for the chosen endpoint are included in your request.
  • Inspect HTTP Status Codes:
    • 401 Unauthorized: Often indicates an invalid or missing API key.
    • 400 Bad Request: Suggests an issue with your request parameters, such as missing required fields or incorrect data types.
    • 403 Forbidden: Could mean your account lacks the necessary permissions for the requested resource, or your API key is restricted.
    • 404 Not Found: The specified endpoint or resource does not exist.
    • 429 Too Many Requests: You have exceeded your rate limit. Wait before retrying or consider upgrading your plan.
    • 5xx Server Error: Indicates an issue on the API provider's side. If this persists, check the Holidays API status page or contact support.
  • Consult Documentation: Re-read the relevant sections of the Holidays API documentation, especially the API reference and troubleshooting guides, for specific error codes or common issues.
  • Use an API Client or Explorer: If you're using cURL, try an interactive API client like Postman or the Holidays API explorer to construct and test your requests, which can provide more immediate feedback on parameter validation and response parsing.