# Companies House UK Scraper (`devilscrapes/companies-house-uk-scraper`) Actor

Search UK Companies House by keyword, or by town, SIC code, status and incorporation date range. One row per company: number, status, incorporation date, SIC codes, address, optional details and officers. We handle blocks and retries.

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

## Pricing

Pay per event

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

<div align="center">
  <img src=".actor/icon.svg" width="160" alt="Devil Scrapes mark" />

## Companies House UK Scraper

**💰 $3.20 / 1 000 results**  ·  pay only for results  ·  no credit card to try

*We do the dirty work so your dataset stays clean.* 😈

Search UK Companies House by keyword, or by town, SIC code, status and incorporation date range. One row per company: number, status, incorporation date, SIC codes, address, optional details and officers. We handle blocks and retries.

</div>

***

### 🎯 What this scrapes

UK Companies House publishes every registered company in the country. We search it by company name, or by town, SIC code, status and incorporation date range, and return one clean, deduplicated row per company: number, status, incorporation date, SIC codes and registered address, with optional company details and officers.

### 🔥 What we handle for you

- 🛡️ **We send browser-grade requests** (curl-cffi Chrome impersonation) so Companies House sees a real browser, not Python.
- 🔁 **We retry failed pages automatically** with exponential backoff on `408 / 429 / 5xx`, up to 5 attempts per page, honouring `Retry-After`.
- 🌐 **We rotate the Apify Proxy session** with a fresh exit IP on every block.
- 🧊 **We keep the dataset clean** — Pydantic-validated rows, deduplicated by company number across every query and page, ISO-8601 dates.
- 💰 **You pay only for results that land.** No companies, no charge — only the small actor-start fee.

### 💡 Use cases

- **Lead generation** — list active software companies in Leeds (SIC 62020) incorporated this year.
- **Sales prospecting** — find newly incorporated companies by town and industry code before competitors do.
- **KYC and due diligence** — check status, incorporation date and officers for a list of company names.
- **Market research** — count and profile companies by SIC code, town and incorporation window.

### ⚙️ How to use it

1. Click **Try for free** at the top of the page.
2. Fill in the input form — most fields have sensible defaults.
3. Click **Start**. Output streams into the run's dataset.
4. Export from **Storage → Dataset** as JSON, CSV, or Excel — or fetch via the API.

### 📥 Input

| Field | Type | Required | Default | Notes |
|---|---|:--:|---|---|
| `mode` | `string` | no | 'advanced' | search = keyword search by company name. advanced = lead-gen filters (town, SIC code, status, incorporation dates). |
| `queries` | `array` | no | \[] | Company name keywords. Required in keyword search mode; each query is searched separately. |
| `town` | `string` | no | 'Leeds' | Registered-office town or address text for advanced mode, for example Leeds. |
| `sicCodes` | `array` | no | \[] | 4 or 5 digit UK SIC 2007 codes for advanced mode, for example 62020. |
| `status` | `string` | no | 'active' | Advanced mode status filter. any applies no status filter. |
| `incorporatedFrom` | `string` | no | '—' | Advanced mode: only companies incorporated on or after this date (YYYY-MM-DD). |
| `incorporatedTo` | `string` | no | '—' | Advanced mode: only companies incorporated on or before this date (YYYY-MM-DD). |
| `includeDetails` | `boolean` | no | False | Fetch each company page for SIC descriptions, company type and registered address. One extra request per company; no… |
| `includeOfficers` | `boolean` | no | False | Fetch each company's officers list. One extra request per company; no extra charge. |
| `maxResults` | `integer` | no | 30 | Maximum number of companies to return across the whole run. |
| `proxyConfiguration` | `object` | no | {'useApifyProxy': True} | Apify Proxy settings. The default is Apify datacenter proxy. |

#### Example input

