# Japan Holidays & Business Days Calculator (Official) (`panda_studio/japan-business-days`) Actor

Japanese national holidays in English and Japanese from the official Cabinet Office list, business-day checks, add N business days, count business days between dates. Bank and government year-end closures, Saturday option, custom closed days.

- **URL**: https://apify.com/panda\_studio/japan-business-days.md
- **Developed by:** [panda studio](https://apify.com/panda_studio) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.30 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## Japan Holidays & Business Days Calculator (Cabinet Office Data)

Answer the questions every Japan-facing workflow runs into: **Is this date a Japanese holiday? What is the next business day? What is the date 10 business days after the invoice? How many business days are in Q4?**

- Official national holidays from the **Cabinet Office of Japan** (内閣府「国民の祝日」CSV, 1955 → next year), with **Japanese and English names**
- Beyond the official list (announced about a year ahead) the calendar is **calculated from the Holiday Act** (1970–2050) and marked `holidaySource: "calculated"`
- Substitute holidays (振替休日) and citizens' holidays (国民の休日) included
- **Bank closure (Dec 31–Jan 3)** or **government / company closure (Dec 29–Jan 3)** options
- Saturday-working businesses, your own closed days (Obon, company anniversary) and extra working days
- No API key, no scraping, runs in about 2 seconds

### Typical uses

- **Payment & delivery due dates** – "payment due 10 business days after invoice", "ships in 3 business days", for Japanese customers or suppliers.
- **Schedulers & automations** – run a daily Apify schedule / Make / n8n / Zapier flow only on Japanese business days (check `isBusinessDay` for `today`).
- **SLA and lead-time reports** – count business days between two dates.
- **Content calendars & campaigns** – list all Japanese holidays (Golden Week, Silver Week, Obon is not a national holiday!) for the next two years in English.
- **AI agents** – a small, deterministic tool an agent can call instead of guessing Japanese holidays.

### Input

```json
{
  "years": [2026, 2027],
  "dates": ["today", "2026-12-31"],
  "addBusinessDays": [{ "from": "today", "days": 10, "label": "due date" }],
  "countBusinessDays": [{ "from": "2026-10-01", "to": "2026-12-31", "label": "Q4" }],
  "yearEndClosure": "bank"
}
```

`today` means today in Japan time (JST). Leave any list empty to skip it.

### Output

Each row has a `type`:

```json
{ "type": "holiday", "date": "2026-09-22", "weekday": "Tuesday", "weekdayJa": "火",
  "holidayName": "休日", "holidayNameEn": "Citizen's Holiday", "isBusinessDay": false,
  "nonBusinessReason": "national holiday", "holidaySource": "cabinet-office" }

{ "type": "date-check", "date": "2026-09-25", "isBusinessDay": true,
  "nextBusinessDay": "2026-09-28", "previousBusinessDay": "2026-09-24" }

{ "type": "add-business-days", "from": "2026-09-25", "businessDays": 10,
  "result": "2026-10-09", "resultWeekday": "Friday", "calendarDaysSpan": 14 }

{ "type": "count-business-days", "from": "2026-10-01", "to": "2026-12-31",
  "businessDays": 63, "calendarDays": 92, "nationalHolidays": 3 }
```

### Accuracy

- Holidays inside the Cabinet Office list come straight from that list, and for 1970–2027 the calculated calendar matches it exactly (tested).
- Future holidays after the official list are calculated; the equinox days are fixed by the government each February for the following year, so very distant years can change. Such rows are marked `"holidaySource": "calculated"`.
- Company-specific holidays (Obon, year-end) differ between companies – use the closure option and *Extra closed dates*.

### Pricing

Pay per event: **$0.0003 per result row** plus a tiny start fee. Listing two years of holidays costs about one cent.

### Source & license

Holiday list: Cabinet Office, Government of Japan, 「国民の祝日について」 (syukujitsu.csv), used under the Public Data License v1.0 (公共データ利用規約 第1.0版). Calculated years: holiday\_jp (MIT). Processed by panda studio.

# Actor input Schema

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

Years to list all national holidays for (1955-2150). Empty list = none. Default: this year and next year.

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

Dates (YYYY-MM-DD or "today" in Japan time). Returns holiday name, weekday, business day yes/no, next and previous business day.

## `addBusinessDays` (type: `array`):

List of {"from": "YYYY-MM-DD" or "today", "days": N, "label": optional}. Negative N goes back. Example: payment due 10 business days after invoice.

## `countBusinessDays` (type: `array`):

List of {"from": "YYYY-MM-DD", "to": "YYYY-MM-DD", "label": optional}. Both dates are included.

## `saturdayIsBusinessDay` (type: `boolean`):

Turn on for businesses that work on Saturdays (national holidays that fall on Saturday stay closed).

## `yearEndClosure` (type: `string`):

Extra closed days around New Year used by most Japanese banks and offices.

## `extraClosedDates` (type: `array`):

Company-specific closed days, e.g. Obon holidays (YYYY-MM-DD).

## `extraBusinessDates` (type: `array`):

Days that are business days even if they are weekends or holidays.

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

Safety cap for the number of rows (and cost) of one run.

## Actor input object example

```json
{
  "years": [
    2026,
    2027
  ],
  "dates": [
    "today",
    "2026-12-31",
    "2027-01-04"
  ],
  "addBusinessDays": [
    {
      "from": "today",
      "days": 10,
      "label": "due date"
    }
  ],
  "countBusinessDays": [
    {
      "from": "2026-10-01",
      "to": "2026-12-31",
      "label": "Q4 2026"
    }
  ],
  "saturdayIsBusinessDay": false,
  "yearEndClosure": "none",
  "maxItems": 5000
}
```

# Actor output Schema

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

All results produced by this run, stored in the default dataset.

# 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 = {
    "years": [
        2026,
        2027
    ],
    "dates": [
        "today",
        "2026-12-31",
        "2027-01-04"
    ],
    "addBusinessDays": [
        {
            "from": "today",
            "days": 10,
            "label": "due date"
        }
    ],
    "countBusinessDays": [
        {
            "from": "2026-10-01",
            "to": "2026-12-31",
            "label": "Q4 2026"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("panda_studio/japan-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 = {
    "years": [
        2026,
        2027,
    ],
    "dates": [
        "today",
        "2026-12-31",
        "2027-01-04",
    ],
    "addBusinessDays": [{
            "from": "today",
            "days": 10,
            "label": "due date",
        }],
    "countBusinessDays": [{
            "from": "2026-10-01",
            "to": "2026-12-31",
            "label": "Q4 2026",
        }],
}

# Run the Actor and wait for it to finish
run = client.actor("panda_studio/japan-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 '{
  "years": [
    2026,
    2027
  ],
  "dates": [
    "today",
    "2026-12-31",
    "2027-01-04"
  ],
  "addBusinessDays": [
    {
      "from": "today",
      "days": 10,
      "label": "due date"
    }
  ],
  "countBusinessDays": [
    {
      "from": "2026-10-01",
      "to": "2026-12-31",
      "label": "Q4 2026"
    }
  ]
}' |
apify call panda_studio/japan-business-days --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,panda_studio/japan-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/EHzTrCzoXhT6wQnjG/builds/aARR2h7ftC01sNAmc/openapi.json
