# UK Companies House Data Extractor (`alkausari_mujahid/uk-companies-house-data-extractor`) Actor

Look up any UK company by name and instantly extract its registered address, active directors, and company profile from Companies House — with fuzzy name matching, parsed officer names, and automatic rate-limit handling built in.

- **URL**: https://apify.com/alkausari\_mujahid/uk-companies-house-data-extractor.md
- **Developed by:** [Alkausari M](https://apify.com/alkausari_mujahid) (community)
- **Categories:** Automation, Lead generation, Integrations
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Companies House Scraper

Look up any UK company by name and extract its registered address, active directors, and company profile — all in one API call per company.

---

### What It Does

Pass in a list of company names and the actor fuzzy-matches each one against the [UK Companies House API](https://developer-specs.company-information.service.gov.uk/), then returns structured data including:

- **Matched company name & number**
- **Registered office address** (including extracted door/building number)
- **Active directors** — names parsed into title, first, middle, last; plus role, nationality, appointment date, and service address
- **Company profile** — status, type, incorporation date, and SIC codes

Name variations are handled automatically. `"Almoner Care Group Ltd"` will correctly match `ALMONER CARE GROUP LIMITED` using fuzzy matching with a configurable confidence threshold.

---

### Input

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `api_key` | String | ✅ | — | Your Companies House API key. Get one free at [developer.company-information.service.gov.uk](https://developer.company-information.service.gov.uk/) |
| `companies_names` | Array of strings | ✅ | — | List of company names to look up |
| `match_threshold` | Integer | ❌ | `85` | Minimum fuzzy match score (0–100) to accept a result |
| `latest_director_only` | Boolean | ❌ | `false` | Return only the most recently appointed active director |
| `request_delay` | Integer | ❌ | `1` | Seconds to wait between requests (increase if rate limited) |

#### Example Input

```json
{
    "api_key": "your-companies-house-api-key",
    "companies_names": [
        "Sunlight Children's Care Limited",
        "Almoner Care Group Ltd",
        "Horizon Care and Education Group Limited",
        "Hopscotch Care Limited"
    ]
}
````

***

### Output

One record per successfully matched company pushed to the Apify dataset.

```json
{
  "searched_name": "almoner care group ltd",
  "matched_name": "ALMONER CARE GROUP LIMITED",
  "company_number": "13745628",
  "registered_address": {
    "address_line_1": "Seymour Chambers",
    "address_line_2": "92 London Road",
    "country": "United Kingdom",
    "locality": "Liverpool",
    "region": "Merseyside",
    "postal_code": "L3 5NW",
    "door_number": "92"
  },
  "active_directors": [
    {
      "full_name": "CONNOLLY, Frederick James Alfred",
      "title": "",
      "first_name": "Frederick",
      "middle_name": "James Alfred",
      "last_name": "CONNOLLY",
      "role": "director",
      "appointed_on": "2023-02-13",
      "nationality": "British",
      "service_address": {
        "premises": "Seymour Chambers",
        "address_line_1": "92 London Road",
        "locality": "Liverpool",
        "region": "Merseyside",
        "country": "England",
        "postal_code": "L3 5NW"
      }
    }
  ],
  "company_profile": {
    "status": "active",
    "type": "ltd",
    "creation_date": "2021-11-16",
    "sic_codes": ["87900"]
  }
}
```

#### Output Field Reference

**Top level**

| Field | Description |
|---|---|
| `searched_name` | The name you submitted (lowercased) |
| `matched_name` | The official name returned by Companies House |
| `company_number` | Unique Companies House identifier |

**`registered_address`**

| Field | Description |
|---|---|
| `address_line_1` | First line of registered address |
| `address_line_2` | Second line of registered address |
| `locality` | Town or city |
| `region` | County or region |
| `country` | Country |
| `postal_code` | UK postcode |
| `door_number` | Extracted building/door number |

**`active_directors[]`**

| Field | Description |
|---|---|
| `full_name` | Full name as it appears on Companies House |
| `title` | Salutation (Mr, Dr, etc.) if present |
| `first_name` | Parsed first name |
| `middle_name` | Parsed middle name(s) |
| `last_name` | Parsed last name |
| `role` | Officer role (e.g. `director`, `secretary`) |
| `appointed_on` | Appointment date (YYYY-MM-DD) |
| `nationality` | Nationality as declared |
| `service_address` | Director's service address |

**`company_profile`**

| Field | Description |
|---|---|
| `status` | `active`, `dissolved`, `liquidation`, etc. |
| `type` | `ltd`, `plc`, `llp`, etc. |
| `creation_date` | Date of incorporation (YYYY-MM-DD) |
| `sic_codes` | List of Standard Industrial Classification codes |

***

### How Matching Works

Each name is normalised before comparison — punctuation stripped, common suffixes expanded (`Ltd` → `Limited`, `&` → `and`, etc.) — then scored against the top Companies House search results using **fuzzy token sort ratio**. Only matches at or above `match_threshold` (default 85/100) are accepted. Unmatched companies are logged and skipped.

Rate limiting (HTTP 429) is handled automatically with exponential backoff: the actor retries up to 3 times at 5 s, 10 s, and 20 s intervals.

***

### Getting a Companies House API Key

1. Register at [developer.company-information.service.gov.uk](https://developer.company-information.service.gov.uk/)
2. Create a new application and select **Live environment**
3. Copy the API key and paste it into the `api_key` input field

The free tier is sufficient for most use cases.

***

### Use Cases

- Bulk-enrich CRM or spreadsheet data with official company details
- Due diligence and compliance checks on UK businesses
- Research the directors and officers behind care providers, contractors, or suppliers
- Cross-reference Ofsted-registered providers with Companies House records

***

### Notes

- Only **active** officers are returned (resigned officers are excluded)
- The `door_number` field is extracted heuristically from address lines and may be `null` if the format is non-standard
- Duplicate names in the input list are automatically deduplicated before processing
- The actor respects the `request_delay` setting between companies; set it higher (e.g. `2`) for large batches to avoid hitting rate limits

# Actor input Schema

## `companies_names` (type: `array`):

Companies Names To Fetch Data For

## `api_key` (type: `string`):

Companies House API Key

## Actor input object example

```json
{}
```

# Actor output Schema

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

// Run the Actor and wait for it to finish
const run = await client.actor("alkausari_mujahid/uk-companies-house-data-extractor").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("alkausari_mujahid/uk-companies-house-data-extractor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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 alkausari_mujahid/uk-companies-house-data-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=alkausari_mujahid/uk-companies-house-data-extractor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "UK Companies House Data Extractor",
        "description": "Look up any UK company by name and instantly extract its registered address, active directors, and company profile from Companies House — with fuzzy name matching, parsed officer names, and automatic rate-limit handling built in.",
        "version": "0.0",
        "x-build-id": "aS3iyxYVn6Zsxlshd"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/alkausari_mujahid~uk-companies-house-data-extractor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-alkausari_mujahid-uk-companies-house-data-extractor",
                "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/alkausari_mujahid~uk-companies-house-data-extractor/runs": {
            "post": {
                "operationId": "runs-sync-alkausari_mujahid-uk-companies-house-data-extractor",
                "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/alkausari_mujahid~uk-companies-house-data-extractor/run-sync": {
            "post": {
                "operationId": "run-sync-alkausari_mujahid-uk-companies-house-data-extractor",
                "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",
                "required": [
                    "companies_names",
                    "api_key"
                ],
                "properties": {
                    "companies_names": {
                        "title": "Companies Names",
                        "type": "array",
                        "description": "Companies Names To Fetch Data For",
                        "items": {
                            "type": "string"
                        }
                    },
                    "api_key": {
                        "title": "Companies House API Key",
                        "type": "string",
                        "description": "Companies House API Key"
                    }
                }
            },
            "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
                                    }
                                }
                            },
                            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
