# Global Public Holidays & Business Days API (250 Countries, SLA) (`geeky_goth_gamer/global-public-holidays-business-days`) Actor

Public holidays for 250 countries, 650+ states/regions and 33 stock exchanges. Check, add or count business days and compute SLA due times in any timezone. Offline, instant Standby API for AI agents.

- **URL**: https://apify.com/geeky_goth_gamer/global-public-holidays-business-days.md
- **Developed by:** [Chris Day](https://apify.com/geeky_goth_gamer) (community)
- **Categories:** Developer tools, AI, Business
- **Features:** Limited permissions, Single-tenant, Server interface
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 holiday calendars

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/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

## Global Public Holidays & Business Days API (250 countries, SLA math)

Public holidays for **250 countries**, **650+ states, provinces and regions** and **33 stock-exchange calendars**, plus the business-day math agents actually need: is this a working day, what date is N business days from now, how many working days are between two dates, and when an SLA measured in business hours falls due in a given time zone.

Runs offline from the open-source [python-holidays](https://github.com/vacanza/holidays) dataset (MIT licence), so answers are instant and there are no third-party API limits. Use it as a normal Actor run or as an always-warm **Standby HTTP API**.

### When an AI agent should use this

Use it when a task depends on working days anywhere in the world: delivery or payment due dates, "reply within 3 business days", support SLAs, trading-day checks, scheduling around public holidays, payroll cut-offs.

Don't use it for religious observances a country does not treat as public holidays (unless the country offers an "optional" category), or for company-specific shutdown days (pass those as your own logic).

### Modes and prices

| Mode | What you get | Price (USD) |
|---|---|---|
| `list` | Holiday calendar per location and year (date, weekday, name, observed flag) | $0.004 per location-year |
| `check` | Business day / weekend / holiday result for each date | $0.001 per date |
| `add` | Start date + N business days (negative goes back) | $0.001 |
| `count` | Business days between two dates, with the weekday holidays skipped | $0.001 |
| `sla` | Due date-time after N business hours inside working hours, in an IANA time zone | $0.002 |
| `supported` | All country, subdivision and market codes | free |

Plus Apify's standard `apify-actor-start` event of $0.00005 per run. Invalid input is never charged.

### Example inputs

```json
{"mode": "list", "country": "DE", "subdivision": "BY", "years": [2026]}
```

```json
{"mode": "add", "country": "GB", "subdivision": "ENG", "startDate": "2026-12-24", "days": 2}
```

→ `"resultDate": "2026-12-30"` (skips Christmas, the weekend and the Boxing Day substitute).

```json
{"mode": "sla", "country": "AU", "subdivision": "TAS", "timezone": "Australia/Hobart",
 "start": "2026-12-24T15:00:00", "hours": 4, "workdayStart": "09:00", "workdayEnd": "17:00"}
```

→ `"due": "2026-12-29T11:00:00+11:00"`.

```json
{"mode": "check", "market": "XNYS", "dates": ["2026-11-26", "2026-11-27"]}
```

Countries accept ISO codes (`DE`, `DEU`) or names (`Germany`, `usa`, `uk`, `Scotland`). Subdivisions accept codes or names (`BY` or `Bayern`). Weekends follow each country (Fri for Iran, Fri–Sat in some MENA countries) and can be overridden with `weekendDays`. Holiday names can be localised with `language` where supported, and extra categories such as `bank` or `optional` can be requested with `categories`.

### Output (fields)

- `list`: `calendars[]` with `country`/`subdivision` or `market`, `year`, `weekend`, `holidayCount`, `holidays[]` (`date`, `weekday`, `name`, `observed`)
- `check`: `results[]` with `date`, `weekday`, `isBusinessDay`, `isWeekend`, `isHoliday`, `holidayName`
- `add`: `resultDate`, `resultWeekday`, `calendarDaysElapsed`, `holidaysSkipped[]`
- `count`: `businessDays`, `weekendDays`, `holidaysOnWeekdays[]`
- `sla`: `due` (local), `dueUtc`, `dueWeekday`, `workday`
- every result: `status`, `mode`, `summary`, `billedEvents`

### Standby HTTP API (fastest for agents)

Base URL: `https://geeky-goth-gamer--global-public-holidays-business-days.apify.actor` (send `Authorization: Bearer <APIFY_TOKEN>`).

- `POST /holidays`, `/check`, `/add`, `/count`, `/sla`, `/supported` with the same JSON fields (no `mode` needed)
- `POST /calculate` with any `mode`
- `GET /health`

```bash
curl -s -X POST "https://geeky-goth-gamer--global-public-holidays-business-days.apify.actor/add" \
  -H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" \
  -d '{"country":"US","startDate":"2026-11-25","days":3}'
```

### MCP

Add it to any MCP client through the hosted Apify MCP server:

```
https://mcp.apify.com/?tools=geeky_goth_gamer/global-public-holidays-business-days
```

### Limits

Years 1950–2100; up to 10 years and 25 locations (60 location-years) per `list` request; 1,000 dates per `check`; ±3,660 business days for `add`; 20-year spans for `count`; 20,000 business hours for `sla`. Overnight working hours are not supported.

### Data and accuracy

Holiday rules come from python-holidays (MIT), which is maintained from official government sources and updated frequently. Governments sometimes declare one-off holidays at short notice; those appear after the dataset is updated and the Actor is rebuilt. Observed/substitute days are included where the country observes them.

### Other tools in this portfolio

[AU & NZ Public Holidays (Tasmanian areas)](https://apify.com/geeky_goth_gamer/au-nz-public-holidays-business-days) · [all tools](https://apify.com/geeky_goth_gamer)

# Actor input Schema

## `mode` (type: `string`):

What to calculate. list = holiday calendar per location-year ($0.004 each). check = one result per date ($0.001 each). add / count = one result ($0.001). sla = one result ($0.002). supported = free list of codes.

## `country` (type: `string`):

ISO 3166-1 code (DE, US, GB, JP) or English name (Germany, United States). 250 countries. Not used with market.

## `subdivision` (type: `string`):

Optional subdivision code or name for regional holidays, e.g. BY or Bayern (Germany), CA (US), SCT (UK), TAS (Australia). Use mode supported to see codes.

## `market` (type: `string`):

Optional exchange calendar instead of a country, e.g. XNYS / NYSE, XASX / ASX, XLON (see supported). Do not combine with country.

## `locations` (type: `array`):

Optional, list mode only: up to 25 objects like {"country": "US", "subdivision": "NY"} or {"market": "XNYS"}. Overrides country/subdivision/market.

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

List mode: 1-10 years between 1950 and 2100. Default: current year. At most 60 location-years per request.

## `dates` (type: `array`):

Check mode: up to 1,000 dates in YYYY-MM-DD format.

## `startDate` (type: `string`):

Add and count modes: YYYY-MM-DD.

## `days` (type: `integer`):

Add mode: whole number of business days, -3660 to 3660. Negative goes backwards. 0 rolls a non-business start forward unless rollForward is false.

## `rollForward` (type: `boolean`):

Add mode with days 0: move a weekend/holiday start to the next business day.

## `endDate` (type: `string`):

Count mode: YYYY-MM-DD. Business days after startDate up to and including endDate (start included if inclusive is true). Max 20 years.

## `inclusive` (type: `boolean`):

Count mode: also count startDate if it is a business day.

## `start` (type: `string`):

SLA mode: ISO 8601 date-time, e.g. 2026-12-24T15:00:00 (local to timezone) or with Z/offset.

## `hours` (type: `integer`):

SLA mode: business hours to add (0-20000). Decimals are accepted via the API.

## `minutes` (type: `integer`):

SLA mode: extra business minutes to add.

## `timezone` (type: `string`):

SLA mode: IANA time zone such as Europe/Berlin or Australia/Hobart. Default UTC.

## `workdayStart` (type: `string`):

SLA mode: opening time, 24-hour HH:MM.

## `workdayEnd` (type: `string`):

SLA mode: closing time, 24-hour HH:MM, after workdayStart.

## `weekendDays` (type: `array`):

Optional. Override the country's weekend, e.g. \["Fri", "Sat"]. Default comes from the country (Sat-Sun for most; Fri for Iran; Fri-Sat in some MENA countries). Use \[] for a 7-day business week.

## `categories` (type: `array`):

Optional, e.g. \["public"] (default) or \["public", "bank"] / \["optional"] where the country supports them. See supported.

## `language` (type: `string`):

Optional language code for holiday names, e.g. de, fr, en_US, ja, where supported. Unknown codes fall back to the default.

## Actor input object example

```json
{
  "mode": "list",
  "country": "DE",
  "subdivision": "BY",
  "years": [
    2026
  ],
  "dates": [
    "2026-12-25",
    "2026-12-29"
  ],
  "rollForward": true,
  "inclusive": false,
  "minutes": 0,
  "workdayStart": "09:00",
  "workdayEnd": "17:00"
}
```

# Actor output Schema

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

No description

# 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 = {
    "country": "DE",
    "subdivision": "BY",
    "years": [
        2026
    ],
    "dates": [
        "2026-12-25",
        "2026-12-29"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("geeky_goth_gamer/global-public-holidays-business-days").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 = {
    "country": "DE",
    "subdivision": "BY",
    "years": [2026],
    "dates": [
        "2026-12-25",
        "2026-12-29",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("geeky_goth_gamer/global-public-holidays-business-days").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 '{
  "country": "DE",
  "subdivision": "BY",
  "years": [
    2026
  ],
  "dates": [
    "2026-12-25",
    "2026-12-29"
  ]
}' |
apify call geeky_goth_gamer/global-public-holidays-business-days --silent --output-dataset

```

## MCP server setup

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

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/KrU0rmDUsWPW6WYQF/builds/017TiGlUElfB6Ruem/openapi.json
