{
  "openapi": "3.0.1",
  "info": {
    "title": "Business Days & Holidays API - 200 Countries, Time Zones",
    "description": "Public holidays for about 200 countries, add-N-working-days maths that skips weekends and local holidays, business-day checks and time zone lookup in one call. Nager.Date plus offline data. Batch thousands of queries for SLA, HR and delivery tools.",
    "version": "1.0",
    "x-build-id": "QB7ykQFuY2sSCoNgc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/that_red_bird~business-calendar-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-that_red_bird-business-calendar-api",
        "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/that_red_bird~business-calendar-api/runs": {
      "post": {
        "operationId": "runs-sync-that_red_bird-business-calendar-api",
        "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/that_red_bird~business-calendar-api/run-sync": {
      "post": {
        "operationId": "run-sync-that_red_bird-business-calendar-api",
        "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": {
          "operation": {
            "title": "What to calculate",
            "enum": [
              "holidays",
              "addWorkingDays",
              "workingDaysBetween",
              "isBusinessDay",
              "timezone"
            ],
            "type": "string",
            "description": "holidays lists the public holidays of a country and year. addWorkingDays adds (or subtracts) N working days to a date. workingDaysBetween counts working days between two dates. isBusinessDay checks one date. timezone finds the time zone of a city or coordinates.",
            "default": "holidays"
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "ISO 3166 country code such as US, GB, FR, DE, TN. For holidays you may give several separated by commas (US,GB,FR). For time zone lookups it only helps to choose between cities with the same name.",
            "default": "US"
          },
          "region": {
            "title": "State or region",
            "type": "string",
            "description": "Optional state or region code to include regional holidays, for example CA for California, BY for Bavaria, or ENG for England. Leave empty for nationwide holidays only.",
            "default": ""
          },
          "year": {
            "title": "Year",
            "minimum": 0,
            "maximum": 2200,
            "type": "integer",
            "description": "Year for the holiday list. 0 means the current year.",
            "default": 0
          },
          "date": {
            "title": "Start date",
            "type": "string",
            "description": "Date as YYYY-MM-DD for addWorkingDays, workingDaysBetween (start) and isBusinessDay. Leave empty for today (UTC).",
            "default": ""
          },
          "endDate": {
            "title": "End date",
            "type": "string",
            "description": "End date as YYYY-MM-DD, only for workingDaysBetween. Both the start and end date are counted. Leave empty for today (UTC).",
            "default": ""
          },
          "days": {
            "title": "Working days to add",
            "minimum": -3650,
            "maximum": 3650,
            "type": "integer",
            "description": "Number of working days to add to the start date for addWorkingDays. Negative numbers go back in time.",
            "default": 5
          },
          "latitude": {
            "title": "Latitude",
            "type": "string",
            "description": "Latitude for the time zone lookup, for example 36.8065. Decimal numbers are typed as text because the input form has no decimal field.",
            "default": ""
          },
          "longitude": {
            "title": "Longitude",
            "type": "string",
            "description": "Longitude for the time zone lookup, for example 10.1815.",
            "default": ""
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "City name for the time zone lookup when no coordinates are given, for example Tunis or Austin. Uses an offline list of about 7,000 cities.",
            "default": ""
          },
          "queries": {
            "title": "Batch queries (JSON)",
            "type": "array",
            "description": "Optional. A list of queries answered in one run; when filled it replaces the fields above. Each query is an object such as {\"op\":\"addWorkingDays\",\"country\":\"US\",\"start\":\"2026-12-23\",\"days\":5} or {\"op\":\"holidays\",\"country\":\"FR\",\"year\":2027} or {\"op\":\"timezone\",\"city\":\"Tunis\"}.",
            "default": []
          },
          "holidaySource": {
            "title": "Holiday data source",
            "enum": [
              "auto",
              "nager",
              "offline"
            ],
            "type": "string",
            "description": "auto uses Nager.Date (about 100 countries, official list) and falls back to the offline date-holidays data (about 200 countries and many regions). nager uses only Nager.Date. offline uses only the built-in data and never calls the web.",
            "default": "auto"
          },
          "includeObservances": {
            "title": "Count observances as days off",
            "type": "boolean",
            "description": "When off (default) only public and bank holidays are listed and skipped by the working-day maths. When on, observances and optional holidays (Valentine's Day, Mother's Day...) are included too.",
            "default": false
          },
          "weekend": {
            "title": "Weekend days",
            "type": "string",
            "description": "Leave empty to use the country's usual weekend (Saturday and Sunday; Friday and Saturday in Saudi Arabia, Egypt, Israel and similar countries). Or list the days, for example sat,sun or fri,sat.",
            "default": ""
          },
          "maxQueries": {
            "title": "Maximum queries",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Safety limit on the number of queries answered in one run.",
            "default": 5000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}