# Companies House Scraper with Insolvency History (`javiereaw/companies-house`) Actor

UK company data from the public Companies House register (the UK company registry), including each company's insolvency history (administrations, liquidations) — a field no other Companies House scraper on the Store extracts.

- **URL**: https://apify.com/javiereaw/companies-house.md
- **Developed by:** [Javier Jimenez](https://apify.com/javiereaw) (community)
- **Categories:** Business, Lead generation
- **Stats:** 2 total users, 1 monthly users, 83.3% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.50 / 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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 with insolvency history

Extracts UK company records from the public Companies House register — and, unlike other
Companies House scrapers on the Store, it also returns each company's **insolvency history**:
administrations, liquidations and the details published for every case.

If you do credit risk, B2B due diligence or company monitoring in the UK, that field is usually
the reason you opened the register in the first place.

### What it does

- **Search** the register by company name or number and get the matching companies.
- **Look up one company** by its number and get the full record, including insolvency cases.
- Company results only — officer and disqualified-director entries are filtered out.

### Input

| Field | Type | Description |
|---|---|---|
| `query` | string | Text to search for in the register. Optional. |
| `companyNumber` | string | Company number for a direct lookup with insolvency history. Optional. |
| `maxItems` | integer | Maximum number of companies to return. Default 50. |

Provide at least one of `query` or `companyNumber`.

```json
{ "companyNumber": "03782379" }
```

### Output

One item per company. **The two ways in return different depth**, because a direct lookup reads the
company profile page and a search does not:

| Field | Search by `query` | Lookup by `companyNumber` |
|---|---|---|
| `companyNumber` | yes | yes |
| `name` | yes | yes |
| `status` | yes | yes |
| `url` | yes | yes |
| `insolvency` | yes | yes |
| `incorporatedOn` | — | yes |
| `sicCodes` | — | yes |

`insolvency` is a list, empty when the register records no proceedings. Each case carries
`caseNumber`, `type`, a `details` map of the dates the register publishes, and `practitioners`
with the appointed role and firm. No personal data of individuals is returned: no directors,
no persons with significant control, no dates of birth, no residential addresses.

Sample item from a lookup by company number:

```json
{
  "url": "https://find-and-update.company-information.service.gov.uk/company/03782379",
  "companyNumber": "03782379",
  "name": "CARILLION PLC",
  "status": "Liquidation",
  "incorporatedOn": "28 May 1999",
  "sicCodes": [
    "41201 - Construction of commercial buildings",
    "42110 - Construction of roads and motorways"
  ],
  "insolvency": [
    {
      "caseNumber": 1,
      "type": "Compulsory liquidation",
      "details": {
        "Petition date": "15 January 2018",
        "Commencement of winding up": "15 January 2018"
      },
      "practitioners": [
        { "role": "Practitioner", "name": "The Official Receiver Or London" }
      ]
    }
  ]
}
```

### Pricing

Pay per result. You are charged for each company written to the dataset, and the Actor honours
the maximum charge you set for a run: if you cap it, it stops writing rather than overrunning.

### Data source and limits

Data comes from the public Companies House register, published under the Open Government
Licence. The Actor reads the public website at a polite rate and does not collect personal data
about individuals: no officers, no persons with significant control, no dates of birth and no
residential addresses. Company-level records only.

The register is the source of truth; this Actor reproduces what it publishes and adds no
interpretation of its own. Insolvency details are returned as the register presents them.

# Actor input Schema

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

Text to search for in the register: company name or number. A search returns companyNumber, name, status, url and insolvency. Optional if companyNumber is given.

## `companyNumber` (type: `string`):

Companies House number for a direct lookup. Adds incorporatedOn and sicCodes on top of everything a search returns. Optional if query is given.

## `maxItems` (type: `integer`):

Maximum number of companies to return.

## Actor input object example

```json
{
  "query": "carillion",
  "maxItems": 5
}
```

# Actor output Schema

## `companies` (type: `string`):

Results in the default dataset, including the insolvency field.

## `view` (type: `string`):

Results table in the Apify console.

# 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": "carillion",
    "companyNumber": "",
    "maxItems": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("javiereaw/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 = {
    "query": "carillion",
    "companyNumber": "",
    "maxItems": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("javiereaw/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 '{
  "query": "carillion",
  "companyNumber": "",
  "maxItems": 5
}' |
apify call javiereaw/companies-house --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,javiereaw/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/1kdFDLcsFC5qLOSjv/builds/RMDbfYKkq059djFSU/openapi.json
