# Companies House Scraper — UK Company, Officers & PSC (`kingly_apple/companies-house-scraper`) Actor

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.

- **URL**: https://apify.com/kingly_apple/companies-house-scraper.md
- **Developed by:** [alex link](https://apify.com/kingly_apple) (community)
- **Categories:** Business, Lead generation, Integrations
- **Stats:** 2 total users, 1 monthly users, 87.5% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 company records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## UK Companies House Data Extractor — Fast & Cheap

Get structured UK company data from the Companies House public API. Search by name, company number, SIC code, location, incorporation date or status. Optionally add officers and persons with significant control (PSC).

### What you get

- Company name, number, type, status, jurisdiction, incorporation date
- Registered office address, SIC codes, previous names
- Accounts and confirmation statement due dates
- Optional: officers and PSC (no home addresses; birth dates as month/year only)

### Why this Actor

- Uses the Companies House public API: stable, no scraping blocks
- Built-in rate limiting (stays under 600 requests / 5 min), auto-retry on 429
- "Only new" mode for monitoring new registrations
- Bring your own free Companies House API key (stored as a secret input)

### Pricing (pay per event)

- $0.003 per company
- +$0.001 per company with officers
- +$0.001 per company with PSC
- No charge for failed lookups, 404s, or duplicates

### Data licence

Contains public sector information licensed under the Open Government Licence v3.0. Source: Companies House.
https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/

### Personal data

Officer/PSC data may be personal data under UK GDPR. You are the data controller and are responsible for lawful use.

***

*Build source: LinkDashSaber/grokbot_workspace@5576bbcd3773fc6ba641666ff055c0690bd833a6 (branch scaffold/companies-house); README from store-listing-companies-house-v1.md.*

# Actor input Schema

## `apiKey` (type: `string`):

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` (type: `array`):

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.

## `companyNumbers` (type: `array`):

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.

## `sicCodes` (type: `array`):

5-digit SIC 2007 codes, for example 47110. Sent to advanced search as sic_codes.

## `location` (type: `string`):

Town, region, or postcode fragment of the registered office, for example London. Sent to advanced search as location.

## `incorporatedFrom` (type: `string`):

Inclusive incorporation date (YYYY-MM-DD). The run fails before any request when this is later than incorporatedTo.

## `incorporatedTo` (type: `string`):

Inclusive incorporation date (YYYY-MM-DD).

## `companyStatus` (type: `array`):

Limit results to these company statuses. Leave empty for any status.

## `includeOfficers` (type: `boolean`):

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.

## `includePsc` (type: `boolean`):

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.

## `maxItems` (type: `integer`):

Maximum number of company records to write. Also the maximum number of company charges.

## `onlyNew` (type: `boolean`):

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.

## Actor input object example

```json
{
  "companyNameKeywords": [],
  "companyNumbers": [
    "00445790"
  ],
  "sicCodes": [],
  "companyStatus": [],
  "includeOfficers": false,
  "includePsc": false,
  "maxItems": 100,
  "onlyNew": false
}
```

# Actor output Schema

## `results` (type: `string`):

Structured company records written to the default dataset.

## `runStats` (type: `string`):

HTTP request totals, the busiest 5-minute window, 429s, and retries.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "companyNumbers": [
        "00445790"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("kingly_apple/companies-house-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "companyNumbers": ["00445790"] }

# Run the Actor and wait for it to finish
run = client.actor("kingly_apple/companies-house-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "companyNumbers": [
    "00445790"
  ]
}' |
apify call kingly_apple/companies-house-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kingly_apple/companies-house-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/egDRlU7hHfpuyo65b/builds/cEjldLA9JoNr59qQi/openapi.json
