# UK Companies House Scraper: Companies, Officers & Filings (`lepidata/companies-house`) Actor

Search UK companies and pull company profiles and officers from the official Companies House API. Flat price per result, no start fee.

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

## Pricing

from $3.60 / 1,000 company results

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 Scraper: Companies, Officers & Filings

Search the **UK Companies House** register and pull **company profiles and officers** from the **official Companies House REST API**. Useful for compliance checks, KYB, lead enrichment from public register data, and research.

**v1 scope:** company search, company profile, and officers. Filing-history *links* from the profile are included when the API returns them; this Actor does **not** download filing PDFs or crawl the HTML site.

### What you get

| Field | Meaning |
|---|---|
| `type` | `company` for a billed result; free status rows otherwise |
| `source` | `search` (search hit) or `profile` (full profile + officers) |
| `companyNumber`, `companyName` / `title` | Register identifiers and name |
| `companyStatus`, `companyType`, `dateOfCreation`, `sicCodes` | Core register fields |
| `registeredOfficeAddress` | Address as returned by the official API |
| `officers`, `officersTotal` | Officers/directors from the official officers endpoint |
| `links` | Official API link paths (including filing-history path when present) |

### Pricing

**Pay per event `company`** (one charge per company result: a search hit, or one profile+officers row). Same price on every Apify plan; no separate start fee from us. Free: errors, rate-limit stops, invalid input, and Free-plan / charge-limit rows. Set a maximum charge per run and the Actor stops cleanly when it is reached.

**$3.60 per 1,000 company results** ($0.0036 per `company` event). Same price on every Apify plan, including Free.

**Free-plan per-run cap = 100** billed company results. Paid Apify plans get full results up to the per-run caps below.

### Input

- `companyNumbers`: UK company numbers (e.g. `00006400`, `SC123456`). Each returns profile + officers.
- `queries`: search strings. Each returns up to `maxResultsPerQuery` search hits (default 20, max 100).
- Provide at least one of `companyNumbers` or `queries`.

### How it works

- Calls **only** `https://api.company-information.service.gov.uk/` (search, company profile, officers).
- Authenticates with a Companies House API key stored as the Actor secret `COMPANIES_HOUSE_API_KEY` (HTTP Basic; key as username, empty password). Buyers do not supply the key.
- Spaces requests and hard-caps at **600 requests per rolling 5 minutes** (Companies House documented limit). HTTP 429 answers honour `Retry-After`; if the API keeps answering 429, the run stops with a free row.
- Per-run caps: 500 company numbers, 50 queries, 5,000 billed company results.

### Data source and lawful use (UK GDPR)

- **Data comes from the official Companies House API only.** This Actor does not scrape Companies House HTML pages.
- **No emails or phone numbers are added.** Officers are natural persons on a public register; fields are passed through as the API returns them. We do not hunt for extra personal contact details.
- **Buyers are responsible for lawful use** of register data under **UK GDPR** and other applicable law (including any purpose limitation, legitimate-interest or other lawful basis for their use of officer data).

### Not affiliated

This Actor is not affiliated with, endorsed by or sponsored by Companies House or the UK government. "Companies House" is used only to describe the official public API this tool reads.

# Actor input Schema

## `companyNumbers` (type: `array`):

UK Companies House company numbers (e.g. 00006400 or SC123456). Each one returns a company profile plus officers. Up to 500 per run.

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

Company name (or other) search strings. Each query returns up to maxResultsPerQuery search hits from the official API. Up to 50 queries per run.

## `maxResultsPerQuery` (type: `integer`):

How many search hits to return per query (default 20, max 100). Each hit is billed as one company result.

## Actor input object example

```json
{
  "companyNumbers": [
    "00006400"
  ],
  "maxResultsPerQuery": 20
}
```

# Actor output Schema

## `items` (type: `string`):

All rows from this run.

# 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 = {
    "companyNumbers": [
        "00006400"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("lepidata/companies-house").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 = { "companyNumbers": ["00006400"] }

# Run the Actor and wait for it to finish
run = client.actor("lepidata/companies-house").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 '{
  "companyNumbers": [
    "00006400"
  ]
}' |
apify call lepidata/companies-house --silent --output-dataset

```

## MCP server setup

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

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/xHW8NI51G35st7bQB/builds/iX7ykqlPvJpnIcMXm/openapi.json
