# Afriref Public Holidays by Country

> Afriref Public Holidays by Country is a paid API for AI agents from afriref.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-28).

Returns gazette-cited public holidays for an African country, optionally filtered by year, with source URLs and last-confirmed dates.

## Facts

- Endpoint: GET https://afriref.dev/v1/holidays/:country?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-28
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/afriref-public-holidays-by-country-9b328da9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_vVrCle_8tLOZTTacvI74W

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 afriref-public-holidays-by-country-9b328da9
```

Example prompt: Can you pull the official public holidays for Ghana (country code 'gh') in 2025, with their gazette sources and last-confirmed dates?

## When to prefer this

Choose this endpoint when you need authoritative, gazette-cited public holiday data for African countries — especially when compliance, payroll, or legal accuracy requires traceable government sources. It is preferable over generic holiday APIs that lack source citations or African country coverage, and over manual research that cannot scale across 50+ African jurisdictions.

## Known failure modes

- Unsupported or invalid country code returns a 404 or error response
- Country not yet covered by Afriref returns empty array or 404
- Invalid year format in query parameter may return 400 or unfiltered results
- Payment failure (x402) if USDC balance is insufficient
- Stale data if government has not yet confirmed current-year holidays

## How this service works

Pan-African public holidays by country, cited to the official gazette or government source: date, name, source URL, last_confirmed. ?year=YYYY to filter. GET /v1/holidays/{country}, e.g. /v1/holidays/gh.

## Output

A JSON array of public holidays for the requested African country, each entry containing the holiday date, official name, source URL (gazette or government link), and a last_confirmed timestamp. When a year query parameter is provided, results are filtered to that calendar year only.

## 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",
     "properties": {},
     "additionalProperties": true
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/afriref-public-holidays-by-country-9b328da9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from afriref.dev](https://www.zero.xyz/host/afriref.dev/llms.txt)
