Business-Day API

API ID 12996

Accurate business-day, holiday, and scheduling math for major countries and their subdivisions — without maintaining a single holiday calendar yourself. Add or subtract working days, check if a date is a business day, find the next valid date, or count working days between two dates, with full support for regional subdivisions, custom weekends, and your own blackout dates. One simple GET call, instant JSON.

203 ms 平均响应

API 文档

端点

请求

Checks whether a given date is a working business day for a country or region, accounting for weekends, public holidays, and any custom blackout dates you supply. Returns true or false. Supports regional subdivisions (e.g. US states, German Länder) and configurable weekend days for Friday/Saturday-weekend regions.

Endpoint ID: 26001
GET https://zylalabs.com/api/12996/business-day+api/26001/is+business+day
输入参数

Is Business Day — 端点功能

对象 描述
date 必需 Date to check, ISO format YYYY-MM-DD (e.g. 2026-12-25)
region 必需 ISO country code, e.g. US, GB, DE, CA
weekend 可选 Optional weekend days, comma-separated Mon=0 to Sun=6. Default 5,6 (Sat/Sun). Use 4,5 for Friday/Saturday regions
extra_holidays 可选 Optional comma-separated ISO dates to treat as non-working days
subdiv 可选 Optional state/province/region code, e.g. CA for California or BY for Bavaria

剩余免费测试请求:3 / 3。


输入参数

date
region
weekend
extra_holidays
subdiv
API 示例响应
JSON
{"date":"2026-12-25","region":"US","is_business_day":false}
Is Business Day — 代码片段

curl --location --request GET 'https://zylalabs.com/api/12996/business-day+api/26001/is+business+day?date=Required®ion=Required' --header 'Authorization: Bearer YOUR_API_KEY' 


    
请求

Adds or subtracts a number of working business days to a date, skipping weekends, public holidays, and any custom blackout dates. Supports regional subdivisions and configurable weekends.

Endpoint ID: 26002
GET https://zylalabs.com/api/12996/business-day+api/26002/add+business+days
输入参数

Add Business Days — 端点功能

对象 描述
date 必需 Date to check, ISO format YYYY-MM-DD (e.g. 2026-12-25)
days 必需 Number of business days to add. Use a negative number to subtract, e.g. 5 or -3
region 必需 ISO country code, e.g. US, GB, DE, CA
subdiv 可选 Optional state/province/region code, e.g. CA for California or BY for Bavaria
weekend 可选 Optional weekend days, comma-separated Mon=0 to Sun=6. Default 5,6 (Sat/Sun). Use 4,5 for Friday/Saturday regions
extra_holidays 可选 Optional comma-separated ISO dates to treat as non-working days, e.g. 2026-07-06

剩余免费测试请求:3 / 3。


输入参数

date
days
region
subdiv
weekend
extra_holidays
API 示例响应
JSON
{"start":"2026-07-02","days":5,"result":"2026-07-10"}
Add Business Days — 代码片段

curl --location --request GET 'https://zylalabs.com/api/12996/business-day+api/26002/add+business+days?date=2026-07-02&days=5®ion=US' --header 'Authorization: Bearer YOUR_API_KEY' 


    
请求

返回给定日期当天或之后的第一个工作日,跳过周末、公共假期和自定义停业日期。如果日期本身已经是工作日,则设置inclusive=true以允许该日期

Endpoint ID: 26003
GET https://zylalabs.com/api/12996/business-day+api/26003/next+business+day
输入参数

下一个工作日 — 端点功能

对象 描述
date 必需 Date to check, ISO format YYYY-MM-DD (e.g. 2026-12-25)
region 必需 ISO country code, e.g. US, GB, DE, CA
inclusive 可选 Optional true or false. If true, returns the date itself when it is already a working day. Default false
subdiv 可选 Optional state/province/region code, e.g. CA for California or BY for Bavaria
weekend 可选 Optional weekend days, comma-separated Mon=0 to Sun=6. Default 5,6 (Sat/Sun). Use 4,5 for Friday/Saturday regions
extra_holidays 可选 Optional comma-separated ISO dates to treat as non-working days, e.g. 2026-07-06

