# Working Days API

> Working Days is a working days and business days API that counts the working days and non-working days for any country and month. Pass a two-letter country code and month number to get total counts, working date lists, and non-working days marked with holiday names. On paid plans, add a state or region for regional holidays, set a custom weekend, count between any two dates, or add business days to a date.

**Endpoint:** `GET https://api.apiverve.com/v1/workingdays`  
**Category:** Calendar  
**Cost:** 2 credits per call  
**Canonical page:** https://apiverve.com/marketplace/workingdays

## Overview

Pass a two-letter country code and a month number. The API returns totals for working and non-working days plus a list of working dates formatted as YYYY-MM-DD. Each non-working day specifies reasons such as weekends or public holidays, with holiday names included when applicable. Paid plans can add a region (such as a US state) and a custom weekend, set a custom year, count between start and end dates, and add or subtract business days with addDays.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl "https://api.apiverve.com/v1/workingdays?country=US&month=10&year=2023&region=CA&weekend=fri%2Csat&start=2026-03-01&end=2026-03-31&addDays=10" \
  -H "x-api-key: YOUR_API_KEY"
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `country` | string | Yes | The 2-letter country code you want to get the number of working days for. length 2-2 |
| `month` | integer | No | The month you want to get the number of working days for. range 1-12 |
| `year` | integer | No | The year you want to get the number of working days for; defaults to the current year. range 2000-2050. Premium field |
| `region` | string | No | Optional state or region code within the country for regional public holidays (e.g. CA for California, BY for Bavaria). length 0-5. Premium field |
| `weekend` | string | No | Comma-separated weekend days as names or numbers 0-6 (Sunday=0), or none. Defaults to the country's weekend (fri,sat for SA, IL, EG and other Gulf/MENA countries; fri for IR; sat,sun elsewhere). length 0-60. Premium field |
| `start` | string | No | Start date (YYYY-MM-DD). With end, counts working days across that range (up to 366 days, inclusive) instead of a month. With addDays, the date to count from (defaults to today). date. Premium field |
| `end` | string | No | End date (YYYY-MM-DD), inclusive. Used with start. date. Premium field |
| `addDays` | integer | No | Number of working days to add to start (negative to subtract). The start date itself is not counted. Returns resultDate plus the days it stepped over. range -250-250. date. Premium field |

## Response fields

- `workingDaysCount` — number · Total number of working days in the specified month
- `nonWorkingDaysCount` — number · Total number of non-working days in the month
- `workingDays` — array · Array of dates that are working days (YYYY-MM-DD format)
  - `nonWorkingDays.0.date` — string · Date of the non-working day in YYYY-MM-DD format
  - `nonWorkingDays.0.reasons` — array · Array of reasons why day is non-working (weekend, public holiday)
  - `nonWorkingDays.0.holiday_name` — object · Name of holiday if applicable, null for weekends

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "workingDaysCount": 21,
    "nonWorkingDaysCount": 10,
    "workingDays": [
      "2023-10-02",
      "2023-10-03",
      "2023-10-04",
      "2023-10-05",
      "2023-10-06",
      "2023-10-10",
      "2023-10-11",
      "2023-10-12",
      "2023-10-13",
      "2023-10-16",
      "2023-10-17",
      "2023-10-18",
      "2023-10-19",
      "2023-10-20",
      "2023-10-23",
      "2023-10-24",
      "2023-10-25",
      "2023-10-26",
      "2023-10-27",
      "2023-10-30",
      "2023-10-31"
    ],
    "nonWorkingDays": [
      {
        "date": "2023-10-01",
        "reasons": [
          "weekend"
        ],
        "holiday_name": null
      },
      {
        "date": "2023-10-07",
        "reasons": [
          "weekend"
        ],
        "holiday_name": null
      },
      {
        "date": "2023-10-08",
        "reasons": [
          "weekend"
        ],
        "holiday_name": null
      },
      {
        "date": "2023-10-09",
        "reasons": [
          "public holiday"
        ],
        "holiday_name": "Columbus Day"
      },
      {
        "date": "2023-10-14",
        "reasons": [
          "weekend"
        ],
        "holiday_name": null
      },
      {
        "date": "2023-10-15",
        "reasons": [
          "weekend"
        ],
        "holiday_name": null
      },
      {
        "date": "2023-10-21",
        "reasons": [
          "weekend"
        ],
        "holiday_name": null
      },
      {
        "date": "2023-10-22",
        "reasons": [
          "weekend"
        ],
        "holiday_name": null
      },
      {
        "date": "2023-10-28",
        "reasons": [
          "weekend"
        ],
        "holiday_name": null
      },
      {
        "date": "2023-10-29",
        "reasons": [
          "weekend"
        ],
        "holiday_name": null
      }
    ]
  }
}
```

## Use cases

- **Monthly Payroll Proration** — Payroll engines prorate mid-month employee salaries by dividing base pay by the exact working day count for that territory.
- **Project Deadline Forecasting** — To forecast delivery deadlines accurately, task management software skips weekends and recognized national holidays across regional teams.
- **Retainer Invoice Calculations** — When billing client retainer hours monthly, invoicing software checks total available business days to adjust expected service levels.
- **Leave Balance Deductions** — Determine how many days to deduct from employee leave balances by matching vacation requests against official non-working dates.

## SDKs

- **npm** — `npm install @apiverve/workingdays` (https://www.npmjs.com/package/@apiverve/workingdays)
- **NuGet** — `dotnet add package APIVerve.API.WorkingDays` (https://www.nuget.org/packages/APIVerve.API.WorkingDays)
- **Source** — https://github.com/apiverve/workingdays-api

## More

- Full reference: https://docs.apiverve.com/ref/workingdays
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
