← All sources

Japan Business Calendar

Japanese national holidays and business-day calculations derived from the Cabinet Office official CSV. Returns holidays for a given year, plus business-day arithmetic used by invoicing, logistics and HR systems in Japan.

Payment (x402)

Send a plain GET first and you get 402 Payment Required with a PAYMENT-REQUIRED header. Sign a payment for the amount, payee and network it lists, then resend the same request with PAYMENT-SIGNATURE to receive the data. Only 2xx responses are charged; 4xx / 5xx responses are not. Endpoints accept GET only.

Endpoints (4)

GET /v1/jp-biz-calendar/holidays

List Japanese national holidays for a year

ParameterTypeRequiredDescriptionExample
yearintegerrequiredCalendar year (Gregorian). Accepted range is 1955-2100, but only years covered by the upstream Cabinet Office CSV can be answered; years outside the covered range return 404 and are not charged.2026

Example (an unpaid request returns 402):

curl -i "https://torii-gateway-staging.ichis-lab.workers.dev/v1/jp-biz-calendar/holidays?year=2026"

GET /v1/jp-biz-calendar/is-business-day

Tell whether a given date is a Japanese business day

ParameterTypeRequiredDescriptionExample
datestringrequiredDate to check, in YYYY-MM-DD (ISO 8601 calendar date, interpreted in UTC). Dates outside the years covered by the upstream CSV return 404 and are not charged.2026-01-05

Example (an unpaid request returns 402):

curl -i "https://torii-gateway-staging.ichis-lab.workers.dev/v1/jp-biz-calendar/is-business-day?date=2026-01-05"

GET /v1/jp-biz-calendar/add-business-days

Add or subtract business days from a given date

ParameterTypeRequiredDescriptionExample
datestringrequiredBase date, in YYYY-MM-DD (ISO 8601 calendar date, interpreted in UTC). Results outside the years covered by the upstream CSV return 404 and are not charged.2026-01-05
nintegerrequiredBusiness days to add; negative goes backwards. 0 returns the base date if it is a business day, else the next one (never the previous). From a non-business base date, n=1 lands on the same day as n=0.5

Example (an unpaid request returns 402):

curl -i "https://torii-gateway-staging.ichis-lab.workers.dev/v1/jp-biz-calendar/add-business-days?date=2026-01-05&n=5"

GET /v1/jp-biz-calendar/wareki

Convert a Gregorian date to the Japanese imperial era (wareki)

ParameterTypeRequiredDescriptionExample
datestringrequiredDate to convert, in YYYY-MM-DD (UTC). Must be between 1873-01-01 (when Japan adopted the Gregorian calendar) and 2100-12-31; dates outside that range return 400, uncharged.2026-01-05

Example (an unpaid request returns 402):

curl -i "https://torii-gateway-staging.ichis-lab.workers.dev/v1/jp-biz-calendar/wareki?date=2026-01-05"

Free tier (opt-in)

You can try up to 10 calls/day (per ip_hash) for free. By default every call returns 402, so opt in explicitly with ?free=1 or the X-Torii-Free: 1 header. Once the allowance is used up, further calls are charged as usual (402).

curl -i "https://torii-gateway-staging.ichis-lab.workers.dev/v1/jp-biz-calendar/holidays?year=2026&free=1"

Source and license

When you redistribute or reuse the data, reproduce the following attribution verbatim (the original wording required by the license):

出典:内閣府ウェブサイト(https://www8.cao.go.jp/chosei/shukujitsu/gaiyou.html)を加工して作成

Terms of use: https://www.cao.go.jp/notice/rule.html

Privacy (what we collect and how long we keep it)

This service uses no cookies, no JavaScript and no advertising or analytics tags. For each call, we record only the items below.

Stored for each call (for billing and abuse prevention)

Retention

What the platform (Cloudflare) retains

Cloudflare Workers logs keep, for each request, the URL, path, query string and method, along with a request ID, for 7 days. They are configured not to record IP addresses or request headers automatically (diagnostic error strings may contain a short fragment of a malformed payment header). If a payment fails and is retried, the blockchain transaction hash may appear in the same logs for diagnosis (it is public on the blockchain). Do not put secrets or personal information in query strings (this service's parameters are only public values such as dates, years and counts).

Data sent to third parties

To verify and settle payments, the contents of the PAYMENT-SIGNATURE header (the signature and payer address) and the payment terms (the endpoint URL without the query string, amount, network and payee) are sent to the payment verification service (facilitator). The data you retrieve and the records above are not sent.