{
  "openapi": "3.0.1",
  "info": {
    "title": "Japan Construction Company Penalty Check (government records)",
    "description": "Enter a company name in Japanese and see if Japan's construction ministry punished it in the past five years, or get totals for an industry. Returns punished yes/no, record count, types, latest date, corporate number; or exact totals by type and month. $0.02 per name, even when clean. Unofficial.",
    "version": "0.1",
    "x-build-id": "37r3Gqox7pD2VoR7y"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jpmarketdata~japan-negative-info-checker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jpmarketdata-japan-negative-info-checker",
        "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/jpmarketdata~japan-negative-info-checker/runs": {
      "post": {
        "operationId": "runs-sync-jpmarketdata-japan-negative-info-checker",
        "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/jpmarketdata~japan-negative-info-checker/run-sync": {
      "post": {
        "operationId": "run-sync-jpmarketdata-japan-negative-info-checker",
        "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": [
          "sector"
        ],
        "properties": {
          "mode": {
            "title": "What to run",
            "enum": [
              "statistics",
              "screening",
              "records"
            ],
            "type": "string",
            "description": "`statistics` gives one summary per scope — totals, punishment types, month curve, authority mix — for $0.02, and a scope with no records is not charged. `screening` answers clean or hit for each name in Company names at $0.02 a name, charged even when clean, plus $0.002 for every record that name has (and $0.004 each with full details on). `records` is `statistics` plus every record at $0.002.",
            "default": "statistics"
          },
          "sector": {
            "title": "Register to search",
            "enum": [
              "kensetugyousya",
              "takuti",
              "mansyon",
              "tintai",
              "shimeiteishi",
              "sokuryou",
              "jidousyaseibi",
              "kensetukonsaru",
              "tisitu",
              "hosyou",
              "hudousangyousya",
              "siteikakunin",
              "siteikouzou",
              "tourokujuutaku",
              "juutaku",
              "tetudou",
              "senpaku",
              "koukuu",
              "ikkyuu",
              "kentikukijun",
              "kouzoukeisan",
              "hudousan",
              "kenchikuchosakensa"
            ],
            "type": "string",
            "description": "Which of Japan's construction-ministry registers to look in. The first six are the main ones; the rest are smaller registers read by the same engine. Registers of individual professionals (architects, appraisers) always have the person's name hidden.",
            "default": "kensetugyousya"
          },
          "agencies": {
            "title": "Punishing authorities (optional)",
            "type": "array",
            "description": "Who issued the punishment: Japanese names (`高知県`, `関東地方整備局`) or English prefectures (`Kochi`); empty means nationwide. Each authority is its own scope at $0.02, and it is ignored in `screening` mode. A run stops at the $3.00 Maximum cost per run. Only four registers take it (construction, real estate, public works bans, vehicle maintenance); the rest reject it instead of answering nationwide.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "companyNames": {
            "title": "Company names in Japanese",
            "type": "array",
            "description": "The names checked in `screening` mode: $0.02 each, plus $0.002 for every record a name has. Enter the trade name in Japanese (`鹿島建設`) — the register holds Japanese names only, so `Kajima` finds nothing and would read as clean; it is reported as `not_japanese_name` and is not charged. Matching is by substring, so `サンプル建設` also matches `サンプル建設工業`. A run stops at its $3.00 Maximum cost per run.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "startYearMonth": {
            "title": "From (YYYY-MM, optional)",
            "type": "string",
            "description": "Only punishments dated in or after this month, e.g. `2024-04`. Leave empty for the whole published window, which is roughly the last five years.",
            "default": ""
          },
          "endYearMonth": {
            "title": "To (YYYY-MM, optional)",
            "type": "string",
            "description": "Only punishments dated in or before this month, e.g. `2026-03`. Leave empty for the whole published window.",
            "default": ""
          },
          "punishmentType": {
            "title": "Punishment type (optional)",
            "type": "string",
            "description": "Restrict the search to one punishment type, written exactly as the register writes it. The words differ per register — construction uses `許可取消` / `営業停止` / `指示` / `勧告`, real estate uses `免許取消` / `業務停止` / `指示` / `行政指導`. An unknown word is rejected up front, because the site would return zero hits and that reads like a clean result. Leave empty for all types.",
            "default": ""
          },
          "includeDetails": {
            "title": "Include full punishment details",
            "type": "boolean",
            "description": "Off by default, and it does nothing in `statistics` mode. In `screening` and `records` mode it reads each record's own page for the licence number, legal basis, punishment period and the stated reason, at $0.004 per record plus one extra request each. Names of company representatives shown on those pages are never collected.",
            "default": false
          },
          "maxRecords": {
            "title": "Max records per scope",
            "minimum": 10,
            "maximum": 1000,
            "type": "integer",
            "description": "How many individual records to read per scope (10 per page of results). Totals and the punishment-type breakdown are exact whatever you set. This caps the records behind the month curve and the authority mix, and it caps the $0.002-per-record charge in both `screening` and `records` mode.",
            "default": 300
          },
          "redactIndividualProprietors": {
            "title": "Hide sole proprietors' names",
            "type": "boolean",
            "description": "On by default. A record with no 13-digit corporate number is usually a sole proprietorship whose trade name is a person's name, so the name is masked and the record is flagged `isIndividualProprietor`. Turn it off only if you have a lawful basis for handling those names. Registers of individual professionals are hidden either way.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}