# US Business Days Calculator

> US Business Days Calculator is a paid API for AI agents from agent-utils-x402-production.revenue-agent-jw.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-28).

Returns the count of US business days and federal holidays between two dates

## Facts

- Endpoint: GET https://agent-utils-x402-production.revenue-agent-jw.workers.dev/v1/calendar/us-business-days?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-28
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/us-business-days-calculator-ecc447b4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_j5aAHU_BLtXv38U8k2paX

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 us-business-days-calculator-ecc447b4
```

Example prompt: How many US business days are there between January 5, 2026 and March 31, 2026, and are there any federal holidays in that period?

## When to prefer this

Choose this endpoint when you need an accurate count of US business days between two dates with federal holidays accounted for, without requiring an account or API key — especially useful in agentic workflows where you pay per call via USDC on Base. Prefer this over manual calculation or generic date libraries when compliance with the US federal holiday calendar matters for scheduling, payroll, or contract terms.

## Known failure modes

- Missing 'from' or 'to' query parameters returns a 400 error
- Invalid date format (non-ISO 8601) causes a parse error
- Date range where 'from' is after 'to' may return 0 or an error
- Payment failure via x402 returns 402 Payment Required before processing
- Very large date ranges may still return quickly but result in large holiday arrays

## How this service works

Small pay-per-call utility APIs for AI agents. Pay per request in USDC on Base via x402 (v2, exact scheme). No accounts, no API keys.

## Output

A JSON object containing 'businessDays' (integer count of US business days excluding weekends and federal holidays) and 'federalHolidaysOnWeekdays' (array of objects each with 'date' and 'name' for any federal holidays falling on weekdays within the specified range).

## 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",
       "format": "date"
      },
      "from": {
       "type": "string",
       "format": "date"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "businessDays": 41,
  "federalHolidaysOnWeekdays": [
   {
    "date": "2026-11-11",
    "name": "Veterans Day"
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/us-business-days-calculator-ecc447b4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-utils-x402-production.revenue-agent-jw.workers.dev](https://www.zero.xyz/host/agent-utils-x402-production.revenue-agent-jw.workers.dev/llms.txt)
