{
  "openapi": "3.0.1",
  "info": {
    "title": "Japan Laws & Regulations (e-Gov Law API)",
    "description": "Search Japanese laws and regulations by title or keyword, extract articles or whole laws, and retrieve amendment histories from the official e-Gov Law API v2.",
    "version": "1.0",
    "x-build-id": "qFubNfiTgj0RpQmsf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/vespa-zzz~egov-laws/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-vespa-zzz-egov-laws",
        "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/vespa-zzz~egov-laws/runs": {
      "post": {
        "operationId": "runs-sync-vespa-zzz-egov-laws",
        "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/vespa-zzz~egov-laws/run-sync": {
      "post": {
        "operationId": "run-sync-vespa-zzz-egov-laws",
        "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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "keyword",
              "fullText",
              "revisions"
            ],
            "type": "string",
            "description": "Search law titles, search within law text, retrieve full text, or list amendment history.",
            "default": "search"
          },
          "lawTitle": {
            "title": "Law title contains",
            "type": "string",
            "description": "Partial Japanese law title or abbreviation. Used in Law search."
          },
          "keyword": {
            "title": "Search keyword",
            "type": "string",
            "description": "Japanese search term or e-Gov search expression. Required for Full-text keyword search."
          },
          "lawType": {
            "title": "Law types",
            "type": "array",
            "description": "Keep laws of any selected type. Applies to Law search and Full-text keyword search.",
            "items": {
              "type": "string",
              "enum": [
                "Constitution",
                "Act",
                "CabinetOrder",
                "ImperialOrder",
                "MinisterialOrdinance",
                "Rule",
                "Misc"
              ]
            }
          },
          "categoryCd": {
            "title": "Categories",
            "type": "array",
            "description": "Keep laws in any selected e-Gov category. Applies to Law search and Full-text keyword search.",
            "items": {
              "type": "string",
              "enum": [
                "001",
                "002",
                "003",
                "004",
                "005",
                "006",
                "007",
                "008",
                "009",
                "010",
                "011",
                "012",
                "013",
                "014",
                "015",
                "016",
                "017",
                "018",
                "019",
                "020",
                "021",
                "022",
                "023",
                "024",
                "025",
                "026",
                "027",
                "028",
                "029",
                "030",
                "031",
                "032",
                "033",
                "034",
                "035",
                "036",
                "037",
                "038",
                "039",
                "040",
                "041",
                "042",
                "043",
                "044",
                "045",
                "046",
                "047",
                "048",
                "049",
                "050"
              ],
              "enumTitles": [
                "憲法",
                "刑事",
                "財務通則",
                "水産業",
                "観光",
                "国会",
                "警察",
                "国有財産",
                "鉱業",
                "郵務",
                "行政組織",
                "消防",
                "国税",
                "工業",
                "電気通信",
                "国家公務員",
                "国土開発",
                "事業",
                "商業",
                "労働",
                "行政手続",
                "土地",
                "国債",
                "金融・保険",
                "環境保全",
                "統計",
                "都市計画",
                "教育",
                "外国為替・貿易",
                "厚生",
                "地方自治",
                "道路",
                "文化",
                "陸運",
                "社会福祉",
                "地方財政",
                "河川",
                "産業通則",
                "海運",
                "社会保険",
                "司法",
                "災害対策",
                "農業",
                "航空",
                "防衛",
                "民事",
                "建築・住宅",
                "林業",
                "貨物運送",
                "外事"
              ]
            }
          },
          "promulgationDateFrom": {
            "title": "Promulgated on or after",
            "type": "string",
            "description": "Earliest promulgation date to include (YYYY-MM-DD). Applies to Law search and Full-text keyword search."
          },
          "promulgationDateTo": {
            "title": "Promulgated on or before",
            "type": "string",
            "description": "Latest promulgation date to include (YYYY-MM-DD). Applies to Law search and Full-text keyword search."
          },
          "asof": {
            "title": "Law as of date",
            "type": "string",
            "description": "Select the latest applicable revision as of this date (YYYY-MM-DD). Applies to Law search and Full-text keyword search."
          },
          "repealStatus": {
            "title": "Repeal status",
            "type": "array",
            "description": "Keep laws with any selected repeal status. Applies to Law search.",
            "items": {
              "type": "string",
              "enum": [
                "None",
                "Repeal",
                "Expire",
                "Suspend",
                "LossOfEffectiveness"
              ],
              "enumTitles": [
                "None",
                "Repealed",
                "Expired",
                "Suspended",
                "Loss of effectiveness"
              ]
            }
          },
          "laws": {
            "title": "Laws",
            "type": "array",
            "description": "Law IDs, official law numbers, or exact Japanese titles. Required for Law text and Amendment history. Example ID is the Act on National Flag and Anthem.",
            "items": {
              "type": "string"
            }
          },
          "includeSupplementaryProvisions": {
            "title": "Include supplementary provisions",
            "type": "boolean",
            "description": "Include supplementary article records or supplementary provision text in Law text mode.",
            "default": false
          },
          "outputFormat": {
            "title": "Law text output format",
            "enum": [
              "articles",
              "whole"
            ],
            "type": "string",
            "description": "Choose one row per numbered article or one row with the whole plain-text law. Applies to Law text.",
            "default": "articles"
          },
          "includeRawXml": {
            "title": "Include raw law XML",
            "type": "boolean",
            "description": "Include the original XML returned by e-Gov in Law text mode when the output format is Whole. It can contain supplementary provisions and references to attachments.",
            "default": false
          },
          "amendmentDateFrom": {
            "title": "Amendment effective on or after",
            "type": "string",
            "description": "Earliest amendment enforcement date to include (YYYY-MM-DD). Applies to Amendment history."
          },
          "amendmentDateTo": {
            "title": "Amendment effective on or before",
            "type": "string",
            "description": "Latest amendment enforcement date to include (YYYY-MM-DD). Applies to Amendment history."
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum total dataset rows per run, across all input laws (default: 100). In Law text and Amendment history, increase maxResults for large laws with many articles or revisions.",
            "default": 100
          },
          "requestIntervalMs": {
            "title": "Delay between requests (ms)",
            "minimum": 500,
            "type": "integer",
            "description": "Minimum pause before the next e-Gov request. Requests run sequentially. Retries can wait longer.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}