# UK Companies House Search (Official API) (`kdhan/uk-companies-house-search`) Actor

Search UK companies and pull their profile, officers and filing history from the official Companies House API. Flat rows with registered address, status, SIC codes and incorporation date. Uses your own free API key. Open Government Licence data.

- **URL**: https://apify.com/kdhan/uk-companies-house-search.md
- **Developed by:** [Doohan Kim](https://apify.com/kdhan) (community)
- **Categories:** Developer tools, Business, Lead generation
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.20 / 1,000 result items

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Search (Official API)

Search **UK registered companies** and pull their profile, officers and filing history —
straight from Companies House, the UK government's own register. No scraping.

### Four modes

**Search companies** — find companies by name, with number, status, type, incorporation date
and registered address.

**Company profile** — one company in full: status, jurisdiction, SIC codes, registered office,
whether it has charges or insolvency history, previous names.

**Officers** — directors and secretaries, their role, appointment and resignation dates.

**Filing history** — every document filed, with date, type, category and description.

### You bring your own free key

Companies House gives API keys free to anyone:

1. Register at `developer.company-information.service.gov.uk`
2. Create an application — choose the **Live** environment (Test returns fake data)
3. Create a **REST** key
4. Paste it into this Actor

**No identity verification, no UK address, no company required.** It takes about five minutes.
The key stays yours and the rate limit (600 requests per 5 minutes) is yours to use.

### Output

Every row is flat — no nested objects to unpack.

| Mode | Key fields |
|---|---|
| Search | `company_number`, `title`, `company_status`, `company_type`, `date_of_creation`, `address` |
| Profile | the above plus `jurisdiction`, `sic_codes`, `has_charges`, `has_insolvency_history`, `previous_company_names` |
| Officers | `name`, `officer_role`, `appointed_on`, `resigned_on`, `address` |
| Filing history | `date`, `type`, `category`, `description`, `transaction_id`, `pages` |

Addresses are joined into a single readable string. SIC codes come back as text, not as a
raw array, so a spreadsheet shows `47110` rather than `['47110']`.

### Examples

Find companies named Tesco:

```json
{ "api_key": "your-key", "mode": "search", "query": "tesco", "max_results": 50 }
```

Tesco PLC's directors:

```json
{ "api_key": "your-key", "mode": "officers", "company_number": "00445790" }
```

### Use cases

- KYC and supplier due diligence on UK counterparties
- Enriching a CRM with registered company details
- Monitoring directorship changes at companies you deal with
- Tracking filings — accounts, confirmation statements, charges
- Research on UK company formation and industry mix

### Limits worth knowing

- Companies House allows **600 requests per 5 minutes** per key. Large pulls are paced.
- A company number that does not exist returns a clear `NOT_FOUND` row, not an error and
  not an empty result you cannot interpret.
- Coverage is companies registered in the UK under the Companies Act 2006.

### Running locally

```bash
pip install -r requirements.txt
## key from ~/.secrets/companies_house_key or the CH_API_KEY environment variable
python -m tests.test_ch
```

### Attribution

Data from Companies House, an executive agency of the UK Department for Business and Trade,
published under the Open Government Licence v3.0. This Actor is not affiliated with or
endorsed by Companies House. The register reflects what companies have filed.

# Actor input Schema

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

Free from developer.company-information.service.gov.uk. Register, create an application in the Live environment, then create a REST key. No identity check and no UK address needed.

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

Search companies by name, or pull one company's profile, officers or filing history.

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

Company name or part of it, for example tesco.

## `company_number` (type: `string`):

Eight-character company number, for example 00445790 for Tesco PLC.

## `max_results` (type: `integer`):

You are charged per returned row.

## Actor input object example

```json
{
  "mode": "search",
  "query": "tesco",
  "max_results": 100
}
```

# Actor output Schema

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

Companies with number, status, type, incorporation date, SIC codes and registered address; officers with role and appointment date; or filings with date, type and 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"
};

// Run the Actor and wait for it to finish
const run = await client.actor("kdhan/uk-companies-house-search").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" }

# Run the Actor and wait for it to finish
run = client.actor("kdhan/uk-companies-house-search").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"
}' |
apify call kdhan/uk-companies-house-search --silent --output-dataset

```

## MCP server setup

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

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/AxjLzW45LfLVZbs3p/builds/aXABoM67eNCEoEFbs/openapi.json
