# UK Companies House Enrichment & B2B Intel API (`based_data/uk-companies-query-actor`) Actor

Two-tier UK company search & B2B enrichment. Tier 1: Fuzzy name search ($0.005/event). Tier 2: Deep profiles including financials, technographics, DNS/email security auditing, PECR compliance, and live hiring activity ($0.15/event). Pay-Per-Event (PPE) model.

- **URL**: https://apify.com/based\_data/uk-companies-query-actor.md
- **Developed by:** [Adam Beaumont](https://apify.com/based_data) (community)
- **Categories:** Agents, Lead generation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 company searches

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/platform/actors/running/actors-in-store#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

## 🏢 UK Companies House Enrichment & B2B Intel API

Exposes an enterprise-grade, two-tiered business intelligence query interface for UK Companies House records under the **Pay-Per-Event (PPE)** pricing model. Ideal for sales intelligence, automated lead enrichment, cold outreach compliance auditing, cybersecurity risk assessment, and HR tech integrations.

***

### ⚡ What This Actor Does

This actor bypasses basic registry lookups by returning a fully enriched, commercial-ready profile of active, medium-to-large UK corporate entities. It integrates multi-source intelligence—combining official government registry details, corporate financial statements, email/DNS security auditing, active web technographics, and live applicant tracking systems (ATS) hiring data.

> \[!IMPORTANT]
> **Enrichment Scope Constraint**
> Comprehensive enrichment profiles (Tier 2) are **strictly generated and stored only for active, medium-to-large corporate targets** (e.g., companies that file detailed financial statements, have active digital footprints, or run active recruitment).
>
> Queries for micro-entities, small businesses, sole traders, or dormant/inactive entities **will return a 404-style error payload** (and will NOT charge you the premium Tier 2 billing event rate).

The actor operates in two cost-optimized tiers:

#### 🔍 Tier 1: Fuzzy Name Search (`company-search`)

- **Purpose**: Resolve partial or fuzzy company names to absolute identifiers.
- **Performance**: Sub-100ms response times powered by a pre-indexed Key-Value store (with native Google BigQuery fallback).
- **Data Returned**: Company name, registration number, registration status, and postcode.

#### 💎 Tier 2: Detailed Enrichment (`company-detail`)

- **Purpose**: Retrieve the full B2B intelligence profile using an 8-digit company number.

- **Target Scope**: **Limited to active, medium-to-large corporate targets.** Queries for companies outside this scope return a 404-style error message to avoid charging premium billing events.

- **Data Returned**: Comprehensive corporate profiling containing:
  - **Registry & Financials**: Net assets, annual turnover, employee counts, and balance sheet dates.
  - **Web Technographics**: Instantly detects active frameworks and trackers on their domain (WordPress, Shopify, Next.js, Webflow, Google Tag Manager, GA4, HubSpot, Hotjar, Meta Pixel, Intercom, Zendesk).
  - **Email & DNS Audit**: Identifies active ESP providers (Google Workspace, Office 365, etc.) and performs a real-time SPF, DMARC, and DKIM selector safety audit to generate an aggregate **Cyber Hygiene Score (0-100)** and risk tier.
  - **ATS & Recruiting Scans**: Queries live recruitment endpoints (Greenhouse, Workday, Lever, Workable, etc.) to fetch the exact count of active job listings and details of open roles.
  - **PECR Cold Email Compliance**: Calculates corporate eligibility and provides legal justification for cold B2B outreach under UK PECR laws.
  - **ICO Triangulation**: Verifies registration status on the official UK Information Commissioner's Office data protection register.

***

### ⚙️ Input Schema

The actor accepts the following parameters. You must supply either `companyName` (for Tier 1 Search) or `companyNumber` (for Tier 2 Detail lookup).

| Field | Type | Title | Description |
| :--- | :--- | :--- | :--- |
| `companyName` | `string` | Company Name (Fuzzy Search) | Fuzzy or partial company name (e.g., `"Tesco"`). Activates **Tier 1 Search Mode**. |
| `companyNumber` | `string` | Company Number (Premium Lookup) | Exact 8-digit UK company number (e.g., `"01234567"`). Activates **Tier 2 Detail Mode**. *Note: Enriched profiles only exist for active, larger corporate targets (medium/large enterprises).* |
| `maxSearchResults` | `integer` | Max Search Results | Maximum results to return in Tier 1 Search (Default: `10`, Max: `100`). |

#### Input JSON Examples

##### 1. Fuzzy Name Search (Tier 1)

```json
{
  "companyName": "Tesco",
  "maxSearchResults": 5
}
```

##### 2. Detailed B2B Profile Lookup (Tier 2)

```json
{
  "companyNumber": "00471817"
}
```

***

### 📊 Output Schema (Tier 2 Example)

When querying via `companyNumber` in Tier 2, the actor yields a rich, structured intelligence profile formatted as a JSON object:

```json
{
  "company_number": "00471817",
  "company_name": "TESCO PLC",
  "last_enriched_at": "2026-07-05T12:30:45Z",
  "enrichment_status": "completed",
  "resolved_domain": "tescoplc.com",
  "email_provider": "Microsoft Office 365",
  "dns_security": {
    "cyber_hygiene_score": 85,
    "cyber_security_risk_tier": "Low Risk",
    "spf": {
      "valid": true,
      "record": "v=spf1 include:spf.protection.outlook.com -all",
      "warnings": []
    },
    "dmarc": {
      "valid": true,
      "record": "v=DMARC1; p=reject; pct=100; rua=mailto:dmarc-rua@tescoplc.com",
      "warnings": []
    },
    "dkim": {
      "has_active_selector": true,
      "selectors_checked": {
        "selector1": "active"
      }
    },
    "mx_hosts": [
      "tescoplc-com.mail.protection.outlook.com"
    ],
    "issues": []
  },
  "compliance": {
    "is_corporate_subscriber": true,
    "legal_entity_type": "plc"
  },
  "technographics": {
    "wordpress": false,
    "shopify": false,
    "gtm": true,
    "hubspot": false,
    "ga4": true,
    "meta_pixel": true,
    "hotjar": false,
    "intercom": false,
    "zendesk": false,
    "nextjs": true,
    "webflow": false
  },
  "recruiting": {
    "is_hiring": true,
    "ats_source": "Workday",
    "roles_count": 18,
    "roles_extracted": [
      {
        "title": "Lead Software Engineer - Python",
        "location": "Welwyn Garden City",
        "url": "https://tesco.wd3.myworkdayjobs.com/Careers/job/Lead-Software-Engineer"
      }
    ]
  },
  "ico_triangulation": {
    "registered": true,
    "registration_number": "Z6294371",
    "tier": "Tier 3",
    "expiry_date": "2027-01-20"
  },
  "financial_metrics": {
    "net_assets": 11842000000.0,
    "turnover": 68193000000.0,
    "employee_count": 330000,
    "balance_sheet_date": "2026-02-28"
  },
  "commercial_insights": {
    "company_size_segment": "Enterprise",
    "outreach_eligibility": {
      "can_cold_email": true,
      "compliance_reason": "Legitimate interest allowed for UK corporate entities (LTD, PLC, LLP) under PECR rules"
    },
    "cyber_security_risk_tier": "Low Risk",
    "growth_hiring_indicator": "High Growth"
  }
}
```

***

### 💡 Key Use Cases

1. **Lead Enrichment & Scoring**: Automatically feed Companies House numbers from forms into the actor to instantly qualify prospects by employee size, technology stack, and hiring status.
2. **Cold Outreach Compliance Filters**: Filter out sole traders and partnerships automatically to ensure your email campaigns strictly adhere to UK PECR regulations.
3. **Cyber Hygiene Analysis**: Audit the DNS records (SPF, DMARC, DKIM) of target lists to score domain safety and identify prospects in need of cybersecurity solutions.
4. **Technographic Profiling**: Target companies using specific technologies (e.g., Next.js, HubSpot, Shopify) for hyper-targeted product positioning.
5. **Recruiting & Growth Signals**: Track active roles on target company boards to identify hiring expansion and allocate resources or outreach efforts effectively.

# Actor input Schema

## `companyName` (type: `string`):

A fuzzy, partial, or full company name (e.g., 'Tesco'). Activates Tier 1 Search Mode for rapid lookup (sub-100ms response).

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

An 8-digit UK company registration number (e.g., '01234567'). Activates Tier 2 Detailed Enrichment. Note: Enriched profiles are strictly generated for active, larger corporate targets (e.g., medium/large enterprises with filed accounts, digital footprints, or active recruitment). Queries for micro-entities, dormant, or inactive businesses will return a 404-style error payload (no event charges apply).

## `maxSearchResults` (type: `integer`):

The maximum number of search records to return in Tier 1 Search Mode (capped at 100).

## Actor input object example

```json
{
  "maxSearchResults": 10
}
```

# Actor output Schema

## `defaultDatasetUrl` (type: `string`):

The dataset containing either the list of search results (Tier 1) or the detailed B2B corporate profile (Tier 2).

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("based_data/uk-companies-query-actor").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("based_data/uk-companies-query-actor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call based_data/uk-companies-query-actor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=based_data/uk-companies-query-actor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/DZrbNwfUNMnZr6edg/builds/MpPbLniCkd7VUxsX9/openapi.json
