{
  "openapi": "3.0.1",
  "info": {
    "title": "Working Days Calculator: Business Days & Public Holidays",
    "description": "Working days calculator: add or count business days and working hours for 200+ countries and their regions, public holidays, Gulf Friday/Saturday weekends, Islamic holidays with Hijri dates, and TARGET2 / stock-exchange calendars. Combine calendars for cross-border deadlines. Pure computation.",
    "version": "1.0",
    "x-build-id": "gK1J4F42RQAmKUBEv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/wooden_scanner_c1n~business-day-deadline-calculator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-wooden_scanner_c1n-business-day-deadline-calculator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/wooden_scanner_c1n~business-day-deadline-calculator/runs": {
      "post": {
        "operationId": "runs-sync-wooden_scanner_c1n-business-day-deadline-calculator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/wooden_scanner_c1n~business-day-deadline-calculator/run-sync": {
      "post": {
        "operationId": "run-sync-wooden_scanner_c1n-business-day-deadline-calculator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "calculations": {
            "title": "Calculations (batch)",
            "type": "array",
            "description": "A JSON array, one object per calculation. Each object has an 'operation' (add_business_days, subtract_business_days, count_business_days, next_business_day, previous_business_day, is_business_day, add_calendar_days, add_business_hours, list_holidays), 'calendars' (e.g. [\"AE\"], [\"DE-BY\"], [\"XECB\", \"SA\"]) and the dates it needs: 'startDate', 'endDate', 'days', 'startDateTime', 'hours', 'rollConvention'. Optional 'label' is echoed back. Any field left out is taken from the shared settings below. Leave the whole list empty to use the single-calculation fields below, or to run the built-in examples."
          },
          "operation": {
            "title": "Operation (single calculation)",
            "enum": [
              "add_business_days",
              "subtract_business_days",
              "count_business_days",
              "next_business_day",
              "previous_business_day",
              "is_business_day",
              "add_calendar_days",
              "add_business_hours",
              "list_holidays"
            ],
            "type": "string",
            "description": "Used when 'Calculations' is empty and a start date is given.",
            "default": "add_business_days"
          },
          "startDate": {
            "title": "Start date",
            "type": "string",
            "description": "YYYY-MM-DD."
          },
          "endDate": {
            "title": "End date",
            "type": "string",
            "description": "YYYY-MM-DD. For count_business_days and list_holidays."
          },
          "days": {
            "title": "Days",
            "minimum": -3660,
            "maximum": 3660,
            "type": "integer",
            "description": "Business days (or calendar days for add_calendar_days). Negative goes backwards."
          },
          "startDateTime": {
            "title": "Start date-time (working hours)",
            "type": "string",
            "description": "Local wall-clock time for add_business_hours, e.g. 2026-12-24T15:00."
          },
          "hours": {
            "title": "Working hours to add",
            "minimum": -20000,
            "maximum": 20000,
            "type": "integer",
            "description": "For add_business_hours (decimals such as 2.5 are accepted in the batch JSON)."
          },
          "calendars": {
            "title": "Calendars (shared)",
            "type": "array",
            "description": "ISO country codes (AE, SA, QA, KW, BH, OM, EG, IE, GB, US...), country-subdivision (DE-BY, US-NY, GB-SCT, CA-QC) or market calendars (XECB or TARGET2, XNYS, XLON, XSAU...). With several calendars a day counts only if it is a business day in all of them.",
            "items": {
              "type": "string"
            }
          },
          "weekendDays": {
            "title": "Weekend override",
            "type": "array",
            "description": "Replace the calendars' own weekend, e.g. [\"Friday\"] for a six-day week. Leave empty to use each country's official weekend.",
            "items": {
              "type": "string"
            }
          },
          "extraHolidays": {
            "title": "Extra closed days",
            "type": "array",
            "description": "Company shutdowns or newly announced bridge days, YYYY-MM-DD.",
            "items": {
              "type": "string"
            }
          },
          "extraWorkingDays": {
            "title": "Extra working days",
            "type": "array",
            "description": "Dates that count as business days even if they are a weekend or holiday, YYYY-MM-DD.",
            "items": {
              "type": "string"
            }
          },
          "workdayStart": {
            "title": "Workday start",
            "type": "string",
            "description": "For add_business_hours, HH:MM.",
            "default": "09:00"
          },
          "workdayEnd": {
            "title": "Workday end",
            "type": "string",
            "description": "For add_business_hours, HH:MM (up to 23:59).",
            "default": "17:00"
          },
          "rollConvention": {
            "title": "Roll convention",
            "enum": [
              "following",
              "modified_following",
              "preceding",
              "modified_preceding",
              "none"
            ],
            "type": "string",
            "description": "For add_calendar_days: what to do when the date lands on a non-business day.",
            "default": "following"
          },
          "maxCalculations": {
            "title": "Max calculations",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Safety cap. You pay per successful calculation; rejected inputs are free.",
            "default": 1000
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}