Public holidays
GET /api/public-holidaysPublic holidays for a country and year via Nager.Date (keyless, 100+ countries): date, local name, English name, nationwide flag, and holiday types. Pairs with /api/business-days and /api/country-info. ?country=US&year=2026
Input
| Field | Type | Description |
|---|---|---|
country * | string | ISO 3166-1 alpha-2 country code, e.g. US, DE, JP |
year * | integer | calendar year (1975-2099) |
Example output
{
"country": "US",
"year": 2026,
"count": 17,
"holidays": [
{
"date": "2026-01-01",
"localName": "New Year's Day",
"name": "New Year's Day",
"global": true,
"counties": null,
"types": [
"Public",
"Bank"
]
}
]
}
Try it — see the 402 challenge (free)
curl -i "https://agent402.tools/api/public-holidays?country=US&year=2026"
The response is HTTP 402 Payment Required with exact payment requirements. Any x402 v2 client pays automatically and retries:
Paid call (JavaScript agent)
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client();
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);
const res = await payFetch("https://agent402.tools/api/public-holidays?country=US&year=2026");
Part of these workflows
This tool is one step in a curated multi-tool workflow — agents can fetch the whole sequence as an MCP prompt or call https://agent402.tools/api/skill-packs/{slug}/prompt.
- Locale brief — "Can I reach this counterparty this week?" — country facts, this year's public holidays, working days remaining this week, and what time it is there right now, in one call.
Related tools
Current time
GET /api/timeCurrent time: UTC ISO, epoch seconds/ms, day of week/year, ISO week — optionally rendered in any IANA timezone via ?tz=.
Time convert
POST /api/time-convertConvert between epoch (s or ms), ISO 8601, and any IANA timezone. Give a value, get every representation back.
Cron next runs
POST /api/cron-nextParse a 5-field cron expression and return the next N run times (UTC).