# Public Holidays Scraper — 200+ Countries (`hipersoft/public-holidays-scraper`) Actor

Get public holidays for 200+ countries and any year: date, holiday name, local name, national vs regional, county/region codes, holiday type and fixed/moveable. Perfect for scheduling, HR, calendars and business planning. One row per holiday as JSON, CSV or Excel.

- **URL**: https://apify.com/hipersoft/public-holidays-scraper.md
- **Developed by:** [hiper soft](https://apify.com/hipersoft) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.00015 / holiday scraped

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Public Holidays Scraper — 200+ Countries

Get **public holidays for 200+ countries** and any year with the **Public Holidays Scraper**. Pick countries and years and export each holiday's **date, name, local name, national vs regional status, county/region codes, type and whether it's fixed or moveable** — one clean row per holiday as **JSON, CSV or Excel**.

Built for **scheduling and calendar apps, HR and payroll, e-commerce planning, logistics and business operations**, it turns official holiday calendars into a structured dataset.

### What it does

- 🌍 **200+ countries** — fetch holidays for any supported country by ISO code, or all at once.
- 📅 **Any year** — pull one year or several in a single run.
- 🏷️ **Rich detail** — holiday name, local-language name, date, type and launch year.
- 🗺️ **National vs regional** — a global/national flag plus county/region codes for regional holidays.
- 🔁 **Fixed vs moveable** — know whether a holiday's date shifts each year.
- 📤 **Export anywhere** — JSON, CSV or Excel, or straight into a calendar, HR system or planner.

### Example output

```json
{
  "date": "2026-04-03",
  "name": "Good Friday",
  "localName": "Karfreitag",
  "countryCode": "DE",
  "year": 2026,
  "global": true,
  "fixed": false,
  "counties": [],
  "types": ["Public"]
}
```

### How to use it

1. Add **country codes** (e.g. `US`, `GB`, `DE`) — or leave empty for all countries.
2. Add the **years** you want.
3. Set **Max holidays** and run. Download the results as **JSON, CSV or Excel**.

### Input fields

| Field | Description |
|-------|-------------|
| **Country codes** | ISO 3166 alpha-2 codes; empty = all 200+ countries. |
| **Years** | One or more years (e.g. 2026, 2027); empty = current year. |
| **Max holidays** | Maximum holidays to collect (0 = no limit). |

### Output fields

`date`, `year`, `name`, `localName`, `countryCode`, `global`, `fixed`, `counties`, `types`, `launchYear`.

### Popular use cases

- **Scheduling & calendars** — block out holidays across regions in an app.
- **HR & payroll** — build leave and working-day calendars per country.
- **E-commerce & logistics** — plan campaigns and shipping around holidays.
- **Business operations** — know office closures across multiple markets.
- **Data enrichment** — flag holiday dates in an existing dataset.

### FAQ

**Do I need an account or key?**
No. Choose countries and years and run.

**How many countries are supported?**
Over 200 — leave the country field empty to fetch them all in one run.

**Does it show regional holidays?**
Yes — each holiday has a national/global flag and, where relevant, the county/region codes it applies to.

**Can I export to Excel or Google Sheets?**
Yes — results download as JSON, CSV or Excel and integrate with Sheets, calendars and HR tools.

***

Official **public holidays for 200+ countries** — dates, names, regions and types — clean and export-ready for scheduling, HR and planning.

# Actor input Schema

## `countryCodes` (type: `array`):

ISO 3166 alpha-2 country codes — e.g. 'US', 'GB', 'DE', 'SG', 'IN'. Leave empty to fetch all 200+ supported countries.

## `years` (type: `array`):

Years to fetch — e.g. 2026, 2027. Leave empty for the current year.

## `maxItems` (type: `integer`):

Maximum number of holidays to collect (0 = no limit).

## Actor input object example

```json
{
  "countryCodes": [
    "US",
    "GB",
    "DE"
  ],
  "years": [
    "2026"
  ],
  "maxItems": 0
}
```

# Actor output Schema

## `results` (type: `string`):

The results as dataset items.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "countryCodes": [
        "US",
        "GB",
        "DE"
    ],
    "years": [
        "2026"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("hipersoft/public-holidays-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "countryCodes": [
        "US",
        "GB",
        "DE",
    ],
    "years": ["2026"],
}

# Run the Actor and wait for it to finish
run = client.actor("hipersoft/public-holidays-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "countryCodes": [
    "US",
    "GB",
    "DE"
  ],
  "years": [
    "2026"
  ]
}' |
apify call hipersoft/public-holidays-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hipersoft/public-holidays-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/0KxH3z27x17PhgiKt/builds/8Ru5n1FolegEAp5zT/openapi.json
