# Public Holidays by Country and Year

> Public Holidays by Country and Year is a paid API for AI agents from agent402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Returns official public holidays for a given country and year, including date, local name, English name, nationwide flag, and holiday types.

## Facts

- Endpoint: GET https://agent402.tools/api/public-holidays
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/public-holidays-by-country-and-year-f189b7bc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Uzm3YgZst9QI6eILrSodu

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-f189b7bc
```

Example prompt: What are all the public holidays in the US for 2026? I need the official English names, dates, and whether each is a nationwide holiday.

## When to prefer this

Use this endpoint when you need structured, authoritative public holiday data for 100+ countries without requiring an API key. Ideal for scheduling, business-day calculations, calendar enrichment, or compliance checks. Pairs naturally with /api/business-days for workday computation. Prefer this over generic web searches when you need machine-readable holiday data with local and English names.

## Known failure modes

- Invalid or unsupported country code returns an error or empty array
- Year outside supported range (1975–2099) returns an error
- Missing required query parameters (country or year) returns a 400-level error
- Country with no holiday data in Nager.Date returns an empty list

## How this service works

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

## Output

A list of public holiday objects for the specified country and year, each containing the date (ISO 8601), local name, English name, a boolean indicating if it's a nationwide holiday, and an array of holiday type strings (e.g. Public, Bank, Optional).

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "country",
      "year"
     ],
     "properties": {
      "year": {
       "type": "integer",
       "description": "calendar year (1975-2099)"
      },
      "country": {
       "type": "string",
       "description": "ISO 3166-1 alpha-2 country code, e.g. US, DE, JP"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "country",
      "year",
      "count",
      "holidays"
     ],
     "properties": {
      "year": {
       "type": "integer"
      },
      "count": {
       "type": "integer"
      },
      "country": {
       "type": "string"
      },
      "holidays": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "date": {
          "type": "string"
         },
         "name": {
          "type": "string"
         },
         "types": {
          "type": "array",
          "items": {
           "type": "string"
          }
         },
         "global": {
          "type": "boolean"
         },
         "counties": {},
         "localName": {
          "type": "string"
         }
        }
       }
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "year": 2026,
  "count": 17,
  "country": "US",
  "holidays": [
   {
    "date": "2026-01-01",
    "name": "New Year's Day",
    "types": [
     "Public",
     "Bank"
    ],
    "global": true,
    "counties": null,
    "localName": "New Year's Day"
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/public-holidays-by-country-and-year-f189b7bc/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
