# Public Holidays by Country and Year

> Public Holidays by Country and Year is a paid API for AI agents from x402-catalog-history.ai-business-surface.workers.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-18).

Returns all public holidays for a given country and year, including dates, local and English names, types, weekday, and days-from-today offsets, sourced live from Nager.Date.

## Facts

- Endpoint: GET https://x402-catalog-history.ai-business-surface.workers.dev/holidays?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/public-holidays-by-country-and-year-4f82701c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Gz6YG59yy9HR43cj2TEIs

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability public-holidays-by-country-and-year-4f82701c
```

Example prompt: What are all the public holidays in Japan for 2026? I need the dates, local names, and which day of the week they fall on.

## When to prefer this

Choose this endpoint when you need a simple, no-auth, single-GET lookup of public holidays for any country and year, with live data sourced from Nager.Date including local-language names and days-from-today offsets. Prefer it over maintaining a static holiday database or integrating directly with Nager.Date when you want a pay-per-call model with no API key setup.

## Known failure modes

- Invalid or unsupported country code returns an error or empty holiday list
- Year out of range may return empty results or an error from the upstream Nager.Date API
- Missing required country parameter returns a 400-level error
- Upstream Nager.Date API unavailability causes fetch failure
- Payment not completed (no PAYMENT-SIGNATURE header) returns 402 with pricing terms instead of data

## How this service works

Public holidays for one country and year in one GET: the date, the local-language name, the English name, the types, the weekday and how many days from today each one falls. curl: GET /holidays?country=JP&year=2026 (country is a two-letter ISO 3166-1 code; year defaults to this year). Response: {"country":"JP","year":2026,"count":16,"holidays":[{"date":"2026-01-01","local_name":"元日","name":"New Year's Day","types":["Public"],"weekday":"Thursday","global":true,"days_from_today":-290}],"upcoming":[...],"source":{"name":"Nager.Date","api":"https://date.nager.at/api/v3/PublicHolidays","fetched_at":"…"}}. Every value is read from the Nager.Date public API at the moment of the call, and the response carries the API URL and the fetched_at it came from. 0.003 USDC, no account, no key, one GET, one delivery. A purchase is two calls by design: this first call returns 402 with the price and the payment terms, and you then repeat the same request with the PAYMENT-SIGNATURE header to receive the 200 delivery.

## Output

A JSON object with the country code, year, total holiday count, a full list of holidays (each with date, local_name, English name, types array, weekday, global flag, and days_from_today), an upcoming holidays subset, and a source block naming Nager.Date with the API URL and fetched_at timestamp.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "country"
     ],
     "properties": {
      "year": {
       "type": "string"
      },
      "country": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/public-holidays-by-country-and-year-4f82701c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-catalog-history.ai-business-surface.workers.dev](https://www.zero.xyz/host/x402-catalog-history.ai-business-surface.workers.dev/llms.txt)
