{
  "openapi": "3.0.1",
  "info": {
    "title": "Japan Construction & Real Estate License Registry Stats",
    "description": "Official MLIT registry stats for any Japanese prefecture in one call: exact counts of licensed construction companies (all 29 trades) or real-estate brokers, exact national vs prefectural license split, city mix and renewal-based broker age. From $0.02 per area — no subscription. 建設業・宅建業の許認可統計。",
    "version": "0.1",
    "x-build-id": "VBwJWRmgxcOWJtKgL"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jpmarketdata~japan-construction-license-checker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jpmarketdata-japan-construction-license-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-construction-license-checker/runs": {
      "post": {
        "operationId": "runs-sync-jpmarketdata-japan-construction-license-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-construction-license-checker/run-sync": {
      "post": {
        "operationId": "run-sync-jpmarketdata-japan-construction-license-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": [
          "prefectures"
        ],
        "properties": {
          "registry": {
            "title": "Registry",
            "enum": [
              "construction",
              "realestate"
            ],
            "type": "string",
            "description": "Which official MLIT registry to analyze. 'construction' = licensed construction companies (建設業許可業者, 29 trades). 'realestate' = licensed real-estate brokers (宅地建物取引業者).",
            "default": "construction"
          },
          "prefectures": {
            "title": "Prefectures",
            "type": "array",
            "description": "One or more prefectures. Accepts English names (Tokyo, Osaka, Kochi), Japanese names (東京都, 大阪府) or JIS codes (13, 27, 39). Companies are matched on their head-office location. Each prefecture costs $0.02.",
            "default": [
              "13"
            ],
            "items": {
              "type": "string"
            }
          },
          "businessTypes": {
            "title": "Construction business types (optional)",
            "type": "array",
            "description": "Construction registry only. Limit the per-trade breakdown to specific trades. Accepts codes (1-29), English names (Building construction, Electrical works, Demolition) or Japanese names (建築一式, 電気, 解体). Leave empty to get the breakdown for all 29 trades.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "breakdownByBusinessType": {
            "title": "Break down by business type",
            "type": "boolean",
            "description": "Construction registry only. Adds the exact number of licensed companies for each of the 29 trades (one extra request per trade, ~30s). Turn off for the fastest possible run.",
            "default": true
          },
          "includeIndividualCompanies": {
            "title": "Include individual companies",
            "type": "boolean",
            "description": "Off by default: a run costs a flat $0.02 per prefecture summary. Enable to also get every sampled company (name, license authority & number, office, address, city) at +$0.002 per company. Representative names are never collected.",
            "default": false
          },
          "maxCompaniesPerArea": {
            "title": "Max companies sampled per area",
            "minimum": 50,
            "maximum": 600,
            "type": "integer",
            "description": "How many companies to sample per prefecture (50 per result page, spread evenly over the whole alphabetically sorted result set). More companies = more accurate license-split, city and renewal statistics, and more records when 'Include individual companies' is on.",
            "default": 150
          },
          "licenseTypeBreakdown": {
            "title": "General / specific license breakdown",
            "type": "boolean",
            "description": "Construction registry only. Adds the number of general (一般建設業) and specific (特定建設業) licensees for the prefecture (2 extra requests). A company may hold both, so the two counts can overlap.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}