{
  "openapi": "3.0.1",
  "info": {
    "title": "Japan Company Data — gBizINFO (Official API)",
    "description": "Search Japan's 4.5M+ corporations via the official gBizINFO REST API: by name/prefecture/industry, or by 13-digit corporate number. Returns number, name, address, capital, employees, founding date and more (English-keyed). Bring your own free token. Personal names excluded. Unofficial.",
    "version": "0.1",
    "x-build-id": "C2GiSKN3GQK3a5IDk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jpopendata~japan-gbizinfo-companies/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jpopendata-japan-gbizinfo-companies",
        "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/jpopendata~japan-gbizinfo-companies/runs": {
      "post": {
        "operationId": "runs-sync-jpopendata-japan-gbizinfo-companies",
        "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/jpopendata~japan-gbizinfo-companies/run-sync": {
      "post": {
        "operationId": "run-sync-jpopendata-japan-gbizinfo-companies",
        "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": [
          "apiToken"
        ],
        "properties": {
          "apiToken": {
            "title": "Your gBizINFO API token (required)",
            "type": "string",
            "description": "REQUIRED. YOUR OWN gBizINFO API token (a long alphanumeric string). This Actor does NOT bundle a shared key — every request runs under your own token, sent in the X-hojinInfo-api-token header, and gBizINFO's access limits apply to you. Register (free) and issue a token: https://info.gbiz.go.jp/hojin/api_registration/form → the token is e-mailed to you."
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "by_corporate_number"
            ],
            "type": "string",
            "description": "`search` (default) runs a filtered full-text search over corporations (GET /v1/hojin) — set at least one of searchWord / prefecture / businessItem / corporateType. `by_corporate_number` looks up specific corporations by 13-digit number (GET /v1/hojin/{number}) — set corporateNumber. If you pass only corporate numbers the Actor switches to by_corporate_number for you. Example: \"search\".",
            "default": "search"
          },
          "searchWord": {
            "title": "Company name / keyword (search)",
            "type": "string",
            "description": "search mode: full-text search over the corporate name (maps to the API `name` filter), Japanese matches best, e.g. \"トヨタ\", \"製作所\". At least one filter (searchWord, prefecture, businessItem, or corporateType) is required in search mode."
          },
          "corporateNumber": {
            "title": "Corporate number(s) (by_corporate_number)",
            "type": "array",
            "description": "by_corporate_number mode (REQUIRED there): one or more 13-digit Japanese corporate numbers (法人番号), e.g. [\"5010001000001\"]. A comma-separated string is also accepted; hyphens/full-width digits are tolerated.",
            "items": {
              "type": "string"
            }
          },
          "prefecture": {
            "title": "Prefecture (search)",
            "enum": [
              "Hokkaido",
              "Aomori",
              "Iwate",
              "Miyagi",
              "Akita",
              "Yamagata",
              "Fukushima",
              "Ibaraki",
              "Tochigi",
              "Gunma",
              "Saitama",
              "Chiba",
              "Tokyo",
              "Kanagawa",
              "Niigata",
              "Toyama",
              "Ishikawa",
              "Fukui",
              "Yamanashi",
              "Nagano",
              "Gifu",
              "Shizuoka",
              "Aichi",
              "Mie",
              "Shiga",
              "Kyoto",
              "Osaka",
              "Hyogo",
              "Nara",
              "Wakayama",
              "Tottori",
              "Shimane",
              "Okayama",
              "Hiroshima",
              "Yamaguchi",
              "Tokushima",
              "Kagawa",
              "Ehime",
              "Kochi",
              "Fukuoka",
              "Saga",
              "Nagasaki",
              "Kumamoto",
              "Oita",
              "Miyazaki",
              "Kagoshima",
              "Okinawa"
            ],
            "type": "string",
            "description": "search mode (optional): restrict the search to a prefecture — pick one of the 47 prefectures by English name, e.g. \"Tokyo\", \"Osaka\" (via the API the Japanese name \"東京都\", the JIS code \"13\" or romanisations such as \"osaka-fu\" also work)."
          },
          "businessItem": {
            "title": "Business item / industry code (search)",
            "type": "string",
            "description": "search mode (optional): restrict by 営業品目 (business item) code — maps to the API `business_item` filter (e.g. \"101\"). See the gBizINFO API spec for the code list."
          },
          "corporateType": {
            "title": "Corporate type code (search)",
            "type": "string",
            "description": "search mode (optional): restrict by 法人種別 (corporate type) 3-digit code — maps to the API `corporate_type` filter, e.g. \"301\" (株式会社), \"302\" (有限会社), \"305\" (合同会社)."
          },
          "includeClosed": {
            "title": "Include closed corporations",
            "type": "boolean",
            "description": "Include closed/dissolved corporations too (sets exist_flg=true). Default: active corporations only. \"true\"/\"false\" strings are tolerated.",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of company records to output, 1-100000 (default 1000). Search results are paged automatically. PPE charges per record.",
            "default": 1000
          },
          "maxApiRequests": {
            "title": "Max upstream requests per run",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Hard safety cap on API requests per run, 1-50 (default 20). Politeness (1 connection, >= 1.2 s spacing, exponential backoff on 429/5xx) is enforced in code; gBizINFO returns HTTP 429 on short-burst bulk access.",
            "default": 20
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify proxy settings. Default is NO proxy (direct connection) — an official JSON API rarely needs one. The Actor backs off exponentially on 429/5xx and fails visibly on a persistent block; it never attempts rate-limit evasion.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}