{
  "openapi": "3.0.1",
  "info": {
    "title": "Japan Business Days & Calendar (Cabinet Office Official)",
    "description": "Japanese business-day calculations, national holidays, and wareki (era) conversion. Official Cabinet Office holiday data, deterministic JSON output.",
    "version": "0.1",
    "x-build-id": "7JB9fPk4EBfV1vQey"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/minako-ph~japan-business-days-calendar/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-minako-ph-japan-business-days-calendar",
        "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/minako-ph~japan-business-days-calendar/runs": {
      "post": {
        "operationId": "runs-sync-minako-ph-japan-business-days-calendar",
        "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/minako-ph~japan-business-days-calendar/run-sync": {
      "post": {
        "operationId": "run-sync-minako-ph-japan-business-days-calendar",
        "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",
        "required": [
          "operation"
        ],
        "properties": {
          "operation": {
            "title": "Operation",
            "enum": [
              "date_info",
              "wareki_to_western",
              "holidays",
              "holidays_next",
              "business_days_add",
              "business_days_count"
            ],
            "type": "string",
            "description": "What to compute. date_info = full info per date (weekday, wareki, holiday, business day, fiscal year); wareki_to_western = parse Japanese era dates like 令和8年7月11日 / R8.7.11 / reiwa 8; holidays = national holidays of the given years (one record per holiday); holidays_next = next national holiday on or after from_date; business_days_add = date N business days later (negative goes backwards); business_days_count = business days between two dates, both ends included."
          },
          "dates": {
            "title": "Dates (for date_info)",
            "type": "array",
            "description": "ISO dates (YYYY-MM-DD) to describe, e.g. 2019-04-30 (last day of Heisei), 2019-05-01 (first day of Reiwa), 2026-05-06 (substitute holiday), 2026-07-13 (regular weekday). Up to 1,000 input items per run across all operations.",
            "items": {
              "type": "string"
            }
          },
          "wareki_strings": {
            "title": "Wareki strings (for wareki_to_western)",
            "type": "array",
            "description": "Japanese era dates in any common notation: kanji (令和8年7月11日), abbreviated (R8.7.11), or romaji (reiwa 8). Year-only inputs (令和8年 / reiwa 8) return the Western year and the date range that era year covers.",
            "items": {
              "type": "string"
            }
          },
          "years": {
            "title": "Years (for holidays)",
            "type": "array",
            "description": "4-digit years, e.g. [2026, 2027]. One output record per national holiday. Years outside the bundled data coverage produce an explicit per-item error instead of a guess."
          },
          "from_date": {
            "title": "From date (for holidays_next)",
            "type": "string",
            "description": "ISO date (YYYY-MM-DD) to search from, inclusive: if from_date itself is a holiday it is returned. When omitted, today in JST (Asia/Tokyo) is used."
          },
          "items": {
            "title": "Items (for business_days_add)",
            "type": "array",
            "description": "Array of {\"date\": \"YYYY-MM-DD\", \"days\": N} objects, e.g. [{\"date\": \"2026-07-17\", \"days\": 3}]. days may be negative to go backwards; |days| up to 5000. days = 0 returns the input date unchanged."
          },
          "ranges": {
            "title": "Ranges (for business_days_count)",
            "type": "array",
            "description": "Array of {\"from\": \"YYYY-MM-DD\", \"to\": \"YYYY-MM-DD\"} objects, e.g. [{\"from\": \"2026-07-01\", \"to\": \"2026-07-31\"}]. Both ends are included in the count. Each period can span up to 100 years."
          },
          "weekend_days": {
            "title": "Weekend days (common option)",
            "type": "array",
            "description": "Weekday names treated as non-business days, among: sunday, monday, tuesday, wednesday, thursday, friday, saturday. Default is [\"saturday\", \"sunday\"]. Applies to date_info, business_days_add and business_days_count.",
            "items": {
              "type": "string"
            }
          },
          "include_national_holidays": {
            "title": "Treat national holidays as non-business days (common option)",
            "type": "boolean",
            "description": "Default true. Set false to count Japanese national holidays as business days. Non-business reasons are judged in the order weekend → national_holiday → extra_holiday.",
            "default": true
          },
          "extra_holidays": {
            "title": "Extra holidays (common option)",
            "type": "array",
            "description": "Your own company closures as ISO dates (YYYY-MM-DD), e.g. year-end shutdown [\"2026-12-30\", \"2026-12-31\"]. Up to 100 dates. Applies to date_info, business_days_add and business_days_count.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}