Working Days API
The Working Days API provides information about working days and non-working days (weekends and public holidays) for countries around the world.
Checking API status...
/v1/workingdays GET
https://api.api-ninjas.com/v1/workingdays
Returns a list of working days and non-working days for a given country and year/month.
To check if a specific date is a working day, use the /v1/isworkingday endpoint instead.
Parameters
- countryrequired- 2-letter ISO country code. 
- yearoptional Premium only- Calendar year between 1980 and 2050 (inclusive). By default, the current year is used. 
- monthoptional- Month number (1-12). If provided, returns data for just that month. 
- weekendoptional- Comma-separated list of weekend days ( - mon,- tue,- wed,- thu,- fri,- sat,- sun). This parameter is optional: if not provided, the default weekend days will be determined based on the country. If specified, your values will override the country defaults.
- public_holidaysoptional- Whether to include public holidays as non-working days (true/false). Defaults to true. 
Headers
- X-Api-Keyrequired- API Key associated with your account. 
Response
The response will be a JSON object with the following fields:
- num_working_days- Total number of working days in the period. 
- num_non_working_days- Total number of non-working days in the period. 
- working_days- List of dates that are working days. 
- non_working_days- List of dates that are non-working days, with reasons and holiday names if applicable. 
Sample Request Live Demo!
https://api.api-ninjas.com/v1/workingdays?country=USHeaders
X-Api-KeyLog in or sign up to get your API KeySample Response
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{
  "num_working_days": 251,
  "num_non_working_days": 114,
  "working_days": [
    "2025-01-02",
    "2025-01-03",
    "2025-01-06",
    "2025-01-07",
    ...
  ],
  "non_working_days": [
    {
      "date": "2025-01-01",
      "reasons": ["public holiday"],
      "holiday_name": "New Year's Day"
    },
    {
      "date": "2025-01-04",
      "reasons": ["weekend"]
    },
    ...
  ]
}Code Examples
1
2
curl -X GET "https://api.api-ninjas.com/v1/workingdays?country=US&year=2025" \
  -H "X-Api-Key: YOUR_API_KEY"If your programming language is not listed in the Code Example above, you can still make API calls by using a HTTP request library written in your programming language and following the above documentation.
/v1/isworkingday GET
https://api.api-ninjas.com/v1/workingdays
Returns whether a given date is a working day for a given country.
Parameters
- countryrequired- 2-letter ISO country code. 
- daterequired- Date in - YYYY-MM-DDformat. Must be between 1980-01-01 and 2050-12-31 (inclusive).
- weekendoptional- Comma-separated list of weekend days ( - mon,- tue,- wed,- thu,- fri,- sat,- sun). This parameter is optional: if not provided, the default weekend days will be determined based on the country. If specified, your values will override the country defaults.
- public_holidaysoptional- Whether to include public holidays as non-working days ( - true/- false). Defaults to- true.
Headers
- X-Api-Keyrequired- API Key associated with your account. 
Response
The response will be a JSON object with the following fields:
- date- The queried date. 
- country- 2-letter ISO country code. 
- day_of_week- Day of the week (Monday through Sunday). 
- is_workday- Whether the date is a working day. 
- non_working_reason- List of reasons why the date is not a working day (if applicable). 
- public_holiday_name- Name of the public holiday (if applicable). 
Sample Request
https://api.api-ninjas.com/v1/isworkingday?country=US&date=2025-01-01Sample Response
1
2
3
4
5
6
7
8
{
  "date": "2025-01-01",
  "country": "US", 
  "day_of_week": "Wednesday",
  "is_workday": false,
  "non_working_reason": ["public holiday"],
  "public_holiday_name": "New Year's Day"
}