# Companies House Scraper - UK Companies, Directors & PSCs (`sian.agency/companies-house-scraper`) Actor

Search the UK Companies House register and export companies, directors, persons with significant control (PSCs) and filing history. Filter new incorporations by SIC code, date, status, type and location, up to 5,000 companies per search. No API key, no login.

- **URL**: https://apify.com/sian.agency/companies-house-scraper.md
- **Developed by:** [SIÁN OÜ](https://apify.com/sian.agency) (community)
- **Categories:** Lead generation, Business
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.88 / 1,000 search companies

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

## Companies House Scraper: UK Companies, Directors & PSCs 🏛️

[![SIÁN Agency Store](https://img.shields.io/badge/Store-SI%C3%81N%20Agency-1AE392)](https://apify.com/sian.agency?fpr=sian) [![North Data Scraper](https://img.shields.io/badge/Store-North%20Data%20Scraper-1AE392)](https://apify.com/sian.agency/northdata-company-scraper?fpr=sian) [![UK Postcode Lookup](https://img.shields.io/badge/Store-UK%20Postcode%20Lookup-1AE392)](https://apify.com/sian.agency/uk-postcode-address-lookup?fpr=sian) [![Email & Contact Finder](https://img.shields.io/badge/Store-Email%20%26%20Contact%20Finder-1AE392)](https://apify.com/sian.agency/email-contact-lead-scraper?fpr=sian)

#### 🎉 Up to 5,000 new UK companies per run, filtered by SIC code and incorporation date, with no API key

##### For lead generation, KYC checks and company research: search, profiles, directors, PSCs and filing history in one actor

### 🔎 What is the Companies House Scraper — and when should you use it?

The **Companies House Scraper** turns the UK Companies House register into clean, structured rows you can filter, export and feed straight into a spreadsheet, database or AI agent. No account, no portal API key, no browser automation to maintain.

**Use it when you need:** UK company records: company search by name, lists of new incorporations by SIC code and date, full company profiles with accounts deadlines and overdue flags, directors and secretaries, persons with significant control, and filing history with PDF links.

**Use something else when:** the company is registered outside the UK, or you need contact details rather than register records. Use [North Data Scraper](https://apify.com/sian.agency/northdata-company-scraper?fpr=sian) for company register records across Europe, where this actor covers the UK register only. Use [Email & Contact Lead Scraper](https://apify.com/sian.agency/email-contact-lead-scraper?fpr=sian) for email addresses and phone numbers for a company, where this actor returns officers as names, roles and service addresses. Financial figures inside filed accounts are linked as PDFs, not parsed. For all 5 million companies at once, the free monthly bulk file from Companies House is the better fit.

### 🤖 Use with AI agents

Already connected to the [Apify MCP server](https://mcp.apify.com)? Just ask for this Actor by name: sian.agency/companies-house-scraper

**Agentic payments:** Availability of [x402](https://www.x402.org/) and [Skyfire](https://www.skyfire.xyz/) depends on this Actor's current Store eligibility. Check the published listing for supported payment methods. Billing is the same either way: per successful row, never for errors.

Otherwise copy this prompt into Claude, ChatGPT, Cursor or any MCP-enabled assistant:

```text
I want to look up UK companies, their directors and their owners on the Companies House register using the Apify Actor `sian.agency/companies-house-scraper`.

Use it when I need: UK company records: company search by name, lists of new incorporations by SIC code and date, full company profiles with accounts deadlines and overdue flags, directors and secretaries, persons with significant control, and filing history with PDF links.

Don't use it when: the company is registered outside the UK, or you need contact details rather than register records — use northdata-company-scraper or email-contact-lead-scraper instead.

How to call it: set `operation` to one of six values. `searchCompanies` takes `searchQueries` (company names or keywords). `advancedSearch` takes filters: `sicCodes`, `incorporatedFrom`, `incorporatedTo`, `companyStatus`, `companyTypes`, `location`, `nameIncludes`. `companyProfile`, `officers`, `pscs` and `filingHistory` take `companies`, a list of 8-character company numbers.

Start with this input:
{
  "operation": "advancedSearch",
  "sicCodes": [
    "62012"
  ],
  "incorporatedFrom": "2026-10-01",
  "incorporatedTo": "2026-10-31",
  "companyStatus": [
    "active"
  ],
  "maxFilteredCompanies": 500
}

Ask me which companies or which industry and dates they want, and whether they need profiles, directors, owners or filings, then run the Actor and summarise the results as a table.
```

**Things you can ask your agent for:**

- *List every software company incorporated in Manchester last month, with its SIC codes and registered office postcode.*
- *For these 40 supplier company numbers, flag any that are dissolved, in liquidation or have overdue accounts.*
- *Who are the current directors and persons with significant control of company 06969536?*

Machine-readable API, MCP config and OpenAPI definition for this Actor are published at [apify.com/sian.agency/companies-house-scraper.md](https://apify.com/sian.agency/companies-house-scraper.md).

### 📋 Overview

**Companies House data without the API key or the copy-paste.** This actor reads the UK Companies House register and returns clean rows for companies, directors, persons with significant control (PSCs) and filings. It is built for sales teams, compliance analysts, researchers and anyone who works with UK company data.

**What you get:**

- ✅ **No API key**: type a company name or paste company numbers and press Start. Nothing to register.
- 🧭 **New company lists by filter**: up to 5,000 companies per run by SIC code, incorporation date range, status, company type and location, with SIC codes on every row.
- 🎯 **Five record types**: company search, full profiles, officers, PSCs and filing history, each priced per record.
- 💰 **Pay per record**: from $0.0005 per filing and $0.001 per company on paid plans. Inputs that return nothing are never charged.
- 💎 **Typed output**: ISO dates, overdue accounts as true/false, SIC codes as lists, and a link to each director's other appointments.
- ✨ **NEW**: identity verification status for directors and PSCs, as the register now shows it.

***

### ✨ Features

- 🔍 **Company search**: find companies by name or keyword, up to 1,000 matches per search line.
- 🧭 **Filter search**: list companies by SIC code, incorporation date, status, type and registered office location.
- 🏢 **Company profiles**: status, type, registered office, SIC codes with descriptions, previous names, charges and insolvency flags.
- ⏰ **Filing deadlines**: next and last accounts dates, confirmation statement dates, and whether either is overdue.
- 👔 **Directors and officers**: current and resigned appointments with role, dates, month and year of birth, nationality and country of residence.
- 🔑 **Persons with significant control**: individual and corporate owners, nature of control, and PSC statements.
- 📑 **Filing history**: every filing with form type, description, page count and a direct PDF link.
- 🌍 **Whole UK register**: England and Wales, Scotland (SC), Northern Ireland (NI), LLPs (OC) and overseas entities (OE), including dissolved companies.
- 📄 **Run report**: a summary page with your numbers, anything that needs a fix and exactly what you paid.

***

### 🎬 Quick Start

Pick an operation, fill in its one input, and run. Rows arrive in your dataset as they are read. Export them as CSV, Excel or JSON, or pull them over the API.

```bash
curl -X POST "https://api.apify.com/v2/acts/sian.agency~companies-house-scraper/runs?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"operation": "searchCompanies", "searchQueries": ["bakery"], "maxResultsPerQuery": 50}'
```

***

### 🚀 Getting Started (3 Simple Steps)

#### Step 1: Choose what to scrape

Pick one of the six operations: Search companies, Find companies by filters, Company profile, Officers, PSCs or Filing history.

#### Step 2: Add your input

Type company names, set your filters, or paste company numbers such as 00445790 or SC548639.

#### Step 3: Run and export

Press Start, then download the dataset or connect it to your CRM, sheet or workflow.

**That's it! In under a minute, you'll have:**

- A clean list of UK companies with status, SIC codes and registered office postcode
- Directors and beneficial owners for the companies you care about
- Filing deadlines and PDF links to the latest accounts

***

### 📥 Input Configuration

| Field | Type | Used by | Description |
|-------|------|---------|-------------|
| `operation` | string | all | `searchCompanies`, `advancedSearch`, `companyProfile`, `officers`, `pscs` or `filingHistory` |
| `searchQueries` | array | Search companies | Company names or keywords, one search per line |
| `maxResultsPerQuery` | integer | Search companies | Companies per search line, 1 to 1,000 (default 50) |
| `sicCodes` | array | Filter search | 4 or 5 digit SIC codes, e.g. 62012 |
| `incorporatedFrom` / `incorporatedTo` | string | Filter search | Incorporation date range, YYYY-MM-DD |
| `companyStatus` | array | Filter search | Statuses from the register's own list, e.g. active, liquidation |
| `companyTypes` | array | Filter search | Company types, e.g. ltd, llp, plc |
| `location` | string | Filter search | Town, county or postcode in the registered office address |
| `nameIncludes` | string | Filter search | A word the company name must contain |
| `maxFilteredCompanies` | integer | Filter search | Companies to return, 1 to 5,000 (default 1,000) |
| `companies` | array | Profile, Officers, PSCs, Filing history | Company numbers or Companies House company links |
| `includeResignedOfficers` | boolean | Officers | Include past directors and secretaries (default on) |
| `maxFilingsPerCompany` | integer | Filing history | Newest filings to return per company (default 100) |

**Example: new software companies in October 2026**

```json
{
  "operation": "advancedSearch",
  "sicCodes": ["62012"],
  "incorporatedFrom": "2026-10-01",
  "incorporatedTo": "2026-10-31",
  "companyStatus": ["active"],
  "maxFilteredCompanies": 1000
}
```

**Example: directors of several companies**

```json
{
  "operation": "officers",
  "companies": ["00445790", "SC548639"],
  "includeResignedOfficers": false
}
```

***

### 📤 Output

Results are saved to the Apify dataset with **60+ fields** across five record types. The dataset has a view for each: Overview, Company profiles, Officers, Persons with significant control and Filing history.

| Field | Type | Description |
|-------|------|-------------|
| `companyName` | string | Registered company name |
| `companyNumber` | string | 8-character company number |
| `companyStatus` | string | Active, Dissolved, Liquidation and so on |
| `incorporationDate` | string | Date of incorporation |
| `sicCodes` | array | SIC codes (nature of business) |
| `registeredOfficeAddress` / `postalCode` | string | Registered office and its postcode |
| `accountsNextDueBy` / `accountsOverdue` | string / boolean | Next accounts deadline and overdue flag |
| `officerName` / `officerRole` | string | Director or secretary and their role |
| `appointedOn` / `resignedOn` | string | Appointment dates |
| `dateOfBirth` | string | Month and year of birth (YYYY-MM) |
| `pscName` / `naturesOfControl` | string / array | Owner and how control is held |
| `formType` / `documentUrl` | string | Filing form code and PDF link |
| `companyUrl` | string | Company page on the register |
| `status` / `errorMessage` | string | success, or error with what to change (never charged) |

**Example: a company profile row**

```json
{
  "recordType": "profile",
  "companyNumber": "07017237",
  "companyName": "D & D BAKERY LTD",
  "companyStatus": "Liquidation",
  "companyType": "Private limited Company",
  "incorporationDate": "2009-09-13",
  "registeredOfficeAddress": "27 St. Cuthberts Street, Bedford, England, MK40 3JG",
  "postalCode": "MK40 3JG",
  "sicCodes": ["10710"],
  "natureOfBusiness": ["10710 - Manufacture of bread; manufacture of fresh pastry goods and cakes"],
  "accountsNextDueBy": "2020-09-30",
  "accountsLastMadeUpTo": "2018-09-30",
  "accountsOverdue": true,
  "confirmationStatementOverdue": true,
  "hasCharges": false,
  "hasInsolvencyHistory": true,
  "companyUrl": "https://find-and-update.company-information.service.gov.uk/company/07017237",
  "status": "success"
}
```

**Example: a filter search row**

```json
{
  "recordType": "company",
  "companyNumber": "17494124",
  "companyName": "GOBI RXSPORT LTD",
  "companyStatus": "active",
  "companyType": "ltd",
  "incorporationDate": "2026-10-01",
  "sicCodes": ["46499", "47640", "47910", "62012"],
  "registeredOfficeAddress": "71-75 Shelton Street London United Kingdom WC2H 9JQ",
  "postalCode": "WC2H 9JQ",
  "companyUrl": "https://find-and-update.company-information.service.gov.uk/company/17494124",
  "status": "success"
}
```

Each run also saves a report to the key-value store with the numbers, any inputs that need a fix, and what they cost.

***

### 💼 Use Cases & Examples

#### 1. New company lead lists

**Agencies, accountants and B2B sales teams who sell to newly formed businesses.**

**Input:** SIC codes, last week's incorporation dates and a town.
**Output:** Every matching new company with registered office and postcode.
**Use:** Send it to your outreach tool and schedule the run weekly.

#### 2. KYC and supplier checks

**Compliance and procurement teams onboarding a client or supplier.**

**Input:** A list of company numbers.
**Output:** Status, overdue accounts, insolvency flags, directors and beneficial owners.
**Use:** Spot dissolved, struggling or opaque companies before you sign.

#### 3. Director and PSC research

**Investigators, journalists and due diligence analysts.**

**Input:** The companies you are looking into.
**Output:** Every current and past director and PSC, with a link to each director's other appointments.
**Use:** Map who runs and who owns a group of companies.

#### 4. Accounts and filing monitoring

**Credit controllers, lenders and investors watching a portfolio.**

**Input:** Company numbers and how many recent filings to read.
**Output:** Filing dates, form types and a PDF link for each filing.
**Use:** Catch new accounts, confirmation statements or charges as soon as they are filed.

#### 5. Market mapping by industry

**Founders, consultants and M\&A teams sizing a UK market.**

**Input:** SIC codes, status active, and a region.
**Output:** A list of active companies in that industry and area.
**Use:** Count competitors, find acquisition targets or build a territory plan.

#### 6. CRM enrichment

**RevOps and data teams cleaning company records.**

**Input:** The company numbers already in your CRM.
**Output:** Live status, SIC codes, registered office and filing deadlines.
**Use:** Flag dissolved accounts and fill missing industry codes.

***

### 🔗 Integration Examples

#### JavaScript/Node.js

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_TOKEN' });

const run = await client.actor('sian.agency/companies-house-scraper').call({
  operation: 'pscs',
  companies: ['06969536'],
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python

```python
from apify_client import ApifyClient
client = ApifyClient('YOUR_TOKEN')

run = client.actor('sian.agency/companies-house-scraper').call(run_input={
    'operation': 'advancedSearch',
    'sicCodes': ['56101'],
    'location': 'Manchester',
    'incorporatedFrom': '2026-10-01',
})

for item in client.dataset(run['defaultDatasetId']).iterate_items():
    print(item['companyName'], item.get('postalCode'))
```

#### cURL

```bash
curl -X POST "https://api.apify.com/v2/acts/sian.agency~companies-house-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"operation": "companyProfile", "companies": ["00445790", "SC548639"]}'
```

#### Automation Workflows (N8N / Zapier / Make)

1. **Trigger**: a weekly schedule, or a new row in your CRM
2. **HTTP Request**: call the actor's run-sync endpoint with your filters
3. **Process**: keep the companies you have not seen before
4. **Action**: add them to your CRM, a Google Sheet or a Slack channel

***

### 📊 Performance & Pricing

You pay per record returned. Searches that match nothing, company numbers that do not exist, and companies with no officers, PSCs or filings cost nothing.

| Record | Paid plans (Bronze) | Silver | Gold and above |
|---|---:|---:|---:|
| Company from search or filters | $0.001 | $0.00094 | $0.00088 |
| Company profile | $0.002 | $0.00188 | $0.00176 |
| Officer or PSC | $0.001 | $0.00094 | $0.00088 |
| Filing | $0.0005 | $0.00047 | $0.00044 |

That is $1 for 1,000 new companies on a paid plan. A small start fee applies per run.

#### Free plan (try it now)

- **25 records** per run, with every field and every operation
- No credit card required

#### Paid plans

- **Unlimited** records per run
- Lower per-record prices on Silver, Gold and above

[🔗 View current pricing](https://apify.com/sian.agency/companies-house-scraper?fpr=sian)

***

### ❓ Frequently Asked Questions

**Q: Do I need a Companies House API key?**
A: No. The actor reads the public register, so there is no key to register and no quota of your own to manage.

**Q: How many companies can one run return?**
A: Search returns up to 1,000 companies per search line, and you can add many lines. Filter search returns up to 5,000 per run. For bigger lists, split by incorporation date, for example one month per run.

**Q: Why is a director's date of birth only a month and year?**
A: That is all the public register shows. The full date of birth is not public.

**Q: What is a PSC statement row?**
A: Some companies file a statement instead of naming a person, for example that no registrable person exists. Those rows have `pscKind` set to statement and carry the statement text.

**Q: Why did a listed company return no PSCs?**
A: Companies whose shares trade on a UK regulated market are exempt from keeping a PSC register. The run says so, and that company costs nothing.

**Q: Does it read the figures inside the accounts?**
A: No. Filing rows link to the accounts PDF, and the profile gives you the accounts dates and overdue flag.

**Q: What output formats are available?**
A: JSON, CSV, Excel, XML and HTML, straight from the Apify dataset or over the API.

**Q: Is this legal?**
A: The register is public and Companies House publishes it for reuse. Officer and PSC rows are personal data, so read the legal section below.

***

### 🐛 Troubleshooting

**"No company with number ... on the register"**

- Company numbers have 8 characters. Short numbers are padded for you (445790 becomes 00445790).
- Scottish, Northern Irish and LLP numbers start with letters: SC548639, NI016930, OC447300.

**Filter search says it needs a filter**

- Set at least one of SIC codes, dates, status, type, location or name. With no filter the register would return a random list.

**Filter search stopped at 5,000 companies**

- That is the register's limit per search. Narrow the date range and run again for the next slice.

**Officers run returned only a few people**

- Turn on "Include resigned officers" to get past directors and secretaries too.

**A company number failed with a busy message**

- Companies House was briefly slow. Run that number again on its own.

***

### ⚖️ Is it legal to scrape data?

This actor reads only what Companies House publishes on its public register. That register includes personal data about directors and persons with significant control: names, month and year of birth, nationality, country of residence and correspondence address. It does not return anything the register keeps private, such as full dates of birth or home addresses.

However, you should be aware that your results could contain personal data. Director and PSC records are personal data under the **UK GDPR**, and personal data is protected by the **GDPR** in the European Union and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers.

You can also read Apify's blog post on the [legality of web scraping](https://blog.apify.com/is-web-scraping-legal/).

Companies House is the UK registrar of companies. This actor is an independent tool and is not affiliated with, endorsed by, or sponsored by Companies House or the UK Government. Register data is Crown copyright, reused under the Open Government Licence v3.0.

***

### 🤝 Support

**Join our active support community**

- For issues or questions, open an issue on the actor's [Issues tab](https://apify.com/sian.agency/companies-house-scraper/issues)
- Check [SIÁN Agency Store](https://apify.com/sian.agency?fpr=sian) for more automation tools
- 📧 <apify@sian-agency.online>

***

**Built by [SIÁN Agency](https://www.sian-agency.online)** | **[More Tools](https://apify.com/sian.agency?fpr=sian)**

# Changelog

This Actor's version history is a separate document: https://apify.com/sian.agency/companies-house-scraper/changelog.md

# Actor input Schema

## `operation` (type: `string`):

Search companies finds companies by name or keyword. Find companies by filters lists companies by SIC code, incorporation date, status, type and location, up to 5,000 per run, with SIC codes on every row. Company profile, Officers, PSCs and Filing history read the company numbers you give.

## `searchQueries` (type: `array`):

Used by Search companies. One search per line, for example a company name (Tesco) or a word in it (bakery). Each search returns up to 1,000 companies, best matches first.

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

How many companies to return for each search line in Search companies. The register shows at most 1,000 per search.

## `nameIncludes` (type: `string`):

Used by Find companies by filters. Only companies whose name contains this word or phrase, for example consulting. Optional when you set another filter.

## `sicCodes` (type: `array`):

Only companies registered under these 5-digit SIC codes (nature of business), for example 62012 for business software development or 56101 for restaurants. A company matches if any of its codes is in your list.

## `location` (type: `string`):

Only companies with a registered office in this town, city, county or postcode area, for example Manchester or M1. The register matches the wider area, so nearby towns can appear too.

## `incorporatedFrom` (type: `string`):

Only companies incorporated on or after this date (YYYY-MM-DD). With Incorporated on or before, this gives you a list of new companies for any week or month.

## `incorporatedTo` (type: `string`):

Only companies incorporated on or before this date (YYYY-MM-DD).

## `companyStatus` (type: `array`):

Only companies with one of these statuses, for example Active for trading companies or Liquidation for companies being wound up. Leave empty for every status.

## `companyTypes` (type: `array`):

Only companies of these types, for example Private limited company or Limited liability partnership. Leave empty for every type.

## `maxFilteredCompanies` (type: `integer`):

How many companies Find companies by filters returns. The register exports at most 5,000 per filter set. Narrow the incorporation dates to get the rest in another run.

## `companies` (type: `array`):

Used by Company profile, Officers, PSCs and Filing history. One per line: a company number (00445790, SC548639, OC447300) or the company's Companies House page address. Short numbers are padded to 8 digits for you.

## `includeResignedOfficers` (type: `boolean`):

Used by Officers. On: every current and past director and secretary. Off: only current officers.

## `maxFilingsPerCompany` (type: `integer`):

Used by Filing history. Newest filings come first, so 25 gives you roughly the last few years for a small company.

## Actor input object example

```json
{
  "operation": "searchCompanies",
  "searchQueries": [
    "bakery",
    "tesco"
  ],
  "maxResultsPerQuery": 50,
  "nameIncludes": "consulting",
  "sicCodes": [
    "62012",
    "56101"
  ],
  "location": "Manchester",
  "incorporatedFrom": "2026-10-01",
  "incorporatedTo": "2026-10-31",
  "maxFilteredCompanies": 1000,
  "companies": [
    "00445790",
    "SC548639",
    "https://find-and-update.company-information.service.gov.uk/company/OC447300"
  ],
  "includeResignedOfficers": true,
  "maxFilingsPerCompany": 100
}
```

# Actor output Schema

## `companiesHouseRecords` (type: `string`):

Every record this run returned.

## `scrapingSummary` (type: `string`):

HTML summary showing successful and failed results with key metrics

# 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 = {
    "operation": "searchCompanies",
    "searchQueries": [
        "bakery"
    ],
    "maxResultsPerQuery": 50,
    "maxFilteredCompanies": 1000,
    "companies": [
        "00445790"
    ],
    "includeResignedOfficers": true,
    "maxFilingsPerCompany": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("sian.agency/companies-house-scraper").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 = {
    "operation": "searchCompanies",
    "searchQueries": ["bakery"],
    "maxResultsPerQuery": 50,
    "maxFilteredCompanies": 1000,
    "companies": ["00445790"],
    "includeResignedOfficers": True,
    "maxFilingsPerCompany": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("sian.agency/companies-house-scraper").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 '{
  "operation": "searchCompanies",
  "searchQueries": [
    "bakery"
  ],
  "maxResultsPerQuery": 50,
  "maxFilteredCompanies": 1000,
  "companies": [
    "00445790"
  ],
  "includeResignedOfficers": true,
  "maxFilingsPerCompany": 100
}' |
apify call sian.agency/companies-house-scraper --silent --output-dataset

```

## MCP server setup

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

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/MgKOeJ3iucbAQNhQP/builds/WXhDM9MVZ3tvfD091/openapi.json