剩余免费测试请求:3 / 3。


输入参数

date
region
inclusive
subdiv
weekend
extra_holidays
API 示例响应
JSON
{"from":"2026-07-02","result":"2026-07-06"}
下一个工作日 — 代码片段

curl --location --request GET 'https://zylalabs.com/api/12996/business-day+api/26003/next+business+day?date=2026-07-02®ion=US' --header 'Authorization: Bearer YOUR_API_KEY' 


    
请求

Counts the number of working business days between two dates, excluding weekends, public holidays, and custom blackout dates. Supports regional subdivisions and configurable weekends.

Endpoint ID: 26004
GET https://zylalabs.com/api/12996/business-day+api/26004/business+days+between
输入参数

Business Days Between — 端点功能

对象 描述
start 必需 Start date in ISO format YYYY-MM-DD, e.g. 2026-07-01
end 必需 End date in ISO format YYYY-MM-DD, e.g. 2026-07-31
region 必需 ISO country code, e.g. US, GB, DE, CA
subdiv 可选 Optional state/province/region code, e.g. CA for California or BY for Bavaria
weekend 可选 Optional weekend days, comma-separated Mon=0 to Sun=6. Default 5,6 (Sat/Sun). Use 4,5 for Friday/Saturday regions
extra_holidays 可选 Optional comma-separated ISO dates to treat as non-working days, e.g. 2026-07-06

剩余免费测试请求:3 / 3。


输入参数

start
end
region
subdiv
weekend
extra_holidays
API 示例响应
JSON
{"start":"2026-07-01","end":"2026-07-31","business_days":21}
Business Days Between — 代码片段

curl --location --request GET 'https://zylalabs.com/api/12996/business-day+api/26004/business+days+between?start=2026-07-01&end=2026-07-31®ion=US' --header 'Authorization: Bearer YOUR_API_KEY' 


    

API 访问密钥和身份验证

注册后,每个开发者都会被分配一个个人 API 访问密钥,这是一个唯一的字母和数字组合,用于访问我们的 API 端点。要使用 Business-Day API 进行身份验证,只需在 Authorization 标头中包含您的 bearer token。

标头
标头 描述
授权 必需 应为 Bearer access_key. 订阅后,请查看上方的"您的 API 访问密钥"。

无长期承诺。随时升级、降级或取消。 免费试用包括最多 50 个请求。

(年度计费可节省 2 个月 🎉)

🚀 企业版套餐

起价
$ 10,000/年


  • 自定义数量
  • 自定义速率限制
  • 专业客户支持
  • 实时 API 监控

概览

Date arithmetic looks trivial until you cross a border. "Five business days from today" means something different in California than in Bavaria, observed-holiday rules shift weekends around, some regions don't even use a Saturday/Sunday weekend, and every customer has their own closures on top of the public calendar. Getting this wrong quietly breaks SLA clocks, delivery estimates, payment settlement windows, and appointment scheduling.

This API handles all of it behind one endpoint. Public holidays for over 100 countries and their subdivisions (US states, German Länder, Canadian provinces, and more) are kept current for you. On top of that you get the things a raw calendar can't do on its own: working-day arithmetic, configurable weekend days for non-Mon–Fri regions, and per-request custom holidays so a customer's own office closures fold into the calculation.

Built for logistics and delivery-date estimation, fintech settlement and payment scheduling, SLA and ticket-aging clocks, payroll, and any appointment or booking system that has to respect real working days. Responses are small, cacheable JSON and return in milliseconds.

