{
  "openapi": "3.0.1",
  "info": {
    "title": "Japan Law Data — e-Gov + official English translations",
    "description": "Japanese legislation from the official e-Gov law index: 9,500+ statutes, cabinet orders, ministerial ordinances, rules and the Constitution, with law numbers, promulgation dates, categories and in-force status, joined with the Ministry of Justice's official English translations.",
    "version": "0.1",
    "x-build-id": "qDth5ojkmsAKJJx0l"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/epiconetic~japan-law-data/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-epiconetic-japan-law-data",
        "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/epiconetic~japan-law-data/runs": {
      "post": {
        "operationId": "runs-sync-epiconetic-japan-law-data",
        "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/epiconetic~japan-law-data/run-sync": {
      "post": {
        "operationId": "run-sync-epiconetic-japan-law-data",
        "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": {
          "includeEnglish": {
            "title": "Include official English translation",
            "type": "boolean",
            "description": "Attach the official English title and law number of every statute that the Ministry of Justice has translated (2,261 of 9,577 statutes). The English metadata comes from an offline index shipped with the Actor, so it costs no extra requests. Records with an official translation are billed under the 'bilingual' event.",
            "default": true
          },
          "includeFullText": {
            "title": "Include full statutory text",
            "type": "boolean",
            "description": "Also fetch the full article text of each law (Japanese from e-Gov, English from the Ministry of Justice translation when available) and attach it as 'fullText' / 'fullTextEn'. One statute can be 800 KB and 900+ articles, so this is off by default and billed under the 'detail' event.",
            "default": false
          },
          "includeRepealed": {
            "title": "Include repealed statutes",
            "type": "boolean",
            "description": "Include statutes that have been repealed, expired or lost their effect (571 of 9,577). When off (default) only statutes currently in force are returned, and the filter is applied server-side by e-Gov so it is cheaper and faster.",
            "default": false
          },
          "refresh": {
            "title": "Bulk refresh mode",
            "type": "boolean",
            "description": "Cheap metadata-only re-index of the whole corpus, billed under the 'bulk-refresh' event. Full text and English translation are ignored in this mode. Useful for scheduled refresh jobs that only need the current law index.",
            "default": false
          },
          "search": {
            "title": "Keyword filter",
            "type": "string",
            "description": "Optional keyword matched against the Japanese title, law number, category and also against the official English title and law number. e-Gov ignores keyword filtering server-side, so this filter runs locally. Example: 'Civil Code', '所得税', 'Act No. 132 of 1950'.",
            "default": ""
          },
          "lawTypes": {
            "title": "Law types",
            "type": "array",
            "description": "Restrict to specific instrument types. e-Gov ignores the type filter server-side, so the Actor screens every record locally. A statute with a compound e-Gov type (e.g. 'Act,CabinetOrder') matches if any one of its types is listed. Leave empty for all types.",
            "items": {
              "type": "string",
              "enum": [
                "Act",
                "CabinetOrder",
                "MinisterialOrdinance",
                "Rule",
                "ImperialOrder",
                "Constitution"
              ],
              "enumTitles": [
                "Act — laws passed by the Diet (2,145)",
                "Cabinet Order — enacted by the Cabinet (2,432)",
                "Ministerial Ordinance — enacted by a ministry (4,453)",
                "Rule — rules of the ministries and agencies (454)",
                "Imperial Order — 勅令 (71)",
                "Constitution of Japan (1)"
              ]
            },
            "default": []
          },
          "categories": {
            "title": "Subject categories",
            "type": "array",
            "description": "Optional Japanese subject categories used by e-Gov, e.g. 民事 (civil), 労働 (labour), 国税 (national tax), 環境保全 (environmental conservation). Filtered locally. Leave empty for all categories.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "eras": {
            "title": "Eras",
            "type": "array",
            "description": "Optional filter by Japanese era. Filtered locally. Leave empty for all eras.",
            "items": {
              "type": "string",
              "enum": [
                "Meiji",
                "Taisho",
                "Showa",
                "Heisei",
                "Reiwa"
              ],
              "enumTitles": [
                "Meiji (1868–1912)",
                "Taisho (1912–1926)",
                "Showa (1926–1989)",
                "Heisei (1989–2019)",
                "Reiwa (2019–)"
              ]
            },
            "default": []
          },
          "lawIds": {
            "title": "Specific e-Gov law IDs",
            "type": "array",
            "description": "Fetch specific statutes by their e-Gov law_id, e.g. '325AC0000000144' (Act No. 144 of 1950) or '322AC0000000164' (Constitution of Japan). Exact server-side lookup, no paging needed.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "jltIds": {
            "title": "Specific JLT law IDs",
            "type": "array",
            "description": "Fetch specific statutes by their Japan Law Translation id, e.g. '24' (Public Assistance Act) or '5274' (Broadcasting Act). The Actor resolves the id through the official translation index and then fetches the matching e-Gov statute.",
            "items": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "default": []
          },
          "promulgatedFrom": {
            "title": "Promulgated from",
            "type": "string",
            "description": "Only include statutes promulgated on or after this date. Accepts YYYY or YYYY-MM-DD. Filtered locally.",
            "default": ""
          },
          "promulgatedTo": {
            "title": "Promulgated to",
            "type": "string",
            "description": "Only include statutes promulgated on or before this date. Accepts YYYY or YYYY-MM-DD. Filtered locally.",
            "default": ""
          },
          "maxItems": {
            "title": "Maximum records",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Maximum number of statutes written to the dataset in this run. Use a higher value to pull the whole corpus (9,577 statutes = 96 pages).",
            "default": 100
          },
          "maxPages": {
            "title": "Maximum pages",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of e-Gov index pages to read in this run (100 statutes per page). 0 = unlimited. Use it together with 'resume' to walk the corpus over several runs.",
            "default": 0
          },
          "resume": {
            "title": "Resume previous run",
            "type": "boolean",
            "description": "Continue where the previous run with the same settings stopped, instead of starting from the beginning. Progress is stored in a private key-value store.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}