# UK New Construction Leads - Companies House (Pay-per-event) (`psx/uk-construction-new-leads`) Actor

Newly incorporated UK companies active in construction (SIC division 43), built from the Companies House Public Data API (Open Government Licence v3.0). Legal-entity data only: no contact details, no officers, no PSC. Optional DNS-based website check.

- **URL**: https://apify.com/psx/uk-construction-new-leads.md
- **Developed by:** [psx](https://apify.com/psx) (community)
- **Categories:** Lead generation, Business
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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 New Construction Leads (Companies House)

Finds newly incorporated UK companies active in construction, straight from the
**Companies House Public Data API**. Output is **legal-entity data only**: no
contact details, no officers, no persons with significant control.

### Source and licence

All data comes from the Companies House Public Data API, published under the
**Open Government Licence v3.0 (OGL)**.

> Contains public sector information licensed under the Open Government Licence v3.0.

Every row carries `source`, `source_licence` and `source_attribution`. The actor
calls **only** `api.company-information.service.gov.uk`. It does not scrape, does
not log in, does not use proxies or CAPTCHA bypass, and self-limits to
**600 requests / 5 minutes** (the source's published quota).

### Input

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `companiesHouseApiKey` | string (secret) | — | **Required.** Your own free Companies House API key. Bring-your-own-key mode: the actor never stores or logs it. |
| `incorporated_from` | string `YYYY-MM-DD` | run date − 90 days | Start of the incorporation window (inclusive). |
| `incorporated_to` | string `YYYY-MM-DD` | run date | End of the incorporation window (inclusive). |
| `sic_codes` | string\[] | `["43"]` | SIC 2007 codes or prefixes. A company qualifies with **at least one** match. `"43"` = division 43, Specialised construction activities. |
| `company_status` | string\[] | `["active"]` | Companies House status filter. |
| `location` | string | — | Optional location filter (town/region). |
| `requireNoMatchingDomain` | boolean | `false` | When true, keep only companies with no resolvable `.co.uk`/`.com` name-derived domain (DNS check). |
| `maxResults` | integer | `1000` | Stop after this many qualified leads (max 10000). |

Get a key at <https://developer.company-information.service.gov.uk/> (free).

### Output

One row per qualified company. Mandatory fields:

`company_number`, `company_name`, `company_status`, `company_type`,
`date_of_creation`, `company_age_days`, `sic_codes`, `sic_descriptions`,
`registered_office_address`, `jurisdiction`, `signal_new_incorporation`,
`signal_sic_match`, `source`, `source_licence`, `source_attribution`,
`data_fetched_at`.

Conditional fields, present only when the register publishes them:
`confirmation_statement_overdue`, `accounts_overdue`, `has_charges`,
`has_insolvency_history`, `previous_company_names`, `website_status`,
`website_check_method`.

#### Qualification (signal Q)

A company is emitted only when **all** hold: status is `active`; its
`date_of_creation` falls inside the requested window; its `sic_codes` intersect
the requested targets (**at least one** match); and its registered office is not
flagged undeliverable.

#### `website_status` disclaimer

`website_status` is a **derived heuristic**, not a fact about the company. It is
computed purely from a DNS lookup (A/AAAA/CNAME) on domains guessed from the
company name (`.co.uk`, `.com`). `none_found` means those guesses did not
resolve; it does **not** mean the company has no website. Values: `not_checked`
(default), `domain_found`, `none_found`.

#### `registered_office_address` and personal data

> registered_office_address comes from the public Companies House register
> (Open Government Licence v3.0) and is presented as legal-entity data. Where
> the registered office is also an individual's home, that address is also
> personal data (UK GDPR art. 4(1)). We reproduce only what the register
> publishes and never reconstruct fields the register shows partially or
> suppresses. Lawful basis: legitimate interest (art. 6(1)(f)).

We mirror the register verbatim: all address sub-fields it publishes
(`address_line_1`, `address_line_2`, `locality`, `region`, `postal_code`,
`country`) exactly as shown, and nothing the register suppresses or omits.

### Run locally

```sh
npm install
COMPANIES_HOUSE_API_KEY=your_key node scripts/run-sample.js sample10.json --from 2026-07-13 --to 2026-10-11 --sic 43
```

Or `npm start` on the Apify platform with `companiesHouseApiKey` in the input.

### Tests

```sh
npm test    # node --test test/*.test.js
```

The suite covers AC1–AC11: qualification, window boundaries, 404 handling,
forbidden-field and endpoint checks, OGL attribution, determinism, rate limiting,
back-off, API-key error handling, source allow-listing, and the website-status
semantics.

### Pricing

Pay-per-event: `apify-actor-start` ($0.00005), `lead-qualified` ($0.002),
`lead-enriched` ($0.006, only when the DNS website check runs).

# Actor input Schema

## `incorporated_from` (type: `string`):

Start of the incorporation window, YYYY-MM-DD. Defaults to 90 days before the run date.

## `incorporated_to` (type: `string`):

End of the incorporation window, YYYY-MM-DD. Defaults to the run date.

## `sic_codes` (type: `array`):

SIC 2007 codes or prefixes. A company qualifies if it has at least one matching SIC code. Default \["43"] = division 43, Specialised construction activities.

## `company_status` (type: `array`):

Companies House status filter. Default \["active"].

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

Optional Companies House location filter (e.g. a town or region). Leave empty for the whole UK.

## `requireNoMatchingDomain` (type: `boolean`):

When true, keep only companies whose name yields no resolvable .co.uk/.com domain (DNS A/AAAA/CNAME check) and set website_status to none_found. When false, website_status is not_checked.

## `companiesHouseApiKey` (type: `string`):

Your own Companies House Public Data API key (free, register at developer.company-information.service.gov.uk). Required. The actor never stores or logs it.

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

Stop after this many qualified leads (default 1000, max 10000).

## Actor input object example

```json
{
  "sic_codes": [
    "43"
  ],
  "company_status": [
    "active"
  ],
  "requireNoMatchingDomain": false,
  "maxResults": 1000
}
```

# Actor output Schema

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

No description

## `run` (type: `string`):

No description

# 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 = {
    "sic_codes": [
        "43"
    ],
    "company_status": [
        "active"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("psx/uk-construction-new-leads").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 = {
    "sic_codes": ["43"],
    "company_status": ["active"],
}

# Run the Actor and wait for it to finish
run = client.actor("psx/uk-construction-new-leads").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 '{
  "sic_codes": [
    "43"
  ],
  "company_status": [
    "active"
  ]
}' |
apify call psx/uk-construction-new-leads --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,psx/uk-construction-new-leads"
        }
    }
}
```

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/N95xwy6VG4wGVR1LV/builds/Rl4B88zfgAhWAoInn/openapi.json
