{
  "openapi": "3.0.1",
  "info": {
    "title": "Companies House Scraper — UK Company, Officers & PSC",
    "description": "Get structured UK company data from the Companies House public API. Search by name, number, SIC code, location, incorporation date or status. Optional officers and PSC. Contains public sector information licensed under the Open Government Licence v3.0. Source: Companies House.",
    "version": "1.0",
    "x-build-id": "cEjldLA9JoNr59qQi"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kingly_apple~companies-house-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kingly_apple-companies-house-scraper",
        "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/kingly_apple~companies-house-scraper/runs": {
      "post": {
        "operationId": "runs-sync-kingly_apple-companies-house-scraper",
        "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/kingly_apple~companies-house-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-kingly_apple-companies-house-scraper",
        "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": {
          "apiKey": {
            "title": "Companies House API key",
            "type": "string",
            "description": "Your Companies House REST API key, sent as the HTTP Basic username with an empty password. Required for every run except the built-in default test (company 00445790, maxItems omitted, 1, or the schema default, no other search filters), which may use the platform COMPANIES_HOUSE_API_KEY. When apiKey is set, it is always the key that is used. The key is never written to logs, the dataset, or key-value stores."
          },
          "companyNameKeywords": {
            "title": "Company name keywords",
            "type": "array",
            "description": "Company name keywords. Used alone with GET /search/companies. Combined with SIC, location, status, or incorporation dates, they are sent as company_name_includes on GET /advanced-search/companies.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "companyNumbers": {
            "title": "Company numbers",
            "type": "array",
            "description": "Company numbers. Spaces are removed, letters uppercased, and short numeric values left-padded to 8 digits. Values that are not 8 letters or digits are skipped. The console prefills Tesco PLC, 00445790. Runs that omit this field do not receive a company number.",
            "items": {
              "type": "string"
            }
          },
          "sicCodes": {
            "title": "SIC codes",
            "type": "array",
            "description": "5-digit SIC 2007 codes, for example 47110. Sent to advanced search as sic_codes.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "location": {
            "title": "Registered office location",
            "type": "string",
            "description": "Town, region, or postcode fragment of the registered office, for example London. Sent to advanced search as location."
          },
          "incorporatedFrom": {
            "title": "Incorporated from",
            "type": "string",
            "description": "Inclusive incorporation date (YYYY-MM-DD). The run fails before any request when this is later than incorporatedTo."
          },
          "incorporatedTo": {
            "title": "Incorporated to",
            "type": "string",
            "description": "Inclusive incorporation date (YYYY-MM-DD)."
          },
          "companyStatus": {
            "title": "Company status",
            "type": "array",
            "description": "Limit results to these company statuses. Leave empty for any status.",
            "items": {
              "type": "string",
              "enum": [
                "active",
                "dissolved",
                "liquidation",
                "receivership",
                "administration",
                "voluntary-arrangement",
                "converted-closed",
                "insolvency-proceedings",
                "registered",
                "removed",
                "closed",
                "open"
              ],
              "enumTitles": [
                "Active",
                "Dissolved",
                "Liquidation",
                "Receivership",
                "Administration",
                "Voluntary arrangement",
                "Converted closed",
                "Insolvency proceedings",
                "Registered",
                "Removed",
                "Closed",
                "Open"
              ]
            },
            "default": []
          },
          "includeOfficers": {
            "title": "Include officers",
            "type": "boolean",
            "description": "Attach directors and other officers. Default is off. Officer data is personal data under UK GDPR: you are the controller, you need a lawful basis (for example KYB, AML, or due diligence), and you must not use it for unsolicited marketing. Correspondence addresses are not returned.",
            "default": false
          },
          "includePsc": {
            "title": "Include persons with significant control",
            "type": "boolean",
            "description": "Attach persons with significant control. Default is off. PSC data is personal data under UK GDPR: you are the controller, you need a lawful basis, and you must not use it for unsolicited marketing. Correspondence addresses are not returned. This Actor does not provide legal advice.",
            "default": false
          },
          "maxItems": {
            "title": "Max companies",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of company records to write. Also the maximum number of company charges.",
            "default": 100
          },
          "onlyNew": {
            "title": "Only new companies",
            "type": "boolean",
            "description": "Skip company numbers already stored in the named key-value store SEEN-COMPANIES. Successfully written numbers are saved there. The store holds company numbers only, not personal data.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}