Highlights

  • 100+ countries with regional subdivision support
  • Add / subtract business days, with correct observed-holiday handling
  • Check any date, find the next working day, or count working days in a range
  • Configurable weekends (e.g. Friday/Saturday regions)
  • Per-request custom holidays / blackout dates
  • Tiny JSON in, tiny JSON out — one GET call, no SDK required

Endpoint reference

All endpoints are GET. Dates are ISO YYYY-MM-DD. region is an ISO country code (e.g. US, GB, DE, CA). Optional params:

  • subdiv — state/province/region code (e.g. CA for California, BY for Bavaria)
  • weekend — comma-separated weekday numbers, Monday=0 … Sunday=6. Default 5,6 (Sat/Sun). Example: 4,5 for a Friday/Saturday weekend.
  • extra_holidays — comma-separated ISO dates to treat as non-working (a customer's own closures), merged with the public calendar.

1. Is business day — GET /v1/is-business-day

Returns whether a date is a working day (not a weekend, public holiday, or supplied blackout date).

Param Required Example
date yes 2026-12-25
region yes US
subdiv no CA
weekend no 5,6
extra_holidays no 2026-12-24

Request:

 
GET /v1/is-business-day?date=2026-12-25&region=US

Response:

 
json
{ "date": "2026-12-25", "region": "US", "is_business_day": false }

2. Add business days — GET /v1/add-business-days

Adds (or subtracts, if days is negative) N working days to a date.

Param Required Example
date yes 2026-07-02
days yes 5
region yes US
subdiv no CA
weekend no 5,6
extra_holidays no 2026-07-06

Request:

 
GET /v1/add-business-days?date=2026-07-02&days=5&region=US&subdiv=CA

Response:

 
json
{ "start": "2026-07-02", "days": 5, "result": "2026-07-10" }

(July 3 is the observed Independence Day holiday, plus two weekends, so five working days lands on July 10.)

3. Next business day — GET /v1/next-business-day

Returns the first working day after a date. Pass inclusive=true to allow the date itself if it is already a working day.

Param Required Example
date yes 2026-12-25
region yes US
inclusive no false
subdiv no CA
weekend no 5,6
extra_holidays no

Request:

 
GET /v1/next-business-day?date=2026-12-25&region=US

Response:

 
json
{ "from": "2026-12-25", "result": "2026-12-28" }

4. Business days between — GET /v1/business-days-between

Counts working days in the half-open interval (start, end]. Negative if end precedes start.

Param Required Example
start yes 2026-12-24
end yes 2026-12-31
region yes US
subdiv no CA
weekend no 5,6
extra_holidays no

Request:

 
GET /v1/business-days-between?start=2026-12-24&end=2026-12-31&region=US

Response:

 
json
{ "start": "2026-12-24", "end": "2026-12-31", "business_days": 4 }

Errors

  • 400 — bad input (malformed date, out-of-range weekend, unsupported region). Body: { "detail": "" }
  • 401 — missing or invalid key (handled by the marketplace layer).
  • 429 — rate limit exceeded.

International examples (demonstrate coverage, don't just claim it)

These show the regional parameters actually changing the result — the most credible thing a browsing developer can see. All values verified against the live calendars.

Subdivisions matter — same date, different answer

Epiphany (Jan 6, 2026, a Tuesday) is a public holiday in Bavaria but a normal working day in Berlin:

 
GET /v1/is-business-day?date=2026-01-06&region=DE&subdiv=BY
{ "date": "2026-01-06", "region": "DE", "is_business_day": false }

GET /v1/is-business-day?date=2026-01-06&region=DE&subdiv=BE
{ "date": "2026-01-06", "region": "DE", "is_business_day": true }

The arithmetic reflects it too — adding one working day to Wed June 3 skips Corpus Christi (Thu June 4) in Bavaria, but not in Berlin:

 
GET /v1/add-business-days?date=2026-06-03&days=1&region=DE&subdiv=BY
{ "start": "2026-06-03", "days": 1, "result": "2026-06-05" }

GET /v1/add-business-days?date=2026-06-03&days=1&region=DE&subdiv=BE
{ "start": "2026-06-03", "days": 1, "result": "2026-06-04" }

Non-Mon–Fri weekends

Egypt with a Friday/Saturday weekend — one working day after Thursday March 5 lands on Sunday March 8, not Friday:

 
GET /v1/add-business-days?date=2026-03-05&days=1&region=EG&weekend=4,5
{ "start": "2026-03-05", "days": 1, "result": "2026-03-08" }

GET /v1/next-business-day?date=2026-03-05&region=EG&weekend=4,5
{ "from": "2026-03-05", "result": "2026-03-08" }

Counting working days under a Friday/Saturday weekend (Saudi Arabia, Mar 1–8):

 
GET /v1/business-days-between?start=2026-03-01&end=2026-03-08&region=SA&weekend=4,5
{ "start": "2026-03-01", "end": "2026-03-08", "business_days": 5 }

Region changes the holiday set

July 3, 2026 is the observed US Independence Day holiday, but an ordinary working day in the UK:

 
GET /v1/is-business-day?date=2026-07-03&region=US
{ "date": "2026-07-03", "region": "US", "is_business_day": false }

GET /v1/is-business-day?date=2026-07-03&region=GB
{ "date": "2026-07-03", "region": "GB", "is_business_day": true }

Business-Day API FAQs

Each endpoint returns JSON data that indicates business day status, calculated dates, or the number of working days. For example, the "Is Business Day" endpoint returns whether a specific date is a working day, while the "Add Business Days" endpoint provides the resulting date after adding or subtracting business days.

Key fields in the response include "date" (the input date), "region" (the specified region), "is_business_day" (boolean for business day status), "result" (calculated date), and "business_days" (count of working days between two dates).

参数包括“日期”(必填)“地区”(必填)“子区域”(可选,用于子划分)“周末”(可选,用于自定义周末)“天数”(必填,用于加/减天数)和“额外假期”(可选,用于自定义黑名单日期)

The response data is structured in a JSON format with key-value pairs. Each endpoint's response contains relevant fields based on the request, such as "start," "end," and "result" for date calculations, allowing users to easily parse and utilize the information.

The data is sourced from official holiday calendars for over 100 countries and their subdivisions. The API maintains current holiday information to ensure accuracy, allowing users to rely on it for precise business day calculations.

典型的用例包括物流和交货日期估算、财务结算调度、服务水平协议跟踪、工资处理和预约调度,其中准确的工作日计算对业务运营至关重要

Users can customize requests by specifying parameters such as "subdiv" for regional subdivisions, "weekend" for non-standard weekends, and "extra_holidays" for custom closures, tailoring the calculations to their specific needs.

Users can utilize the returned data by interpreting the "is_business_day" field to determine scheduling feasibility, using "result" for planning future dates, and leveraging "business_days" for understanding timelines between events or deadlines.

一般常见问题

Zyla API Hub 就像一个大型 API 商店,您可以在一个地方找到数千个 API。我们还为所有 API 提供专门支持和实时监控。注册后,您可以选择要使用的 API。请记住,每个 API 都需要自己的订阅。但如果您订阅多个 API,您将为所有这些 API 使用相同的密钥,使事情变得更简单。
价格以 USD(美元)、EUR(欧元)、CAD(加元)、AUD(澳元)和 GBP(英镑)列出。我们接受所有主要的借记卡和信用卡。我们的支付系统使用最新的安全技术,由 Stripe 提供支持,Stripe 是世界上最可靠的支付公司之一。如果您在使用卡片付款时遇到任何问题,请通过 [email protected]

此外,如果您已经以这些货币中的任何一种(USD、EUR、CAD、AUD、GBP)拥有有效订阅,该货币将保留用于后续订阅。只要您没有任何有效订阅,您可以随时更改货币。
定价页面上显示的本地货币基于您 IP 地址的国家/地区,仅供参考。实际价格以 USD(美元)为单位。当您付款时,即使您在我们的网站上看到以本地货币显示的等值金额,您的卡片对账单上也会以美元显示费用。这意味着您不能直接使用本地货币付款。
有时,银行可能会因其欺诈保护设置而拒绝收费。我们建议您首先联系您的银行,检查他们是否阻止了我们的收费。此外,您可以访问账单门户并更改关联的卡片以进行付款。如果这些方法不起作用并且您需要进一步帮助,请通过 [email protected]
价格由月度或年度订阅决定,具体取决于所选计划。
API 调用根据成功请求从您的计划中扣除。每个计划都包含您每月可以进行的特定数量的调用。只有成功的调用(由状态 200 响应指示)才会计入您的总数。这确保失败或不完整的请求不会影响您的月度配额。
Zyla API Hub 采用月度订阅系统。您的计费周期将从您购买付费计划的那一天开始,并在下个月的同一日期续订。因此,如果您想避免未来的费用,请提前取消订阅。
要升级您当前的订阅计划,只需转到 API 的定价页面并选择您要升级到的计划。升级将立即生效,让您立即享受新计划的功能。请注意,您之前计划中的任何剩余调用都不会转移到新计划,因此在升级时请注意这一点。您将被收取新计划的全部金额。
要检查您本月剩余多少 API 调用,请参考响应标头中的 "X-Zyla-API-Calls-Monthly-Remaining" 字段。例如,如果您的计划允许每月 1,000 个请求,而您已使用 100 个,则响应标头中的此字段将显示 900 个剩余调用。
要查看您的计划允许的最大 API 请求数,请检查 "X-Zyla-RateLimit-Limit" 响应标头。例如,如果您的计划包括每月 1,000 个请求,此标头将显示 1,000。
"X-Zyla-RateLimit-Reset" 标头显示您的速率限制重置之前的秒数。这告诉您何时您的请求计数将重新开始。例如,如果它显示 3,600,则意味着还有 3,600 秒直到限制重置。
是的,您可以随时通过访问您的账户并在账单页面上选择取消选项来取消您的计划。请注意,升级、降级和取消会立即生效。此外,取消后,您将不再有权访问该服务,即使您的配额中还有剩余调用。
为了让您有机会在没有任何承诺的情况下体验我们的 API,我们提供 7 天免费试用,允许您免费进行最多 50 次 API 调用。此试用只能使用一次,因此我们建议将其应用于您最感兴趣的 API。虽然我们的大多数 API 都提供免费试用,但有些可能不提供。试用在 7 天后或您进行了 50 次请求后结束,以先发生者为准。如果您在试用期间达到 50 次请求限制,您需要"开始您的付费计划"以继续发出请求。您可以在个人资料中的订阅 -> 选择您订阅的 API -> 定价标签下找到"开始您的付费计划"按钮。或者,如果您在第 7 天之前不取消订阅,您的免费试用将结束,您的计划将自动计费,授予您访问计划中指定的所有 API 调用的权限。请记住这一点以避免不必要的费用。
7 天后,您将被收取试用期间订阅的计划的全额费用。因此,在试用期结束前取消很重要。因忘记及时取消而提出的退款请求不被接受。
当您订阅 API 免费试用时,您可以进行最多 50 次 API 调用。如果您希望超出此限制进行额外的 API 调用,API 将提示您执行"开始您的付费计划"。您可以在个人资料中的订阅 -> 选择您订阅的 API -> 定价标签下找到"开始您的付费计划"按钮。
付款订单在每月 20 日至 30 日之间处理。如果您在 20 日之前提交请求,您的付款将在此时间范围内处理。
您可以通过我们的聊天渠道联系我们以获得即时帮助。我们始终在线,时间为上午 8 点至下午 5 点(EST)。如果您在该时间之后联系我们,我们将尽快回复您。此外,您可以通过 [email protected]

相关 API