# Spain Business Days Calculator

> Spain Business Days Calculator is a paid API for AI agents from spain-agent-toolkit.spain-agent-toolkit.workers.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-29).

Calculates the number of business days, weekend days, and public holidays between two dates in Spain, with optional regional filtering.

## Facts

- Endpoint: GET https://spain-agent-toolkit.spain-agent-toolkit.workers.dev/v1/es/business-days?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/spain-business-days-calculator-f98fdb9d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Edfbdc0bABTIIfnErL-8W

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 spain-business-days-calculator-f98fdb9d
```

Example prompt: How many business days are there in Spain's Catalonia region from December 1 to December 31, 2026?

## When to prefer this

Use this endpoint when you need accurate Spanish business day counts that account for both national and regional public holidays. It is ideal for scheduling, SLA calculations, payroll, or project planning involving Spanish dates. Prefer this over generic date-math libraries because it incorporates Spain-specific public holiday data by region, covering all 19 autonomous communities and cities. No API key or account setup is required — pay per call via USDC.

## Known failure modes

- Missing required 'from' or 'to' query parameters returns an error
- Invalid date format (non-YYYY-MM-DD) causes a parse error
- Invalid or unsupported region code returns an error
- Date range where 'to' is before 'from' may return an error or zero counts
- Payment failure via x402 protocol prevents access to the endpoint

## How this service works

Pay-per-call Spain utilities for AI agents over x402 (USDC). No accounts, no API keys. Public open data and offline computation only; nothing is stored.

## Output

A JSON object containing the queried date range (from/to), the optional region code, the count of business days, the count of weekend days, and the count of public holidays that fall on weekdays within the specified period.

## 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": [
      "from",
      "to"
     ],
     "properties": {
      "to": {
       "type": "string",
       "description": "YYYY-MM-DD"
      },
      "from": {
       "type": "string",
       "description": "YYYY-MM-DD"
      },
      "region": {
       "type": "string",
       "description": "Optional ISO 3166-2 region: ES-AN,ES-AR,ES-AS,ES-CB,ES-CE,ES-CL,ES-CM,ES-CN,ES-CT,ES-EX,ES-GA,ES-IB,ES-MC,ES-MD,ES-ML,ES-NC,ES-PV,ES-RI,ES-VC"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "to": "2026-12-31",
  "from": "2026-12-01",
  "region": "ES-CT",
  "weekendDays": 8,
  "businessDays": 19,
  "holidaysOnWeekdays": 4
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/spain-business-days-calculator-f98fdb9d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from spain-agent-toolkit.spain-agent-toolkit.workers.dev](https://www.zero.xyz/host/spain-agent-toolkit.spain-agent-toolkit.workers.dev/llms.txt)