```json
{
  "mode": "advanced",
  "town": "Leeds",
  "sicCodes": [
    "62020"
  ],
  "status": "active",
  "maxResults": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

### 📤 Output

Every row is one dataset item.

| Field | Type | Notes |
|---|---|---|
| `companyNumber` | `string` | Companies House company number (dedup key). |
| `name` | `string` | Registered company name. |
| `status` | `['string', 'null']` | Normalised status: active, dissolved, liquidation or other. |
| `statusDetail` | `['string', 'null']` | Raw status text as shown on the site. |
| `incorporatedOn` | `['string', 'null']` | Incorporation date, ISO-8601. |
| `dissolvedOn` | `['string', 'null']` | Dissolution date, ISO-8601. |
| `companyType` | `['string', 'null']` | Company type, for example Private limited company. |
| `sicCodes` | `array` | SIC 2007 codes. |
| `sicDescriptions` | `array` | SIC descriptions (includeDetails only). |
| `address` | `['string', 'null']` | Registered office address. |
| `previousNames` | `array` | Matching previous company names. |
| `url` | `string` | Companies House company page URL. |
| `officers` | `['array', 'null']` | Officers list (includeOfficers only). |
| `scrapedAt` | `string` | UTC scrape timestamp, ISO-8601. |

#### Example output

```json
{
  "companyNumber": "13106211",
  "name": "ISOROBOT LIMITED",
  "status": "active",
  "statusDetail": "Active",
  "incorporatedOn": "2020-12-31",
  "dissolvedOn": null,
  "companyType": "Private limited company",
  "sicCodes": [
    "62012",
    "62020",
    "70229"
  ],
  "address": "20 Syke Lane, Scarcroft, Leeds, England LS14 3BQ",
  "previousNames": [],
  "url": "https://find-and-update.company-information.service.gov.uk/company/13106211",
  "officers": null,
  "scrapedAt": "2026-10-11T09:00:00Z"
}
```

### 💰 Pricing

Pay-Per-Event — you pay only when these events fire:

| Event | USD | What it is |
|---|---:|---|
| `actor-start` | $0.2 | One-off warm-up charge per run |
| `result` | $0.003 | Per dataset item |

Example: 1 000 results at the rates above ≈ **$3.20**. No subscription, no minimum, no card to start — Apify gives every new account $5 of free credit.

### 🚧 Limitations

Rows carry the public company data shown on Companies House search and company pages. Accounts, filing history, charges and persons with significant control are not included. Search is capped by the source at 10,000 results per query. Officer lists cover the first page of appointments shown (up to 35). The incorporation end-date filter is covered by unit tests only and has not been confirmed against the live site.

### ❓ FAQ

**Do I need a Companies House API key?**

No. Give us keywords or filters and we do the rest.

**What is the difference between the two modes?**

Keyword search matches company names. Advanced mode filters by town, SIC code, status and incorporation dates.

**How many companies can one search return?**

Up to 10,000 per run. The source serves 20 companies per page and we page automatically, stopping when results end.

**What do includeDetails and includeOfficers add?**

includeDetails adds SIC descriptions, company type and the registered address from the company page. includeOfficers adds the officers list. Each costs one extra request per company and adds no extra charge.

**What does a run cost?**

$3.00 per 1,000 companies plus a one-off $0.20 start fee.

### 💬 Your feedback

Spotted a bug, hit a weird edge case, or need a new field? Open an
issue on the Actor's **Issues** tab on Apify Console — we ship
fixes weekly and we read every report.

***

<div align="center">

Built by **[Devil Scrapes](https://apify.com/DevilScrapes)** 😈 — a small fleet of
opinionated public-data Actors. Honest pricing, real engineering, zero fine print.

</div>

# Changelog

This Actor's version history is a separate document: https://apify.com/devilscrapes/companies-house-uk-scraper/changelog.md

# Actor input Schema

## `mode` (type: `string`):

search = keyword search by company name. advanced = lead-gen filters (town, SIC code, status, incorporation dates).

## `queries` (type: `array`):

Company name keywords. Required in keyword search mode; each query is searched separately.

## `town` (type: `string`):

Registered-office town or address text for advanced mode, for example Leeds.

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

4 or 5 digit UK SIC 2007 codes for advanced mode, for example 62020.

## `status` (type: `string`):

Advanced mode status filter. any applies no status filter.

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

Advanced mode: only companies incorporated on or after this date (YYYY-MM-DD).

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

Advanced mode: only companies incorporated on or before this date (YYYY-MM-DD).

## `includeDetails` (type: `boolean`):

Fetch each company page for SIC descriptions, company type and registered address. One extra request per company; no extra charge.

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

Fetch each company's officers list. One extra request per company; no extra charge.

## `maxResults` (type: `integer`):

Maximum number of companies to return across the whole run.

## `proxyConfiguration` (type: `object`):

Apify Proxy settings. The default is Apify datacenter proxy.

## Actor input object example

```json
{
  "mode": "advanced",
  "queries": [],
  "town": "Leeds",
  "sicCodes": [
    "62020"
  ],
  "status": "active",
  "includeDetails": false,
  "includeOfficers": false,
  "maxResults": 30,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `output` (type: `string`):

All dataset items as JSON.

## `datasetItemsCsv` (type: `string`):

Same data exported to CSV.

## `datasetView` (type: `string`):

Open the run dataset in the Console.

# 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 = {
    "mode": "advanced",
    "town": "Leeds",
    "sicCodes": [
        "62020"
    ],
    "status": "active",
    "maxResults": 30,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("devilscrapes/companies-house-uk-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 = {
    "mode": "advanced",
    "town": "Leeds",
    "sicCodes": ["62020"],
    "status": "active",
    "maxResults": 30,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("devilscrapes/companies-house-uk-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 '{
  "mode": "advanced",
  "town": "Leeds",
  "sicCodes": [
    "62020"
  ],
  "status": "active",
  "maxResults": 30,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call devilscrapes/companies-house-uk-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,devilscrapes/companies-house-uk-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/YRHS2PYnZMfThNzzk/builds/vef7HkjJE4J47TYqx/openapi.json
