agentsvc.io

services / holidays

dataoperational · 30 ms

Public Holidays

Public and bank holidays for 200+ countries and their regions (states, cantons) for any year, with local names. Optionally check whether a given date is a holiday. Params: country (ISO 3166-1 alpha-2, required, e.g. DE, US, CH, JP), region (e.g. BY, CA, ZH), year (default current), date (YYYY-MM-DD to check), language (e.g. en), include_observances (default false).

Run free trial ↗3 free calls per day with the example input. Paid: $0.002 USDC, no limit.

Call it

import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agentsvc.io/api/v1/proxy/holidays", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({"country":"DE","region":"BY","year":2026,"date":"2026-10-03"}),
});
const { data, payment } = await res.json();  // payment.transaction = on-chain receipt

Input

FieldTypeDescription
country *stringISO 3166-1 alpha-2 country code
regionstringState/region code, e.g. BY, CA, ZH
yearinteger
datestringYYYY-MM-DD to check
languagestringLanguage for holiday names, e.g. en
include_observancesboolean = false

Output

FieldTypeDescription
countrystring
regionstring
yearinteger
countinteger
holidaysarray
date_checkobject

Example response (data)

{
  "country": "DE",
  "region": "BY",
  "year": 2026,
  "count": 14,
  "holidays": [
    {
      "date": "2026-01-01",
      "name": "Neujahr",
      "type": "public",
      "substitute": false
    },
    {
      "date": "2026-01-06",
      "name": "Heilige Drei Könige",
      "type": "public",
      "substitute": false
    }
  ],
  "date_check": {
    "date": "2026-10-03",
    "is_holiday": true,
    "name": "Tag der Deutschen Einheit",
    "weekday": "Saturday"
  }
}