# UK Companies House Bulk Lookup (`kman-br/companies-house-lote`) Actor

Look up UK company numbers in bulk via the official Companies House Public Data API. Returns company profile fields only: number, name, status, type, incorporation/cessation dates, registered office, SIC, accounts, confirmation statement and has_charges. No officers, PSC or person names.

- **URL**: https://apify.com/kman-br/companies-house-lote.md
- **Developed by:** [Kman](https://apify.com/kman-br) (community)
- **Categories:** Business, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 company profile returneds

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 Bulk Lookup — company data only (Consulta em lote Companies House)

Look up a list of UK **company numbers** through the official **Companies House Public Data API** and get **company profile fields only**: number, name, status, type, creation/cessation dates, registered office address (including `premises`), SIC codes, accounts, confirmation statement and `has_charges`. **No officers, no PSC, no person names as a data source.**

> Independent tool. Not affiliated with Companies House or the UK government.
>
> Source: **Companies House Public Data API**, Open Government Licence. Rate limit 600 requests / 5 minutes per API key.

### How it works

- One `GET /company/{company_number}` per number (official API).
- **Apify Store:** the API key must be passed in the secret input `chApiKey`. The Actor env `CH_API_KEY` is ignored on the Store (`CH_ORIGEM=apify`).
- **api.market build:** the key comes from the Actor env `CH_API_KEY` (`CH_ORIGEM=api.market`). The buyer does not send a key.
- A 401 from Companies House ends the run early (remaining numbers are not called).
- At most 2 concurrent connections, ≥200 ms pause per connection, sliding window **600 req / 5 min**, backoff on 429/5xx.
- Allow-listed output fields only; officer/PSC endpoints are never requested.
- Up to **500** numbers per Apify run; **100** when `CH_ORIGEM=api.market`.
- `CH_ORIGEM` must be set to `apify` or `api.market`. A missing or unknown value fails the run with no charge.

### Input

| Field | Type | Notes |
|---|---|---|
| `companyNumbers` | string\[] | Required. 1–8 alphanumeric UK company numbers. |
| `chApiKey` | string (secret) | Required on the Apify Store. Create a free key at developer.company-information.service.gov.uk. Not used as a fallback from env on the Store. |

### Output (`status: ok`)

`company_number`, `company_name`, `company_status`, `company_status_detail`, `type`, `date_of_creation`, `date_of_cessation`, `registered_office_address` (premises, address lines, locality, region, postal code, country), `sic_codes`, `accounts`, `confirmation_statement`, `has_charges`, `has_insolvency_history`, `jurisdiction`, `fonte`, `source_url`, `retrieved_at`, `warnings`, `status`.

Other statuses (never charged): `invalido`, `nao_encontrado`, `erro`.

### Pricing (pay per event)

| Event | When | Price |
|---|---|---|
| `inicio-run` | Once after valid input | **US$0.01** |
| `empresa-consultada` | Each `ok` company | **US$0.004** |

**Cost rationale:** 256 MB, HTTP-only, no proxy. ~100 companies in 30–60 s → about **US$0.0008** worst-case compute (0.25 GB × 60/3600 CU × US$0.20). Store comps charge ~US$0.004/company. Start covers boot; per-company fee keeps margin after Apify’s 20% cut.

### Privacy (UK GDPR)

This Actor returns **company** data from a **public statutory register** (Companies House Public Data API, Open Government Licence). Legal basis for making that register available is the public-register / official-authority framework that already applies to Companies House, not a fresh collection of personal data by this tool.

Please note, however:

- A **company name** may include a natural person’s name (for example a sole-trader or “Name & Co” style name).
- The **registered office address** may be a residential address. The `premises` field is included when the register provides it.

Do not use this Actor to build personal dossiers, marketing lists of individuals, or any profile of a natural person. Officers, PSC and person-name source fields are out of scope and are not requested. If you process an item that happens to identify a person, you are the controller of that further use and must have your own lawful basis.

### FAQ

**Do I need a key?** Yes. On the Apify Store, pass a free Companies House developer key as the secret input `chApiKey`. On the api.market build, the operator sets `CH_API_KEY` on the Actor.

**Live API not called in CI?** Unit tests use **fixtures** shaped like the public API examples (`00000006`, `00445790`). No key and no network required for `npm test`.

***

## Consulta em lote Companies House — só dados da empresa (português)

Consulta números de empresa do Reino Unido na **API oficial** do Companies House e devolve **só o perfil da empresa**: número, nome, status, tipo, datas, endereço registrado (incluindo `premises`), SIC, contas, confirmation statement e `has_charges`. **Sem officers, sem PSC, sem nomes de pessoas como fonte.**

### Entrada

- `companyNumbers` (obrigatório)
- `chApiKey` (obrigatório na Apify Store). A env `CH_API_KEY` só vale quando `CH_ORIGEM=api.market`.

### Custo proposto

`inicio-run` US$0,01 + `empresa-consultada` US$0,004. Input inválido e itens não-ok não são cobrados.

### Privacidade (UK GDPR)

A base legal é o **registro público** da Companies House (licença Open Government). O nome da empresa pode conter o nome de uma pessoa, e o endereço registrado pode ser residencial. Não use o Actor para montar dossiês pessoais.

### Testes

```bash
npm test
```

# Actor input Schema

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

UK company numbers (1–8 alphanumeric characters). Duplicates removed. Max 500 per run on Apify (100 on api.market build).

## `chApiKey` (type: `string`):

Required on the Apify Store. Create a free key at developer.company-information.service.gov.uk. The Actor env CH_API_KEY is used only on the api.market build. Stored as a secret.

## Actor input object example

```json
{
  "companyNumbers": [
    "00000006",
    "00445790"
  ]
}
```

# Actor output Schema

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

No description

## `summary` (type: `string`):

RUN_SUMMARY: status, counts, charged events.

# 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": [
        "00000006",
        "00445790"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("kman-br/companies-house-lote").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": [
        "00000006",
        "00445790",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("kman-br/companies-house-lote").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": [
    "00000006",
    "00445790"
  ]
}' |
apify call kman-br/companies-house-lote --silent --output-dataset

```

## MCP server setup

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

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/fprNUJadlGIqNNehG/builds/3grsk9dmDFarb0CbR/openapi.json
