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.
Available endpoints:
- /v1/workingdays - Get a list of working days and non-working days for a given country and year/month
- /v1/isworkingday - Check if a specific date is a working day
From 8,050 users
Applications using this API
API Status
API Response Times
Average | P50 | P75 | P90 | P95 |
|---|---|---|---|---|
| 305ms | 326ms | 400ms | 593ms | 1123ms |
Similar APIs
Didn't find what you were looking for? Suggest an improvement
/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
countryrequired2-letter ISO country code.
yearoptional premium onlyCalendar year between 1980 and 2050 (inclusive). By default, the current year is used.
monthoptionalMonth number (1-12). If provided, returns data for just that month.
weekendoptionalComma-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_holidaysoptionalWhether to include public holidays as non-working days (true/false). Defaults to true.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
A JSON object with the following fields or an error if the request is unsuccessful.
num_working_daysTotal number of working days in the period.
num_non_working_daysTotal number of non-working days in the period.
working_daysList of dates that are working days.
non_working_daysList of dates that are non-working days, with reasons and holiday names if applicable.
Sample Request Live Demo!
Try our APIs in the API playground
Sign up for a free API key to get started — no credit card required.
https://api.api-ninjas.com/v1/workingdays?country=USHeaders
X-Api-KeyLog in or sign up to get your API KeySample Response
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
countryrequired2-letter ISO country code.
daterequiredDate in
YYYY-MM-DDformat. Must be between 1980-01-01 and 2050-12-31 (inclusive).weekendoptionalComma-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_holidaysoptionalWhether to include public holidays as non-working days (
true/false). Defaults totrue.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
A JSON object with the following fields or an error if the request is unsuccessful.
dateThe queried date.
country2-letter ISO country code.
day_of_weekDay of the week (Monday through Sunday).
is_workdayWhether the date is a working day.
non_working_reasonList of reasons why the date is not a working day (if applicable).
public_holiday_nameName of the public holiday (if applicable).
Sample Request Live Demo!
Try our APIs in the API playground
Sign up for a free API key to get started — no credit card required.
https://api.api-ninjas.com/v1/isworkingday?country=US&date=2025-01-01Headers
X-Api-KeyLog in or sign up to get your API KeySample Response
Frequently Asked Questions
Can I use the Working Days API for commercial purposes?
Yes, but you must have a premium subscription. Commercial use of the Working Days API is not permitted on the free tier. See our pricing page to choose a plan that fits your needs.How do I get an API key and start using the Working Days API?
Sign up for a free account to instantly get your API key, then pass it in theX-Api-Keyheader on every request. The documentation above includes ready-to-run examples in cURL, Python, JavaScript, Node.js, and more.What happens if I exceed my quota for the month?
Your API requests will simply be denied once you hit your monthly quota — you will never be charged more than the plan you signed up for. To increase your quota, you can upgrade your plan any time on our pricing page.What happens if a request to the Working Days API fails?
The API responds with a standard HTTP status code and a JSON error message describing the problem. See our error codes reference for the full list of codes and how to resolve each one, or contact support if you need help.What is the difference between the /v1/workingdays and /v1/isworkingday endpoints?
The/v1/workingdaysendpoint returns a full breakdown of working and non-working days for a country across a year or month, includingnum_working_days,num_non_working_days, and arrays ofworking_daysandnon_working_days. The/v1/isworkingdayendpoint instead checks a singledateand returns fields likeis_workday,day_of_week, andnon_working_reason; browse all available endpoints in the API catalog.How do I get working days for a specific month or year?
Pass a 2-letter ISOcountrycode (required), optionally withyear(1980-2050, defaults to the current year and requires a premium plan) andmonth(1-12) to scope results to a single month. Omittingmonthreturns data for the entire year.Can I customize which days count as the weekend or whether holidays are included?
Yes. Both endpoints accept an optionalweekendparameter, a comma-separated list of days (mon,tue,wed,thu,fri,sat,sun) that overrides the country defaults, and apublic_holidaysflag (defaults to true) to control whether public holidays are treated as non-working days.How do I find the names of holidays that make a date a non-working day?
Each item in thenon_working_daysarray includes areasonslist and aholiday_namewhen applicable, while/v1/isworkingdayreturnsnon_working_reasonandpublic_holiday_name; for a dedicated holiday lookup see the Holidays API.