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

Extract official UK company information, registration numbers, company types, statuses, incorporation dates, registered office addresses, previous legal names, and Standard Industrial Classification (SIC) codes directly from the official statutory register

- **URL**: https://apify.com/moving_beacon-owner1/uk-companies-house-scraper.md
- **Developed by:** [Jamshaid Arif](https://apify.com/moving_beacon-owner1) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $9.99 / 1,000 results

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 Scraper

Extract official UK company information, registration numbers, company types, statuses, incorporation dates, registered office addresses, previous legal names, and Standard Industrial Classification (SIC) codes directly from the official statutory register at [find-and-update.company-information.service.gov.uk](https://find-and-update.company-information.service.gov.uk).

***

### Features

- **Official Statutory Data**: Interrogates the official UK Companies House service, ensuring accurate and up-to-date registry records.
- **Keyless Public Operation**: Leverages the public HTML register, eliminating the need for private Companies House API keys or rate limits.
- **Detailed Company Profile Enrichment**: Extracts company type (*Private limited Company*, *Public limited Company*, *LLP*), incorporation date, dissolution date, and full registered office address.
- **SIC Codes & Classification**: Extracts all Standard Industrial Classification (SIC) codes and textual trade descriptions.
- **Name History & Changes**: Captures previous company names along with historical date ranges.
- **Anti-Bot Resilience & Smart Retries**: Uses `curl-cffi` with Chrome impersonation, dynamic HTTP 429 `Retry-After` header backoff, and exponential retries on server drops.
- **Apify Proxy Support**: Fully compatible with Apify datacenter and residential proxies.

***

### Input Parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `query` | `string` | `"tesco"` | **Required**. Company name, registered number, officer keyword, or search query. |
| `status` | `string` | `""` | Optional company status facet (`"active"`, `"dissolved"`, or leave empty for all). |
| `limit` | `integer` | `20` | Maximum number of company records to scrape and push to dataset. |
| `pages` | `integer` | `5` | Maximum number of search result pages to query (20 results per page). |
| `details` | `boolean` | `true` | Whether to enrich results by fetching each company's full profile page. |
| `details_limit` | `integer` | `5` | Maximum number of company profile pages to enrich. Set to `0` to enrich all records. |
| `delay` | `number` | `0.4` | Delay in seconds between requests to maintain polite crawling. |
| `timeout` | `integer` | `40` | Network request timeout in seconds. |
| `proxyConfiguration` | `object` | `null` | Optional Apify proxy settings (e.g. `{"useApifyProxy": true, "apifyProxyCountry": "GB"}`). |

***

### Example Input JSON

```json
{
  "query": "tesco",
  "status": "active",
  "limit": 20,
  "pages": 5,
  "details": true,
  "details_limit": 5,
  "delay": 0.4,
  "timeout": 40,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyCountry": "GB"
  }
}
```

***

### Output Dataset Schema

Each item in the output dataset contains:

| Field | Type | Description |
|---|---|---|
| `company_number` | `string` | Official UK Companies House registration number (e.g. `00445790`). |
| `name` | `string` | Official registered company name. |
| `status` | `string` | Company status (e.g. `Active`, `Dissolved`, `Liquidation`). |
| `company_type` | `string` | Legal corporate structure (e.g. `Private limited Company`). |
| `incorporated_on` | `string` | Date of company incorporation. |
| `dissolved_on` | `string` | Date of company dissolution (if dissolved). |
| `registered_office` | `string` | Full registered office address. |
| `previous_names` | `array` | List of historical company names. |
| `previous_name_periods` | `array` | Objects containing previous company names and date periods. |
| `sic_codes` | `array` | Objects with SIC codes (`code`) and industry descriptions (`description`). |
| `company_url` | `string` | URL to the official profile on Companies House. |
| `source` | `string` | Source domain name (`find-and-update.company-information.service.gov.uk`). |
| `scraped_at` | `string` | ISO 8601 UTC timestamp of data extraction. |

#### Example Output Record

```json
{
  "company_number": "00445790",
  "name": "TESCO STORES LIMITED",
  "status": "Active",
  "company_type": "Private limited Company",
  "incorporated_on": "27 November 1947",
  "dissolved_on": null,
  "registered_office": "Tesco House, Shire Park, Kestrel Way, Welwyn Garden City, AL7 1GA",
  "previous_names": [
    "TESCO STORES (HOLDINGS) LIMITED"
  ],
  "previous_name_periods": [
    {
      "name": "TESCO STORES (HOLDINGS) LIMITED",
      "period": "06 Feb 1980 - 18 Jan 1983"
    }
  ],
  "sic_codes": [
    {
      "code": "47110",
      "description": "Retail sale in non-specialised stores with food, beverages or tobacco predominating"
    }
  ],
  "company_url": "https://find-and-update.company-information.service.gov.uk/company/00445790",
  "source": "find-and-update.company-information.service.gov.uk",
  "scraped_at": "2026-11-18T10:30:00.000000+00:00"
}
```

***

### Policy and Compliance

- **Public Official Register**: Information provided by UK Companies House is statutory public data under the Open Government Licence v3.0.
- **Polite Crawling**: Respect Companies House infrastructure by maintaining appropriate request spacing (`delay` >= 0.4s).
- **Personal Data**: Ensure processing of any director or officer personal information aligns with the UK GDPR and Data Protection Act 2018.

***

# Actor input Schema

## `query` (type: `string`):

Company name, company registration number, officer keyword, or search phrase (e.g. 'tesco', '00445790', 'restaurant London').

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

Optional status facet to filter results (e.g. 'active', 'dissolved'). Leave empty for all statuses.

## `limit` (type: `integer`):

Maximum number of company records to scrape and push to dataset.

## `pages` (type: `integer`):

Maximum number of search result pages to query (20 results per page).

## `details` (type: `boolean`):

Enrich each result with full profile details (company type, SIC codes, registered office, previous names).

## `details_limit` (type: `integer`):

Maximum number of company profiles to enrich. Set to 0 to fetch details for all extracted records.

## `delay` (type: `number`):

Seconds to wait between requests to prevent rate limiting.

## `timeout` (type: `integer`):

Network request timeout in seconds.

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

Optional Apify proxy configuration to route requests through proxies.

## Actor input object example

```json
{
  "query": "tesco",
  "status": "",
  "limit": 20,
  "pages": 5,
  "details": true,
  "details_limit": 5,
  "delay": 0.4,
  "timeout": 40
}
```

# Actor output Schema

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

No description

# 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 = {
    "query": "tesco",
    "limit": 20,
    "pages": 5,
    "details_limit": 5,
    "delay": 0.4,
    "timeout": 40
};

// Run the Actor and wait for it to finish
const run = await client.actor("moving_beacon-owner1/uk-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 = {
    "query": "tesco",
    "limit": 20,
    "pages": 5,
    "details_limit": 5,
    "delay": 0.4,
    "timeout": 40,
}

# Run the Actor and wait for it to finish
run = client.actor("moving_beacon-owner1/uk-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 '{
  "query": "tesco",
  "limit": 20,
  "pages": 5,
  "details_limit": 5,
  "delay": 0.4,
  "timeout": 40
}' |
apify call moving_beacon-owner1/uk-companies-house-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,moving_beacon-owner1/uk-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/twGbh6X35dUaftMsL/builds/qGjwqRgz4rdCtNuI2/openapi.json
