HTTP/1.1 402 PAYMENT REQUIRED agent402.base.eth · BASE · SOLANA · POLYGON · ARBITRUM · MONAD · STELLAR · ALGORAND · ROBINHOOD · USDC · USDG
Agent402 / tools / public-holidays

Public holidays

$0.002 per call · USDC via x402 · GET /api/public-holidays

Public 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

FieldTypeDescription
country *stringISO 3166-1 alpha-2 country code, e.g. US, DE, JP
year *integercalendar 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");
Wallet-only. This tool reaches the network/browser/storage, so it is paid in USDC via x402 (no proof-of-work tier).

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.

Related tools

Current time

FREE w/ compute · or $0.001 · GET /api/time

Current time: UTC ISO, epoch seconds/ms, day of week/year, ISO week — optionally rendered in any IANA timezone via ?tz=.

Time convert

FREE w/ compute · or $0.001 · POST /api/time-convert

Convert between epoch (s or ms), ISO 8601, and any IANA timezone. Give a value, get every representation back.

Cron next runs

FREE w/ compute · or $0.002 · POST /api/cron-next

Parse a 5-field cron expression and return the next N run times (UTC).