# UK Company Accounts & Charges Audit (Companies House) MCP (`cleanpipe/uk-company-audit`) Actor

Audit UK Companies House filings — annual accounts (iXBRL + scanned PDFs), MR01 charge instruments, insolvency — into structured KYB & credit-risk JSON with verified page-level citations. Failed or degraded runs charge $0.

- **URL**: https://apify.com/cleanpipe/uk-company-audit.md
- **Developed by:** [CleanPipe Labs](https://apify.com/cleanpipe) (community)
- **Features:** Limited permissions, Multi-tenant, Server interface
- **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 Company Accounts & Charges Audit (Companies House) — Remote MCP & REST API

Existing UK **Companies House** scrapers stop at shallow registry metadata — leaving your analysts or AI agents to manually download and read 200+ page scanned **annual accounts PDFs**, **MR01 charge instruments**, and insolvency filings.

**UK Company Audit** closes that gap: it fetches the actual filed documents through the free Companies House Document API, parses **iXBRL** accounts locally at $0 OCR cost, runs selective multimodal OCR on scanned pages (including glossy image-only PLC annual reports), and returns structured **KYB / credit-risk JSON** — every financial figure and red flag backed by a **deterministically verified, page-level citation** (`source_file`, `page_number`, `verbatim_quote`) that is audited in Python before the response is returned. No hallucinated quotes.

Built as a **Multi-Tenant Standby Actor** exposing a **Remote MCP Server** (`/mcp`, Streamable HTTP) plus a **REST API** (`/v1/*`) with transparent **Pay-Per-Event** billing — **$0.00 charged on any failed or degraded extraction**.

***

### Quick Start — 30 seconds

1. **1-Click:** hit **Start** with the prefill — TESCO PLC's real audited accounts come back in ~3s from the immutable cache.
2. **REST:** `curl -X POST "https://cleanpipe--uk-company-audit.apify.actor/v1/accounts-audit" -H "Authorization: Bearer <APIFY_TOKEN>" -H "Content-Type: application/json" -d '{"company_number":"00445790"}'`
3. **MCP:** add `https://cleanpipe--uk-company-audit.apify.actor/mcp` to Claude Desktop / Cursor (config below) → `accounts_deep_audit(company_number="00445790")`.

***

### Why This Actor Instead of a Companies House Scraper?

- **Reads the filings, not just the register.** Parses iXBRL at zero OCR cost; for scanned PDFs it OCRs only the pages that matter (balance sheet, income statement, auditor's report, going-concern notes, MR01 particulars) via a contents-guided page selector — even fully image-only 236-page PLC annual reports.
- **Deterministic citation audit.** Each `verbatim_quote` is verified as a real substring of the named source page (with OCR-tolerant matching) before billing — measured **100% verified citations** on live TESCO PLC, MR01 debenture, and scanned micro-entity filings.
- **Fail-closed billing.** HTTP errors, rate limits, empty documents, and degraded extractions return `billable: false` — **you are never charged for failures**.
- **Agent-native.** Five MCP tools cover the full KYB workflow: discovery → accounts audit → charges/insolvency → YoY diff → complete due-diligence dossier with a 0-100 risk score.
- **ECCTA-ready signals.** PSC presence, director verification gaps, resignation churn, and overdue-filing flags surfaced in every snapshot.

### Automated Red Flags Detected

Every audit emits machine-readable `red_flags` from a fixed enum — safe to branch on in automations:

- `GOING_CONCERN_WARNING` — auditor or notes flag material going-concern uncertainty
- `QUALIFIED_AUDIT_OPINION` — qualified, adverse, or disclaimed audit opinion
- `NEGATIVE_NET_ASSETS` — net liabilities / balance-sheet insolvency
- `OVERDUE_FILINGS` — accounts or confirmation statement overdue at Companies House
- `ACTIVE_DEBENTURE_OR_NEGATIVE_PLEDGE` — outstanding floating charge or negative-pledge covenant limiting new security
- `STRIKE_OFF_OR_INSOLVENCY` — active/proposed strike-off, administration, liquidation, or insolvency case
- `HIGH_DIRECTOR_CHURN_OR_ECCTA_RISK` — rapid officer turnover or unverified-identity gaps under ECCTA

### Who Uses This

- **KYB / onboarding teams** — verify a UK counterparty's real filed accounts and charges before approving limits, not just registry status.
- **Credit & trade-finance risk** — detect negative-pledge covenants and outstanding debentures that subordinate your exposure.
- **AI agents & LLM workflows** — MCP tools return cited, structured JSON your agent can reason over without scraping PDFs.
- **Insolvency & restructuring advisors** — strike-off, insolvency cases, and going-concern warnings as early-warning signals.

***

### Transparent Pay-Per-Event (PPE) Pricing

You pay **only** for successful events — platform compute is included.

| PPE Event | Price (USD) | REST / MCP tool |
| :--- | :---: | :--- |
| **`company-search`** | **$0.05** | `POST /v1/search` · `company_search` — name/number search + KYB snapshot (status, SIC, directors, PSCs, overdue filings, ECCTA signals) |
| **`accounts-deep-audit`** | **$0.35** | `POST /v1/accounts-audit` · `accounts_deep_audit` — latest annual accounts → financials, auditor name & opinion, going-concern flags, cited to source pages |
| **`charges-insolvency-audit`** | **$0.40** | `POST /v1/charges-insolvency` · `charges_insolvency_audit` — MR01 debenture PDFs → lenders, fixed/floating charges, negative-pledge clauses + insolvency records |
| **`accounts-yoy-diff`** | **$0.45** | `POST /v1/accounts-diff` · `accounts_yoy_diff` — 2 most recent accounts → cash/net-asset deltas, auditor switches, new risk disclosures |
| **`full-company-due-diligence`** | **$0.75** | `POST /v1/due-diligence` · `full_company_due_diligence` — complete dossier: profile + 2 accounts + charges + insolvency → risk score 0-100 + executive summary |

*Typical onboarding check: `company_search` ($0.05) + `accounts_deep_audit` ($0.35) = **$0.40 total**.*

***

### Connect as a Remote MCP Server (Claude, Cursor, Agents)

**Endpoint URL:**

```text
https://cleanpipe--uk-company-audit.apify.actor/mcp
```

#### MCP Client Configuration (Claude Desktop / Cursor)

```json
{
  "mcpServers": {
    "uk-company-audit": {
      "url": "https://cleanpipe--uk-company-audit.apify.actor/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_APIFY_API_TOKEN>"
      }
    }
  }
}
```

#### Available MCP Tools

1. **`company_search`** — find a UK company by name or number + KYB snapshot.
2. **`accounts_deep_audit`** — audited financials from iXBRL or scanned annual accounts PDF.
3. **`charges_insolvency_audit`** — MR01 charge instruments (lenders, charge types, negative pledge) + insolvency cases.
4. **`accounts_yoy_diff`** — year-over-year comparison of the two latest accounts.
5. **`full_company_due_diligence`** — complete credit-risk dossier with 0-100 risk score.

***

### REST API Examples

Base URL: `https://cleanpipe--uk-company-audit.apify.actor` — include `Authorization: Bearer <YOUR_APIFY_API_TOKEN>`.

#### Deep-audit TESCO PLC's latest annual accounts

```bash
curl -X POST "https://cleanpipe--uk-company-audit.apify.actor/v1/accounts-audit" \
  -H "Authorization: Bearer <YOUR_APIFY_API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"company_number": "00445790"}'
```

#### Audit MR01 charges & insolvency for a company

```bash
curl -X POST "https://cleanpipe--uk-company-audit.apify.actor/v1/charges-insolvency" \
  -H "Authorization: Bearer <YOUR_APIFY_API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"company_number": "12174130"}'
```

Company numbers are the 8-char Companies House identifiers (`00445790` TESCO, `SC382565` Scotland, `NI019095` Northern Ireland). Pass `companies_house_api_key` in the body to use your own CH key (BYOK).

***

### Sample Output — verified extraction (TESCO PLC, FY2026)

From a **fully image-scanned 236-page annual report** (0 selectable text pages): contents-guided OCR landed on the income statement, balance sheet and auditor's report; every figure cited to its printed page.

```json
{
  "billable": true,
  "extraction_quality": "full",
  "citation_verification_rate": 1.0,
  "data": {
    "company_number": "00445790",
    "financials": {
      "period_end_date": "2026-02-28",
      "accounts_type": "full",
      "currency": "GBP",
      "reported_unit": "unit",
      "cash_at_bank": 2515000000,
      "total_assets": 30991000000,
      "current_liabilities": 14329000000,
      "net_assets_equity": 11457000000,
      "turnover": 73712000000,
      "profit_before_tax": 2403000000,
      "average_employees": 340000,
      "auditor_name": "Deloitte LLP",
      "audit_opinion_type": "unqualified"
    },
    "financial_citations": [
      {
        "field": "turnover",
        "source_file": "DOC_-uIFIZvV.pdf",
        "page_number": 123,
        "verbatim_quote": "Revenue 2,3 73,712 - 73,712 69,916 - 69,916"
      },
      {
        "field": "cash_at_bank",
        "source_file": "DOC_-uIFIZvV.pdf",
        "page_number": 125,
        "verbatim_quote": "Cash and cash equivalents 19 2,515 2,255"
      },
      {
        "field": "auditor_name",
        "source_file": "DOC_-uIFIZvV.pdf",
        "page_number": 122,
        "verbatim_quote": "For and on behalf of Deloitte LLP Statutory Auditor"
      }
    ]
  }
}
```

#### MR01 debenture (live verified extraction)

```json
{
  "charges": [{
    "charge_code": "MR01",
    "status": "outstanding",
    "persons_entitled": ["INNOVA SOLUTIONS LIMITED"],
    "charge_types": ["debenture"],
    "has_negative_pledge": true,
    "citations": [{"source_file": "DOC_4LG__aB4.pdf", "page_number": 7,
                   "verbatim_quote": "…by way of floating charge…"}]
  }]
}
```

***

### Limits, Guardrails & Honest Notes

- **Document coverage:** audits the **latest** accounts filing with a downloadable document (`xhtml` or `pdf`); some very old or oversized filings may be unavailable through the Document API.
- **OCR budget:** up to ~25 priority pages per scanned document (statements, auditor's report, notes, MR01 particulars) to keep latency and unit economics predictable — measured 30-50s end-to-end on the worst-case 236-page image-only PLC report.
- **First-run latency:** a never-before-audited scanned document takes longer (OCR); repeats are served from an **immutable document cache** in milliseconds (`cache_hit: true`).
- **Citation contract:** quotes that fail deterministic verification are dropped and marked — `citation_verification_rate` and `extraction_quality` are returned on every response. A rate below 0.5 → `billable: false`.
- **Rate limits:** Companies House allows 600 requests / 5 min; the API surfaces `429` (non-billable) upstream when exhausted. Pass `companies_house_api_key` for your own quota.
- **Disclaimer:** automated KYB/credit triage with auditable citations — not a substitute for formal legal or financial due diligence.

# Actor input Schema

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

8-char Companies House number (e.g. '00445790' TESCO PLC, 'SC382565' Scotland, 'NI019095' N. Ireland). Cached filings return in ~2-5s; a cold scan can take ~45s.

## `analysis` (type: `string`):

Pick the audit depth. Prices are per successful event — failed or degraded extractions are never billed.

## `query` (type: `string`):

Free-text company name — only used when analysis=company-search and companyNumber is empty.

## `forceRefresh` (type: `boolean`):

Bypass the immutable document cache and re-audit the filing from scratch.

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

Bring-your-own Companies House REST API key — overrides the server's key for this call. Get one free at developer.company-information.service.gov.uk.

## Actor input object example

```json
{
  "companyNumber": "00445790",
  "analysis": "accounts-deep-audit",
  "forceRefresh": false
}
```

# Actor output Schema

## `analysis` (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 = {
    "companyNumber": "00445790"
};

// Run the Actor and wait for it to finish
const run = await client.actor("cleanpipe/uk-company-audit").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 = { "companyNumber": "00445790" }

# Run the Actor and wait for it to finish
run = client.actor("cleanpipe/uk-company-audit").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 '{
  "companyNumber": "00445790"
}' |
apify call cleanpipe/uk-company-audit --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,cleanpipe/uk-company-audit"
        }
    }
}
```

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/HjHqN0Es2q7EWr72o/builds/vCrEW6K8vqthnJzy3/openapi.json
