{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Companies House Scraper — Directors, PSCs & Filings",
    "description": "Export UK company profiles by number, keyword or filters: several SIC codes, status, type, office and dates, plus optional officers, PSCs, charges and filings. For supplier checks and CRM cleanup. $2 per 1,000 companies.",
    "version": "0.1",
    "x-build-id": "xtc85tnwiCLZsFuuP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/stone_jadex~uk-companies-house-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-stone_jadex-uk-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/stone_jadex~uk-companies-house-scraper/runs": {
      "post": {
        "operationId": "runs-sync-stone_jadex-uk-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/stone_jadex~uk-companies-house-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-stone_jadex-uk-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": {
          "searchQueries": {
            "title": "Search keywords",
            "type": "array",
            "description": "Keywords to search on /search/companies?q=... (20 companies per page). Each keyword is searched in turn until maxItems is reached.",
            "items": {
              "type": "string"
            }
          },
          "companyNumbers": {
            "title": "Company numbers",
            "type": "array",
            "description": "Company numbers to fetch directly (e.g. 00445790 or SC241685). All-digit numbers shorter than 8 digits are padded with leading zeros (445790 becomes 00445790).",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Optional Companies House search or company profile URLs on find-and-update.company-information.service.gov.uk. Also accepted: company sub-page URLs (/officers, /persons-with-significant-control, /charges, /filing-history), which are read as the company profile, and pasted advanced-search results URLs (/advanced-search/get-results?<filters>): these are crawled; all query parameters are kept, starting at the page=N in the URL (page 1 when absent) and moving on page by page (20 companies per page) until results run out or maxItems is reached. A /advanced-search form page (the search form, with no results) passes input validation but is not crawled: it adds a warning and an errors[] entry in OUTPUT and the other inputs still run. If it is the only input, the run ends with stopReason errors, status Failed, 0 rows, and nothing is charged. Use the advanced-search filter fields instead, or paste the results page URL after running the search. A trailing slash on a supported path is accepted and removed (for example /advanced-search/get-results/, /search/companies/, /company/00445790/); /advanced-search/ (with a trailing slash) is the same form page as above (warning and errors[], sole input → stopReason errors, Failed, 0 rows, no charge), not invalid-input. The page=N parameter in a start URL must be a whole number of at least 1; otherwise (for example 2.5, -1, 0 or foo) a warning \"Ignored invalid page parameter ... starting at page 1.\" is added, the invalid page parameter is removed and the first request is page 1, for both /search/companies and /advanced-search/get-results start URLs. An empty page= counts as invalid (warning, page 1); a missing page parameter starts at page 1 without a warning. If an advanced-search results page shows a Companies House form validation error (for example Enter a valid SIC code), the run stops with stopReason errors and errors[] quotes the Companies House text, a run-notice row is still pushed, and it is not no-results (0 rows: Failed, nothing charged; after rows were written the platform status is SUCCEEDED, with OUTPUT failed true, stopReason errors, and the written rows kept and charged).",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max companies",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Stop after this many company rows. Default 50; hard cap 1000. For bulk register exports use the official free Companies House bulk data product instead.",
            "default": 50
          },
          "includeFilingHistory": {
            "title": "Include filing history",
            "type": "boolean",
            "description": "When true, fetch the company filing-history page and attach recent filing items to the row.",
            "default": false
          },
          "maxFilingHistoryPages": {
            "title": "Max filing-history pages per company",
            "minimum": 0,
            "type": "integer",
            "description": "Only used with includeFilingHistory. How many filing-history pages to read per company, newest first (25 filings per page, one request of about 2.4 s each). Default and hard cap 10 pages (250 filings): 0 or anything above 10 is treated as 10 (a warning is logged). Full history is not offered yet. filingHistoryTruncated is true when more filings exist.",
            "default": 10
          },
          "includeOfficers": {
            "title": "Include officers",
            "type": "boolean",
            "description": "When true, fetch officers/directors. Date of birth and individual correspondence/home addresses are stripped.",
            "default": false
          },
          "includePsc": {
            "title": "Include PSCs",
            "type": "boolean",
            "description": "When true, fetch persons with significant control. Date of birth and residential addresses are stripped.",
            "default": false
          },
          "includeCharges": {
            "title": "Include charges",
            "type": "boolean",
            "description": "When true, fetch the charges (mortgages) page and attach charge summaries.",
            "default": false
          },
          "requestDelaySecs": {
            "title": "Request delay (seconds)",
            "minimum": 1,
            "type": "number",
            "description": "Minimum seconds between HTTP requests. Default 1 to stay polite; GOV.UK acceptable use discourages bulk scraping of the website.",
            "default": 1
          },
          "companyNameIncludes": {
            "title": "Company name includes",
            "type": "string",
            "description": "Optional advanced-search filter: company name must contain this text. Setting any advanced-search filter adds one combined advanced search (/advanced-search/get-results) to the run, after companyNumbers and before searchQueries/startUrls; all filters set are combined in that search. With several sicCodes there is one search per SIC code instead, and all other filters set (name, address, status, type, dates) are carried to each of them. An advanced search alone is enough input."
          },
          "companyNameExcludes": {
            "title": "Company name excludes",
            "type": "string",
            "description": "Optional advanced-search filter: company name must not contain this text."
          },
          "registeredOfficeAddress": {
            "title": "Registered office address",
            "type": "string",
            "description": "Optional advanced-search filter: text matched against the registered office address, such as a town or postcode."
          },
          "sicCodes": {
            "title": "SIC codes",
            "type": "array",
            "description": "Optional advanced-search filter: SIC 2007 nature-of-business codes; each code is searched separately (Companies House accepts one SIC code per search), with the other advanced-search filters carried to every one of these searches; results are merged and de-duplicated by companyNumber, and only the unique rows actually written are charged. maxItems is shared across all SIC searches. A single entry holding several codes (for example \"62012, 47110\" or \"62012 47110\") is split on commas and whitespace first, with empty parts dropped and duplicates removed, and each code is then searched separately; the name and address filters are not split. If a provided sicCodes value contains only commas or whitespace and splits to an empty list, the run stops as invalid-input (platform Failed, 0 rows, nothing is charged, no run-notice), including when other advanced-search filters are also set.",
            "items": {
              "type": "string"
            }
          },
          "companyStatus": {
            "title": "Company status",
            "type": "array",
            "description": "Optional advanced-search filter: Companies House status values passed through as-is, such as active, dissolved, liquidation or administration (alias status: an input field named status is used when companyStatus is absent).",
            "items": {
              "type": "string"
            }
          },
          "companyTypes": {
            "title": "Company types",
            "type": "array",
            "description": "Optional advanced-search filter: Companies House company type values passed through as-is, such as ltd, plc or llp (alias type: an input field named type is used when companyTypes is absent).",
            "items": {
              "type": "string"
            }
          },
          "incorporatedFrom": {
            "title": "Incorporated from",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Optional advanced-search filter: earliest incorporation date. Format YYYY-MM-DD (any other format stops the run as invalid input). Sent to /advanced-search/get-results as day, month and year fields."
          },
          "incorporatedTo": {
            "title": "Incorporated to",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Optional advanced-search filter: latest incorporation date. Format YYYY-MM-DD (any other format stops the run as invalid input). Sent to /advanced-search/get-results as day, month and year fields."
          },
          "dissolvedFrom": {
            "title": "Dissolved from",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Optional advanced-search filter: earliest dissolution date. Format YYYY-MM-DD (any other format stops the run as invalid input). Sent to /advanced-search/get-results as day, month and year fields."
          },
          "dissolvedTo": {
            "title": "Dissolved to",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Optional advanced-search filter: latest dissolution date. Format YYYY-MM-DD (any other format stops the run as invalid input). Sent to /advanced-search/get-results as day, month and year fields."
          },
          "onlyNew": {
            "title": "Only new companies (incremental)",
            "type": "boolean",
            "description": "Default false. When true, company numbers already recorded in the named key-value store stateRecordName (legacy alias stateKey) are skipped at the list stage (search results and companyNumbers): they are not requested or charged, and are counted in OUTPUT alreadySeenSkipped. Only companies that were charged and written successfully are added to the seen set, so a failed or blocked company is retried next run. Rows written in this mode carry isNew true.",
            "default": false
          },
          "stateRecordName": {
            "title": "State store name",
            "type": "string",
            "description": "Only used with onlyNew. Name of the named key-value store that keeps the seen set under the record seenCompanyNumbers (an array of 8-character company numbers). Default companies-house-seen. Use a different name per saved search/task to keep separate seen sets; the named store persists between runs. Legacy alias: stateKey.",
            "default": "companies-house-seen"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}