# Companies House Business Data Scraper (`exciting_perfume/companies-house-business-data-scraper`) Actor

Unlock large-scale Companies House data without writing API code. Search companies, directors and PSCs using filters for dates, SIC codes and locations, and export tens of thousands of records in one run. Perfect for lead gen, research, compliance and enrichment workflows.

- **URL**: https://apify.com/exciting_perfume/companies-house-business-data-scraper.md
- **Developed by:** [Gavin Campbell](https://apify.com/exciting_perfume) (community)
- **Categories:** Lead generation, Developer tools, Automation
- **Features:** Full permissions
- **Stats:** 8 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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

## Companies House UK Business Data Scraper

**Turn public registry data into actionable business intelligence.**

This professional-grade Apify Actor connects directly to the [UK Companies House Public Data API](https://developer.company-information.service.gov.uk/). It is designed for sales teams, marketers, and analysts who need to generate targeted lists of UK companies and—crucially—identify the **people behind them**.

***

### 🎯 The Ultimate Lead Generation Funnel

Most tools just give you a company name. This Actor is designed to help you find **Decision Makers**.

By using the **Data Enrichment** features, you can turn a list of companies into a list of prospects:

1. **Find New Business**: Filter by "Incorporation Date" to catch companies the moment they are founded—the perfect time to sell B2B services (Accounting, SEO, Legal, Banking).
2. **Target Specific Locations**: Use granular **Postcode Prefixes** (e.g., "M1", "SW1") to dominate specific geographic territories.
3. **Identify Key People**: Enable **Officer Enrichment** to extract names of active Directors and **PSC Enrichment** to find beneficial owners (Persons with Significant Control).

#### Core Use Cases

| Use Case | Strategy |
| :--- | :--- |
| **📍 Hyper-Local Sales** | Find every new construction company (SIC Code) in a specific postcode area (e.g., "B1") formed in the last 30 days. |
| **👔 Director Outreach** | Generate a list of active Directors for all "Software Development" companies in London to fuel your LinkedIn or cold email campaigns. |
| **🔍 Due Diligence** | Bulk check the status (Active/Dissolved) and Registered Office Address of thousands of companies in seconds. |
| **📊 Market Research** | Analyze the density of specific business types across different UK regions to plan expansion. |

***

### 🚀 Key Features

- **Granular Geographic Targeting**:
  - **Postcode Prefixes**: Search by partial postcodes (e.g., `SW1A`, `M50`). Supports multiple prefixes in one run.
  - **Locality**: Search by Town or City (e.g., "Manchester", "Leeds").
  - **Region**: Search by Country (England, Scotland, Wales, Northern Ireland).
- **Industry Filtering**: Built-in selector for Standard Industrial Classification (SIC) codes.
- **Smart Rate Limiting**: Automatically safeguards your API key by throttling requests to ~600ms, adhering strictly to Companies House limits (600 reqs / 5 mins).
- **Runtime Estimation**: Provides a log estimate of how long your scrape will take before it fully executes.

***

### 📖 Usage Guide

#### 1. Get Your API Key

You need a free API Key from the UK Government:

1. Register at the [Companies House Developer Hub](https://developer.company-information.service.gov.uk/).
2. Create a "Live" application.
3. Copy the **API Key** and paste it into the Actor input.

#### 2. Choose Your Search Strategy

The Actor automatically selects the most specific search mode based on your inputs:

- **Priority 1: Postcode Search** (Most Specific)
  - *Input:* `Postcode Prefixes` = `['EC1', 'EC2']`
  - *Result:* Iterates through each prefix and validates exact matches. Best for targeted territory sales.
- **Priority 2: Locality Search**
  - *Input:* `Locality` = `Bristol`
  - *Result:* Searches for companies with "Bristol" in their address.
- **Priority 3: Regional/Global Search** (Broadest)
  - *Input:* `Country` = `Scotland` (or empty for UK-wide).
  - *Result:* Returns all companies fitting the date range and SIC codes in that region.

#### 3. Enable Enrichment (Optional)

To get the "Lead Gen" data, check these boxes in the input:

- **Include Officers**: Adds an `officers` array to the output (Names, Roles, Appointment Dates).
- **Include PSCs**: Adds a `pscs` array (Beneficial Owners, Nature of Control).

> **⚠️ Note:** Enabling enrichment triples the API calls per company (1 for Profile + 1 for Officers + 1 for PSCs). The Actor handles the rate limiting for you, but the run will take longer.

***

### 📦 Output Data Structure

Data is stored in JSON format. Here is a typical enriched result used for lead generation:

```json
{
  "company_number": "12345678",
  "company_name": "EXAMPLE TRADING LTD",
  "incorporation_date": "2023-05-20",
  "company_status": "active",
  "sic_codes": ["62020"],
  "registered_office_address": {
    "address_line_1": "123 Business Park",
    "locality": "Manchester",
    "postal_code": "M50 2EQ",
    "country": "United Kingdom"
  },
  "officer_count": 2,
  "officers": [
    {
      "name": "SMITH, Jane",
      "officer_role": "director",
      "nationality": "British",
      "appointed_on": "2023-05-20",
      "occupation": "Consultant"
    }
  ],
  "psc_count": 1,
  "pscs": [
    {
      "name": "SMITH, Jane",
      "kind": "individual-person-with-significant-control",
      "natures_of_control": ["ownership-of-shares-75-to-100-percent"]
    }
  ],
  "companies_house_profile_url": "https://find-and-update.company-information.service.gov.uk/company/12345678"
}
```

***

### ⚙️ Technical Limits

- **Rate Limit**: 600 requests per 5 minutes.
- **Protection**: The Actor waits ~600ms between requests. If you scrape 1,000 companies with full enrichment (~3,000 requests), it will take approximately **30 minutes**.
- **Volume**: You can set `Max Results` to `0` (Unlimited) to scrape tens of thousands of records. The Actor will run continuously, respecting the rate limit pauses.

# Actor input Schema

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

Your API Key from https://developer.company-information.service.gov.uk/

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

Start date (YYYY-MM-DD)

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

End date (YYYY-MM-DD)

## `postcodePrefixes` (type: `array`):

List of postcode prefixes (e.g., 'SW1', 'M50').

## `locality` (type: `string`):

City or Town name (e.g., 'Bristol'). Used if no Postcodes provided.

## `country` (type: `string`):

Filter by country (e.g., 'scotland', 'wales').

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

List of SIC codes to filter by.

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

Maximum number of companies to scrape. Set to 0 for unlimited.

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

Fetch director/officer details (adds 1 request per company).

## `includePscs` (type: `boolean`):

Fetch Persons with Significant Control (adds 1 request per company).

## `maxCompaniesToEnrich` (type: `integer`):

Limit enrichment to the first N companies to save time.

## Actor input object example

```json
{
  "country": "united-kingdom",
  "maxResults": 100,
  "includeOfficers": false,
  "includePscs": false,
  "maxCompaniesToEnrich": 100
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("exciting_perfume/companies-house-business-data-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("exciting_perfume/companies-house-business-data-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 '{}' |
apify call exciting_perfume/companies-house-business-data-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,exciting_perfume/companies-house-business-data-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/Ce1IaKMtJGKC3MciR/builds/JJoEp8AfpYNFRVV90/openapi.json
