# Companies House API: Export UK Company Lists by SIC Code (`quarrywise/companies-house-api-company-export`) Actor

Companies House data without an API key: export UK company lists by SIC code, postcode area or district, status, company type, accounts category and incorporation date, or get a monthly feed of new companies. Company-level data from the free monthly snapshot: no directors, no PSCs, no care-of names.

- **URL**: https://apify.com/quarrywise/companies-house-api-company-export.md
- **Developed by:** [Quarrywise](https://apify.com/quarrywise) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 company rows

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

## Companies House API: Export UK Company Lists by SIC Code

Get clean lists of **UK companies** in seconds: filter by **SIC code**, **postcode area or
district**, **company status**, **company type**, **accounts category** and **incorporation date**,
and download one tidy row per company with its **company number**, name, SIC codes and
descriptions, incorporation date, post town, postcode district and its accounts and confirmation
statement dates. The **new-company feed** mode returns only the companies that are new since your
last run. An independent tool built on the free monthly **Companies House Free Company Data
Product** (the bulk company snapshot): it is not the Companies House API, it is not affiliated with
or endorsed by Companies House, and you need no Companies House account or API key.

Built for privacy from the start: **company-level data only**. No directors or other officers, no
persons with significant control, no care-of line and no PO boxes (care-of text in the address is cut by pattern, best effort). The
registered office is given
as **post town and postcode district** unless you ask for the full address.

### Companies House API alternative for bulk company lists (no API key)

Call this Actor like an API: send filters, get a JSON, CSV or Excel list of companies back, with no
API key, no rate limit of 600 requests per 5 minutes and no paging through search results.

#### Who it is for

- **B2B sales and marketing teams** who need UK target-account lists by sector (SIC code), region
  and company size (accounts category).
- **Accountants, agencies and service providers** looking for newly incorporated companies in their
  area, or companies with overdue accounts or confirmation statements.
- **Developers and data teams** feeding a CRM, a data warehouse or an AI agent with a UK company
  reference by SIC code and postcode.
- **Market researchers** counting and profiling companies by activity, type, age and place.

#### What you can do

- **Bulk export**: every company that matches your filters, newest incorporation first, for example
  all active software companies (SIC 62012) in Manchester (postcode area M), or every management
  consultancy (70229) incorporated in the last six months.
- **SIC code prefixes**: `62` covers every code from 62011 to 62090; `620` and `6201` narrow it.
  A prefix covers five-digit SIC 2007 codes only; an older four-digit SIC 2003 code that some
  companies still carry (for example 6210) matches only when you give it exactly.
- **New-company feed**: give the feed a watch ID and schedule it monthly. Each run returns only
  companies that were not in the previous run with the same watch ID, marked `change_type: "new"`.
- **Overdue filings**: only companies whose accounts or confirmation statement were already due on
  the snapshot date.
- **Coarse location by default**: post town and postcode district. Switch to full detail to add the
  street lines, full postcode, county and country of the registered office.

### Export UK companies by SIC code, postcode and incorporation date

#### Input example

```json
{
    "sicCodes": ["62012", "62020"],
    "postcodes": ["M", "SK"],
    "companyStatus": ["active"],
    "incorporatedFrom": "12 months",
    "maxResults": 2000
}
```

#### Input fields

| Field | What it does | Default |
| --- | --- | --- |
| `sicCodes` | UK SIC 2007 codes (five digits) or prefixes of two to four digits (they cover five-digit codes only; an older four-digit SIC 2003 code matches only when given exactly). A company matches when any of its up to four SIC codes matches. | none |
| `postcodes` | Postcode areas (`M`, `EC`) or districts (`M1`, `EC1A`) of the registered office. | none |
| `companyStatus` | `active`, `proposal-to-strike-off`, `liquidation`, `administration`, `voluntary-arrangement`, `receivership`, `other`, or `any`. | `["active"]` |
| `companyTypes` | `private-limited`, `public-limited`, `limited-by-guarantee`, `llp`, `limited-partnership`, `other-partnership`, `community-interest-company`, `charitable-incorporated-organisation`, `unlimited`, `registered-society`, `overseas`, `other`. | all |
| `accountsCategories` | Category of the last accounts, for example `micro-entity`, `small`, `medium`, `full`, `group`, `dormant`, `total-exemption-full`. | any |
| `incorporatedFrom`, `incorporatedTo` | A date (`2026-01-01`) or a period back from today (`30 days`, `6 months`). | none |
| `overdue` | `accounts`, `confirmationStatement` or `either`. | `any` |
| `addressDetail` | `districtOnly` or `full` (see "Registered office address" below). | `districtOnly` |
| `mode` | `export` or `newSinceLastRun`. | `export` |
| `watchId`, `outputOnFirstRun` | The feed's name, and whether its first run outputs the current companies. | none, `true` |
| `maxResults` | Stop after this many company rows. | 1,000 |

Give at least one SIC code or one postcode: the other filters narrow those. Filters combine with
AND; values inside one filter combine with OR.

### Use it from n8n, Make, Zapier or an AI agent

- **n8n:** add Apify's verified n8n node and use "Run an Actor and Get Dataset" with this Actor and
  the same JSON input. Put a Schedule Trigger in front for a monthly new-company feed.
- **Make:** Apify's app: "Run an Actor", then "Get Dataset Items" into Google Sheets, Airtable or
  your CRM.
- **Zapier:** Apify's app: "Run Actor", then "Fetch dataset items".
- **AI agents (MCP clients):** add this Actor as a tool through Apify's MCP server:
  `https://mcp.apify.com?tools=quarrywise/companies-house-api-company-export`
- **API:** `POST https://api.apify.com/v2/acts/quarrywise~companies-house-api-company-export/run-sync-get-dataset-items`
  with your Apify token in the `Authorization: Bearer` header and the input JSON as the body.

### CSV, JSON or Excel output

Every run fills a dataset with one row per company. Download it from the run page as **CSV, Excel,
JSON, XML or HTML**, or read it from the dataset API. A run summary (counts, warnings, the snapshot
date and the source credit) is in the `OUTPUT` record of the run's key-value store.

### New UK companies feed (monthly)

```json
{
    "mode": "newSinceLastRun",
    "watchId": "manchester-software",
    "sicCodes": ["62"],
    "postcodes": ["M"],
    "outputOnFirstRun": false
}
```

- Companies House publishes a new snapshot within the first working days of each month, so
  schedule the feed **monthly**, for example on the 8th. A run on a snapshot the watch has already
  compared outputs nothing and is **not charged** the feed-run event.
- With `outputOnFirstRun` off, the first run records the current companies as a baseline and
  outputs nothing: no rows are charged, but that first run is still charged the feed-run event
  ($0.005), like every feed run that compares a new snapshot. Every later run outputs the companies
  that are new since then.
- With it on, the first run outputs the current companies too. If it stops at the maximum or at
  your maximum charge, it still records the rest as the baseline (free), so old companies are never
  reported as new later.
- If a run stops at your maximum charge, the new companies it did not output are delivered by the
  next run, even on the same snapshot.
- A watch can track up to 100,000 companies; for larger scopes split it into several watch IDs.

### Output fields

| Field | Description |
| --- | --- |
| `company_number` | Company number, for example `01234567` or `SC123456` |
| `company_name` | Registered name |
| `company_status`, `company_status_group` | Status as on the register, and its group (the filter value) |
| `company_category`, `company_type` | Category as on the register, and its group (the filter value) |
| `is_partnership` | `true` for limited partnerships and other partnerships (not LLPs) |
| `incorporation_date` | YYYY-MM-DD |
| `sic_codes`, `sic_descriptions` | Up to four SIC codes and their descriptions |
| `post_town`, `postcode_district` | Registered office post town and postcode district |
| `postcode`, `address_line_1`, `address_line_2`, `county`, `country` | Only with `addressDetail: "full"`, otherwise `null` |
| `accounts_category`, `accounts_last_made_up`, `accounts_next_due`, `accounts_overdue` | Last accounts and the next due date; overdue means due before the snapshot date |
| `accounting_reference_date` | Financial year end as MM-DD |
| `confirmation_statement_last_made_up`, `confirmation_statement_next_due`, `confirmation_statement_overdue` | Confirmation statement dates |
| `mortgage_charges`, `mortgages_outstanding` | Number of registered charges, and of those still outstanding |
| `companies_house_url` | The company's public page on the register |
| `snapshot_date`, `data_source` | The monthly snapshot the row comes from, and the source credit |
| `change_type`, `first_seen` | New-company feed only |

Example row (made-up values, for illustration):

```json
{
    "company_number": "ZZ000001",
    "company_name": "ALPHA EXAMPLE SOFTWARE LTD",
    "company_status": "Active",
    "company_status_group": "active",
    "company_category": "Private Limited Company",
    "company_type": "private-limited",
    "is_partnership": false,
    "incorporation_date": "2026-10-15",
    "sic_codes": ["62012"],
    "sic_descriptions": ["Business and domestic software development"],
    "post_town": "MANCHESTER",
    "postcode_district": "M1",
    "postcode": null,
    "address_line_1": null,
    "address_line_2": null,
    "county": null,
    "country": null,
    "accounts_category": "MICRO ENTITY",
    "accounts_next_due": "2027-07-15",
    "accounts_last_made_up": null,
    "accounts_overdue": false,
    "accounting_reference_date": "10-31",
    "confirmation_statement_next_due": "2027-10-28",
    "confirmation_statement_last_made_up": null,
    "confirmation_statement_overdue": false,
    "mortgage_charges": 0,
    "mortgages_outstanding": 0,
    "companies_house_url": "https://find-and-update.company-information.service.gov.uk/company/ZZ000001",
    "snapshot_date": "2026-11-01",
    "data_source": "Source: Companies House Free Company Data Product, snapshot 2026-11-01; not affiliated with or endorsed by Companies House; data as filed, not verified.",
    "change_type": null,
    "first_seen": null
}
```

### What is not included, and why

- **No officers, no persons with significant control.** The bulk snapshot does not hold them, and
  this Actor never joins company rows with officer, ownership, email, phone or social data.
- **No care-of line and no PO boxes; care-of text cut by pattern (best effort).** The register's care-of line often names a private person, so
  it is never read from the file. Care-of and for-the-attention-of text that a company typed into
  its address fields instead (for example "C/O ...", "CO ...", "C/- ...", "FAO ..." or "ATTN ...",
  in the street lines, post town or county), a name typed before such a marker, and a name typed
  with a personal title ("MR ...", "MRS ...") are removed by pattern when our index is built. This
  is best effort: a pattern cannot recognise every name. In the default mode no street line is
  output at all, only the post town and postcode district. With `addressDetail: "full"`, our scan
  of the 2026-11-01 snapshot (5,711,779 companies) after this cleaning found no care-of marker at
  the start of any street line, post town or county (a leading CO is kept on purpose in post town and
  county as a county: 2,373 post towns and 14,477 counties start with CO, and 1 post town looks like a
  business name after CO), with these exceptions: 19 street lines starting "CO " (counties and
  co-operatives), 1 street line starting "ATT-" joined to the next word before a business-style name,
  and no value starting with MR, MRS, MS or MISS, a space and a name, but 11 address_line_1 values
  starting with a title written as "MR.NAME" or "MR & MRS ...". The residue also holds 49 street lines
  with such a title later in the line, about 120 street lines with "DR" (55 + 67, kept, as it usually
  means Drive), 5 with "C O" mid-line and 2 with ATT mid-line. A name typed with no marker and no title
  is not counted and can remain. The full list is in CHECKLIST.md item 5 and docs/index-design.md.
- **No previous company names and no history.** Only the current monthly snapshot is kept; when a
  new one is built, the previous one is deleted.
- **Dissolved companies** are not in the snapshot, which holds live companies only.

#### Registered office address: why only the district by default

The registered office is the company's official address on the public register, used for letters
and legal notices. For small companies it is often a director's home, and a person cannot have it
removed from the register while it is the current registered office. So the default output stops
at the post town and postcode district, which is enough for territory planning and market counts.
Choose `addressDetail: "full"` only when you need the address itself, for example to send letters
to the company or to check a supplier: the same address is public on the register, and the full
option exists for those uses. Whatever you choose, the address is never combined with any
personal data.

Our output defaults are minimised, but the source file itself is public: Companies House publishes
the full registered office of every live company in the same free monthly file, to anyone. The
index our runs read holds the same fields as that file (care-of text removed by pattern) and is stored on
Apify, where anyone who has its store ID could read it; it holds nothing that the free Companies
House file does not.

### Pricing per company row

Pay per event: you pay for each company row saved to your dataset, nothing for companies that were
filtered out.

| Event | Price |
| --- | --- |
| Company row (`company-row`) | $0.0015 |
| New-company feed run (`watch-run`), once per feed run that compared a new snapshot | $0.005 |

Plus Apify's standard Actor start event, a fraction of a cent per run.

| Run | Rows | Cost |
| --- | --- | --- |
| Quick test with the default prefill | 50 | about $0.075 |
| A 1,000-company export (the default maximum) | 1,000 | $1.50 |
| A 10,000-company export | 10,000 | $15 |
| Monthly new-company feed that finds 40 new companies | 40 | $0.065 |

Set **Maximum companies** or a maximum charge per run to cap what a run can cost; the run stops
cleanly at that limit and you only pay for rows that were saved. If Apify restarts a run, work the
run already saved is not repeated or charged again. When the data cannot be read, the run ends with
a free error row that says why.

### Data source, licence position and attribution

**Source.** Companies House Free Company Data Product: the basic company data of every live company
on the UK register, published as a monthly snapshot (download.companieshouse.gov.uk). Once a month
our own run downloads the snapshot and builds a compact index from it, so your runs read only the
part your filters need. Every row carries the date of the snapshot it comes from
(`snapshot_date`). We use the bulk product only, never the Companies House search website, which is
not meant for bulk downloads.

**Licence position.** Companies House publishes no licence for this product. Its freedom of
information disclosure of 2014 (Disclosure Log 362) says that register data and the Free Data
Product are **not** made available under the Open Government Licence; register data is made
available under approvals given under section 47 of the Copyright, Designs and Patents Act 1988.
Companies House's guidance on its data products says it imposes no rules or requirements on how
the information on the public register is used, and that you are responsible for complying with
data protection, copyright and other law. Copyright in information supplied by a company belongs to
that company, and Companies House asks every customer, bulk customers included, to take their own
legal advice about possible third-party copyright. This README is not legal advice.

**Not verified, not supported.** Companies House says that placing information on the register does
not mean it has verified it, and the free snapshot is provided without support. This Actor makes no
claim of official status, accuracy or endorsement: the data is as filed with the registrar.

**Attribution.** Not required for register data, but recommended. Every row carries this credit in
`data_source`, and we suggest you keep it when you republish:

> Source: Companies House Free Company Data Product, snapshot 2026-11-01; not affiliated with or endorsed by Companies House; data as filed, not verified.

This Actor is independent: it is not affiliated with, endorsed by or connected to Companies House,
and it uses no Companies House logo or Crown insignia.

### Your responsibilities when you use the data

- **You decide what you do with the list.** Company rows can still relate to people: a one-person
  company's name and registered office can identify its director, and the partners of a
  partnership can be private individuals. Under UK data protection law you become a controller of
  the data you take, with your own duties (purpose, minimisation, the information you give people,
  objections).
- **Electronic marketing.** UK electronic marketing rules treat companies and LLPs as corporate
  subscribers, but individuals, sole traders and partnerships outside Scotland as individual
  subscribers. Rows with `is_partnership: true` need the stricter rules. Screen phone numbers you
  add yourself against the TPS and CTPS before you call.
- **No profiling of people.** Do not combine these rows with officer, ownership, email, phone or
  social data to build profiles of individuals.

### Privacy notice (UK GDPR Article 14)

- **Controller:** Quarrywise (details in the Provider section below).
- **Source:** the Companies House public register (Free Company Data Product), a publicly
  accessible source.
- **Data:** company-level fields of live companies: name, number, status, type, SIC codes, dates and
  registered office (the care-of line and PO boxes are never read; care-of text in the address is removed by pattern, best effort).
- **Purpose and basis:** providing company lists to business users, on the basis of legitimate
  interests.
- **Recipients:** users of this Actor, who receive the rows they ask for; Apify, which hosts the
  index and the runs.
- **Retention:** only the current monthly snapshot is kept; the previous one is deleted when a new
  one is built. A watch keeps only company numbers and timestamps, in the user's own Apify account.
- **Your rights:** access, rectification, erasure, restriction and objection, and a complaint to the
  Information Commissioner's Office. Corrections to the register itself are made with Companies
  House.

#### Remove a company

To object to a company appearing in this Actor's output, write through the Issues tab or the
contact address in the Provider section, with the company number. We add it to a suppression list
and rebuild the index straight away, so the company leaves the output within days, not at the next
monthly snapshot; the list is applied to every later snapshot too.

### Limitations

- **Monthly data.** The snapshot is published shortly after each month end, so a row can be up to
  about five weeks old. Companies incorporated since the snapshot are not in it yet.
- **Live companies only**, as in the snapshot.
- **At least one SIC code or postcode** is needed.
- **Search width.** One run covers at most **30 SIC codes** (counted after expanding prefixes: `62`
  is 5 codes, `47` is 44) or **30 postcode areas**. A wider search is refused with a free error row
  before anything is read or charged; split it into several runs, use longer prefixes, or combine
  SIC codes with postcode areas or districts (then the run reads only those areas).
- **Read budget.** A run stops after reading 1,000,000 rows of our index plus 100 for every company
  that matched, with a free warning: a wide search with a rare filter (for example one company type
  across many SIC codes) ends early and asks you to narrow it. Rows saved before that are kept.
- **Memory.** A run that comes close to its memory limit stops with a free error row; rows saved
  before that are kept. The default 256 MB is enough for every search within the limits above.
- **Order:** newest incorporation first, then company number.
- **SIC descriptions** come from the snapshot itself; codes no company uses in the current snapshot
  produce a warning in the run summary.
- **Registered office only.** Trading addresses are not on the register.
- A watch can track up to 100,000 companies.

### FAQ

**Is this the Companies House API?** No. It is an independent Actor that reads the free monthly bulk
snapshot, so you need no API key and hit no API rate limit. For real-time data, officers or filing
history, use the Companies House API directly.

**How fresh is the data?** As fresh as the latest monthly snapshot; the `snapshot_date` of every row
says which one.

**Why are there no directors or emails?** Privacy by design: the snapshot holds no officers, and
this Actor adds no contact data about people.

**Can I get every company in the UK?** Not in one run: a run covers at most 30 SIC codes or 30
postcode areas (see Limitations). For a whole sector or region, run it in parts, for example the
postcode areas in groups of up to 30, or the SIC codes of a division in groups of up to 30, and
set **Maximum companies** high enough for each part.

### Changelog

See the Changelog tab for every version and what changed in it.

### Provider

Provided by Quarrywise, a trade name of Picazzo Research & Development, Zinkstraat 24, Box C4687, 4823 AD Breda, the Netherlands. KvK 42060545, VAT NL005464235B85. Contact: hello@quarrywise.com or the Issues tab.

# Changelog

This Actor's version history is a separate document: https://apify.com/quarrywise/companies-house-api-company-export/changelog.md

# Actor input Schema

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

UK SIC 2007 codes of the company's activities, for example 62012 (business and domestic software development) or 70229 (management consultancy). Five digits match that code; two to four digits match every five-digit code that starts with them, so 62 covers 62011 to 62090. An older four-digit SIC 2003 code that some companies still carry (for example 6210) matches only when given exactly. A company matches when any of its up to four SIC codes matches. "62012 - Business and domestic software development" and "62.01/2" are read as 62012. One run covers at most 30 SIC codes after expanding prefixes (62 is 5 codes, 47 is 44): split wider searches into several runs or add postcodes.

## `postcodes` (type: `array`):

Postcode areas (the letters, for example M for Manchester, EC for the City of London) or districts (the part before the space, for example M1, EC1A, SW1A). A full postcode is not accepted. Leave empty for the whole UK when you give SIC codes. One run covers at most 30 postcode areas (and at most 30 SIC codes after expanding prefixes); combine SIC codes with postcodes to narrow a wide search.

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

Statuses on the register. Default: active companies only. The snapshot holds live companies only, so dissolved companies are never in it. Choose "Any status" to include every live status.

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

Company categories on the register, grouped. Leave empty for every type. Rows of partnerships other than LLPs carry is_partnership: true (their partners can be private individuals).

## `accountsCategories` (type: `array`):

The category of the company's last accounts, a rough size signal: micro-entity and total exemption for the smallest companies, small, medium, full and group for larger ones, dormant for companies that do not trade. Leave empty for any.

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

Only companies incorporated on or after this date: a date (YYYY-MM-DD) or a period back from today such as "30 days" or "6 months". Chunks of older companies are skipped, so this also makes runs faster.

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

Only companies incorporated on or before this date (YYYY-MM-DD, or a period back from today such as "1 year").

## `overdue` (type: `string`):

Only companies whose accounts or confirmation statement were already due on the snapshot date (next due date before the snapshot). Default: no filter.

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

Export: every company that matches the filters, newest incorporation first, up to the maximum. New-company feed: only companies that were not in the previous run with the same watch ID. The data changes once a month, so schedule the feed monthly (for example on the 8th); a run on an unchanged snapshot outputs nothing and is not charged the feed-run event.

## `watchId` (type: `string`):

Required for the new-company feed: a name for this feed, for example "manchester-software". Runs with the same watch ID are compared with each other. Letters, digits, ".", "\_" and "-" only, up to 64 characters.

## `outputOnFirstRun` (type: `boolean`):

New-company feed only. On, the first run of a watch outputs every matching company (charged per row) and remembers them. Off, the first run only records the current companies as a baseline and outputs nothing (no rows charged; the run is still charged the feed-run event, $0.005), so later runs return new companies only.

## `addressDetail` (type: `string`):

District only (default): post town and postcode district. Full: also the street lines, full postcode, county and country of the registered office. The registered office of a small company is often a director's home address, so use full detail only when you need it (for example for letters or compliance checks).

## `maxResults` (type: `integer`):

Stop after this many company rows (in the feed: new companies). Each saved row costs $0.0015, so this also caps the cost: the prefilled 50 rows cost $0.075, plus Apify's start event. Companies that are filtered out are free. Left out of an API call, it is 1,000 ($1.50). You can also set a maximum charge per run in the run options.

## Actor input object example

```json
{
  "sicCodes": [
    "62012"
  ],
  "companyStatus": [
    "active"
  ],
  "overdue": "any",
  "mode": "export",
  "outputOnFirstRun": true,
  "addressDetail": "districtOnly",
  "maxResults": 50
}
```

# Actor output Schema

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

One row per company: company number, name, status, type, SIC codes and descriptions, incorporation date, post town and postcode district, accounts and confirmation statement dates.

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

Counts of matched and saved companies, index chunks read, charged events, warnings, the snapshot date and the source credit. After a restart, chargedUnconfirmed lists per event the work earlier attempts saved whose charge could not be confirmed (not in charged).

# 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 = {
    "sicCodes": [
        "62012"
    ],
    "mode": "export",
    "maxResults": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("quarrywise/companies-house-api-company-export").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 = {
    "sicCodes": ["62012"],
    "mode": "export",
    "maxResults": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("quarrywise/companies-house-api-company-export").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 '{
  "sicCodes": [
    "62012"
  ],
  "mode": "export",
  "maxResults": 50
}' |
apify call quarrywise/companies-house-api-company-export --silent --output-dataset

```

## MCP server setup

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

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/Yw6IvcjdOZN4upiyI/builds/y37TsSECJEUBvG5BX/openapi.json
