# UK Company Distress Watch: Insolvency Alerts (`offerastudio/uk-company-distress-watch`) Actor

UK administrations, liquidations, winding-up petitions and orders and receiverships from The Gazette, one row per event with a high/medium/low risk signal, court, case number and insolvency practitioners. Watch-list mode adds strike-off proposals for your customers. Optional Companies House data.

- **URL**: https://apify.com/offerastudio/uk-company-distress-watch.md
- **Developed by:** [Offera Studio](https://apify.com/offerastudio) (community)
- **Categories:** Lead generation, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 event returneds

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

### What does UK Company Distress Watch do?

**UK Company Distress Watch** tells you early when a UK company is **going into administration or liquidation, facing a winding-up petition, or being struck off**. It reads the official notices published in **The Gazette**, the UK's official public record, and returns **one clean row per event**:

- 🚨 **what happened**: event type in plain English plus the raw Gazette notice code (e.g. `2450` winding-up petition)
- 📊 a **risk signal** (high / medium / low) with a **one-line explanation**, e.g. *"Winding-up petition presented: creditors are seeking compulsory liquidation."*
- 📅 the **notice date** (petition presented, appointment, resolution, winding-up order …) and the **publication date**
- 🏢 **company name and number** as published in the notice (or found at Companies House by exact name, with a `matchConfidence` flag)
- ⚖️ **court and case number** when given, and the hearing date for petitions
- 👔 **insolvency practitioners**: names, firms, roles and IP numbers as published in the notice
- 🔗 the **Gazette notice ID and link**
- ➕ optional **Companies House data**: status, incorporation date, SIC codes with descriptions, registered office, insolvency history and cases

**No API key needed** for the Gazette data. Add a free Companies House key for the extra company data and for strike-off and CVA checks on your watch list.

### Who is it for?

- **Credit controllers and finance teams**: daily alerts when a customer or supplier gets a winding-up petition, appoints administrators or goes into liquidation (watch-list mode + schedule).
- **Suppliers and lenders**: stop shipping or lending before an insolvency becomes a bad debt.
- **Insolvency practitioners, debt buyers and asset buyers**: daily lead lists of new petitions, orders and appointments, filtered by sector or postcode.
- **B2B sales teams**: keep distressed companies out of your pipeline, or spot competitors' customers in trouble.
- **Analysts and journalists**: count insolvencies by type, region or sector over time.

### Events it covers

| Category (input value) | Gazette notice codes | Risk |
| --- | --- | --- |
| Administration (`administration`) | 2410 administrators appointed, 2411 administration order | high |
| Creditors' voluntary liquidation (`creditors-voluntary-liquidation`) | 2441 resolution, 2442 creditors asked to choose a liquidator, 2443 liquidator appointed, 2447 deemed consent | high |
| Members' voluntary liquidation (`members-voluntary-liquidation`) | 2431 resolution, 2432 liquidator appointed, 2433 creditors asked to claim (solvent company) | low |
| Winding-up petition (`winding-up-petition`) | 2450 petition, 2461 petition dismissed | high / low |
| Winding-up order (`winding-up-order`) | 2452 winding-up order, 2454 liquidator appointed by the court | high |
| Receivership (`receivership`) | 2421 administrative receiver, 2423 receiver | high / medium |
| Moratorium and CVA (`moratorium-cva`) | 2401 moratorium started, 2402 ended; **CVAs from Companies House** (watch list + key) | high / medium |
| Proposal to strike off (`strike-off-proposal`) | **First Gazette notice for strike-off from Companies House** (GAZ1 compulsory, GAZ1(A) voluntary; watch list + key) | medium |
| Other notices (`other-insolvency-notices`, off by default) | meetings, dividends, final meetings, releases, public examinations … | mostly medium |

**Why do strike-offs and CVAs need a watch list?** The Gazette publishes strike-off proposals only as weekly PDF lists of thousands of companies in its Company Law Supplement, not as data notices, and CVAs are usually not gazetted at all. So the Actor reads them from **Companies House records** of the companies in your watch list: the filing history (`GAZ1`, `GAZ1(A)`) and the insolvency record (CVA start date).

### How to use it

1. Click **Start** with the default input: the **last 7 days**, all main event types, **50 events**. No key needed.
2. Optional: set **Published from / to** (a date like `2026-09-01` or a relative date like `7 days`).
3. Optional: pick **Event types**, or narrow by **Company name contains**, **Postcode prefixes** (`M`, `M1`, `SW1A` …), **Sectors** or **SIC codes** (these two need Companies House data).
4. For a **watch list**, paste your customers' or suppliers' **company numbers** (up to 1,000). You then only get events about those companies.
5. Optional: paste a free **Companies House API key** (see below) to add company data and to check strike-offs and CVAs.

The **Events** tab shows one row per event; **Risk signals**, **Insolvency practitioners** and **Companies House data** have their own tabs.

### Daily alerts to Slack or email

1. Save your input as a **task**, e.g. your customer list as the watch list, with **Published from** and **Published to** both set to `1 day` (= yesterday, a complete day).
2. Add a **schedule** in Apify Console (**Schedules → Create new**), e.g. every day at **06:30 UK time**. Between 21:00 and 07:00 UK time the Actor reads The Gazette directly, so a 06:30 run sees yesterday's notices right up to the end of the day; runs between 07:00 and 21:00 read the nightly cache (see "Limitations").
3. Add an **integration** to the task: **Slack** (post a message when the run succeeds, with the dataset link), **email** (Apify's "Send email" integration or a webhook), or **Zapier / Make / n8n** to post each new row to Slack, Teams, email or your CRM.
4. Use `eventId` to de-duplicate if your windows overlap.

Runs with no events return one free `no-results` row, so a quiet day costs nothing but the tiny start fee.

### How to get a free Companies House API key (optional)

1. Go to the **Companies House Developer Hub**: https://developer.company-information.service.gov.uk
2. **Sign in / Register** (free), open **Your applications → Create an application** (environment **Live**).
3. **Create new key**, type **API key** (REST). Leave IP restrictions empty: Apify runs don't use a fixed IP.
4. Paste it into **Companies House API key**. It is stored **encrypted**.

Without a key, every row still has the full Gazette data and says `enrichmentStatus: "skipped-no-api-key"`.

### Input example

```json
{
    "dateFrom": "1 day",
    "dateTo": "1 day",
    "companyNumbers": ["01234567", "SC123456", "OC123456"],
    "categories": ["administration", "creditors-voluntary-liquidation", "winding-up-petition", "winding-up-order", "receivership", "moratorium-cva", "strike-off-proposal"],
    "enrichWithCompaniesHouse": true,
    "apiKey": "your-companies-house-api-key",
    "maxResults": 100
}
```

### Output example

Real output of the default input (no API key) on 1 October 2026, a few of the 50 rows:

| publicationDate | riskSignal | eventLabel | companyName | companyNumber | court / caseNumber |
| --- | --- | --- | --- | --- | --- |
| 2026-10-01 | high | Administrators appointed | NEW RIVER YARD LTD | 13836592 | High Court of Justice, Business and Property Courts of England and Wales … / CR-2026-007451 |
| 2026-10-01 | high | Winding-up petition | CHUNKY. LTD | 14111794 | Business & Property Courts in Manchester / CR-2026-MAN-001127 |
| 2026-10-01 | high | Winding-up order | JESSE MCQUEEN LIMITED | 10771791 | High Court Of Justice / 006037 of 2026 |
| 2026-10-01 | high | Creditors' voluntary liquidation: liquidator appointed | GET THAT GLOW LIMITED | 13203606 | – |
| 2026-10-01 | low | Winding-up petition dismissed | L.S CONNELL LIMITED | 10459808 | HIGH COURT OF JUSTICE / CR-2025-LDS-001240 |

One row of the same run (real data, some empty fields left out; the Companies House fields are empty because the run had no key):

```json
{
    "eventId": "gazette-5222535",
    "source": "gazette",
    "category": "winding-up-petition",
    "eventType": "winding-up-petition",
    "eventLabel": "Winding-up petition",
    "noticeCode": "2450",
    "noticeTypeName": "Petitions to wind up (Companies)",
    "riskSignal": "high",
    "riskExplanation": "Winding-up petition presented: creditors are seeking compulsory liquidation.",
    "noticeDate": "2026-07-31",
    "noticeDateType": "petition-presented",
    "publicationDate": "2026-10-01",
    "publishedAt": "2026-10-01T15:00:17",
    "hearingDate": "2026-10-13",
    "gazetteNoticeId": "5222535",
    "gazetteNoticeUrl": "https://www.thegazette.co.uk/notice/5222535",
    "companyName": "CHUNKY. LTD",
    "companyNumber": "14111794",
    "companyNumberSource": "gazette-notice",
    "matchConfidence": "exact",
    "court": "Business & Property Courts in Manchester",
    "caseNumber": "CR-2026-MAN-001127",
    "insolvencyPractitioners": [],
    "noticeDetail": "full",
    "dataSource": "gazette",
    "cacheTimestamp": null,
    "enrichmentStatus": "skipped-no-api-key",
    "companyStatus": null,
    "sicCodes": [],
    "companiesHouseUrl": "https://find-and-update.company-information.service.gov.uk/company/14111794",
    "error": null
}
```

For appointments, `insolvencyPractitioners` looks like `[{ "name": "…", "firm": "Alvarez & Marsal Europe LLP", "role": "Joint Administrator", "ipNumber": null }]`. With a key, rows also get `companyStatus`, `incorporationDate`, `sicCodes`, `registeredOfficeAddress`, `hasInsolvencyHistory` and `insolvencyCases`.

**Fields worth knowing:**

- `matchConfidence`: `exact` = the company number is printed in the notice; `high` = the notice had no number and exactly one company on the register has this exact name; `medium` = several have the name but only one is not dissolved. Without a confident match, `companyNumber` stays empty.
- `noticeDetail`: `full` = structured notice data; `summary` = only the feed entry could be read (no court, practitioners or notice date).
- `dataSource` and `cacheTimestamp`: `gazette` = the run read The Gazette itself (between 21:00 and 07:00 UK time); `cache` = it read the nightly cache (between 07:00 and 21:00 UK time) and `cacheTimestamp` says when the cache was last refreshed from The Gazette. Every row has both, info rows included.
- `retractionText`: set when a notice retracts an earlier one.
- Rows with an `error` code are free info rows: `invalid-input`, `no-results`, `missing-api-key`, `invalid-api-key`, `partial-data`, `request-budget`, `outside-hours`, `cache-unavailable`, `cache-range`, `source-unavailable`, `rate-limited`, `robots-disallowed`, `api-error`.

### How much does it cost?

This Actor uses **pay per event**:

| Event | Price |
| --- | --- |
| Event returned (one row per event) | **$0.003** |
| Info rows, the "no results" row, rows about a source that could not be read, and events skipped by your filters | **free** |

- 50 events cost **$0.15**; a watch list with 3 events a day costs about **$0.27 a month**.
- The Gazette and the Companies House API are free.
- Apify also charges a tiny standard start fee per run.
- Set **Maximum cost per run** in the run options and the Actor stops when it is reached.

### Data, personal data and your responsibility

- **Not legal or credit advice.** The data is as published by The Gazette and Companies House; the risk signal is a rule of thumb per event type. Always read the official notice before acting, and check whether a petition was later dismissed or withdrawn.
- **Company data.** Events are about companies. Insolvency practitioners' **names, firms, roles and IP numbers** are returned as published in the official notice (business contact data). The Actor never requests or returns e-mail addresses, phone numbers or street addresses of people named in notices, and it does not return petitioners, directors or other individuals.
- The Gazette's licence (Open Government Licence v3.0) **does not cover the re-use of personal data**: practitioner names are personal data under the UK GDPR, so you need a lawful basis for how you use them, and the direct-marketing rules (PECR) apply if you contact anyone.
- Contains public sector information licensed under the Open Government Licence v3.0: The Gazette (© Crown copyright) and Companies House. Not affiliated with or endorsed by The Gazette, TSO, The National Archives or Companies House.

### Limitations

- **Gentle on The Gazette: day and night.** The Gazette's fair use policy asks automated tools to crawl only between **21:00 and 07:00 UK time**, to send at most 5 requests per 10 seconds, to follow its robots.txt (currently a **10-second crawl delay**) and to identify themselves with a contact. So the Actor works in two modes, chosen by the UK time when the run starts:
  - **Between 07:00 and 21:00 UK time it sends no request to The Gazette at all.** It reads a **nightly cache** instead: a small Cloudflare Worker (`workers/gazette-cache` in the repository) refreshes the last 8 days of corporate insolvency notices every night at 22:30 UK time, and the Actor reads them from there in one request (the address is the `GAZETTE_CACHE_URL` setting). The default run finishes in seconds. The cache covers the **last 8 days** (today and the 7 days before) and is as old as its last refresh, so notices published since 22:30 last night appear after the next refresh: `cacheTimestamp` on every row tells you. For older dates, or the very latest notices, run the Actor between 21:00 and 07:00.
  - **If the cache cannot be read during the day**, you get one free `cache-unavailable` row that says to try again after 21:00 UK time. The Actor does not fall back to The Gazette.
  - **Between 21:00 and 07:00 UK time it may read The Gazette directly**: one request at a time, at least 10 s apart (so well inside 5 per 10 s), robots.txt read first and every path checked against it, `Retry-After` honoured, a User-Agent with a contact, at most **100 requests per run** and no request after 07:00 (a longer run stops with a free `outside-hours` row and the rows read so far). The default run needs 3 requests (~25 seconds). If a run reaches the request limit, you get the rows read so far plus a free `request-budget` row.
- **Strike-off proposals and CVAs** only for watch-list companies with a Companies House key (see "Events it covers").
- **SIC and sector filters** need Companies House data (an API key): notices don't carry SIC codes. Without a key, the run stops with a free row instead of returning unfiltered events.
- **Postcode prefixes** use the Companies House registered office when available, otherwise the postcode linked in the notice. Rows without any postcode are left out when this filter is set.
- **Notice data varies**: insolvency practitioners and firms are only as complete as the notice placer entered them. Some notices name the practitioners only in free text; then the list can be empty.
- One notice can lead to several rows (e.g. a resolution and a liquidator appointment for the same company on the same day). Use `companyNumber` to group them.
- **Up to 366 days, 10,000 events and 1,000 watch-list companies per run.** Companies House allows 600 requests per 5 minutes per key; the Actor stays below that, so a 1,000-company watch list with Companies House data and strike-off checks (up to 3 requests per company) takes about 25 minutes.

### FAQ

#### Is this data official?

Yes. The Gazette is the UK's official public record, and the Actor uses its documented notice feed and SPARQL endpoint (no HTML scraping). Companies House data comes from the official Public Data API.

#### Why does my run say `cache-unavailable` or `cache-range`?

Between 07:00 and 21:00 UK time the Actor reads the nightly cache and never The Gazette itself. `cache-unavailable` means the cache could not be read; `cache-range` means all the dates you asked for are older than the cache's 8 days. Run it again after 21:00 UK time (for example from a schedule at 06:30 or 22:00) and it reads The Gazette directly.

#### Why are strike-offs not in my results?

They need a watch list and a Companies House API key (see above). The run's status message says so when they were skipped.

#### Why does a row have no company number?

The notice didn't print one and no single company on the register has exactly that name. Add a Companies House key to enable the name lookup, or check the Gazette link.

#### Can I get directors' or creditors' contact details?

No. The Actor returns company data and the office holders named in the notice, nothing else.

### More tools from the same developer

All pay-per-result, no proxy or login needed, built and maintained by the same developer:

**Website audits**

- [Website Accessibility Checker: WCAG 2.2 & EAA](https://apify.com/offerastudio/website-accessibility-audit): accessibility issues with fixes, SEO basics and security headers.
- [Cookie & Tracker Audit: GDPR Consent Checker](https://apify.com/offerastudio/cookie-tracker-audit): cookies and tracking tags that load before consent.
- [AI Crawler Access Checker: robots.txt & llms.txt](https://apify.com/offerastudio/ai-crawler-access-audit): which AI crawlers a site allows, plus llms.txt.
- [Structured Data Validator: Schema & Rich Results](https://apify.com/offerastudio/structured-data-validator): JSON-LD and Microdata checked against Google's rich result rules.
- [Website Change Monitor: Diffs, Prices & Alerts](https://apify.com/offerastudio/website-change-monitor): get a row only when a page changes, with a clean diff.
- [Policy Change Monitor: Privacy & Terms Tracker](https://apify.com/offerastudio/policy-change-monitor): privacy policy and terms changes, classified clause by clause.
- [SaaS Pricing Monitor: Track Competitor Plans](https://apify.com/offerastudio/saas-pricing-monitor): competitor pricing plans as structured data, with price-change diffs.
- [Sitemap Change Monitor: New & Removed URLs](https://apify.com/offerastudio/sitemap-change-monitor): new, removed and changed URLs from a site's sitemaps.
- [Site SEO Crawler: Broken Links & On-Page Audit](https://apify.com/offerastudio/site-seo-crawler-audit): site-wide crawl for broken links, redirects and on-page SEO issues.
- [Website Tech Stack Detector: Bulk Lead Filters](https://apify.com/offerastudio/website-tech-stack-detector): technologies used by websites, with filters for lead lists.
- [Domain Availability & Expiry Checker (RDAP)](https://apify.com/offerastudio/domain-whois-availability): domain availability, registrar and expiry dates from RDAP.
- [Status Page SLA Monitor: Uptime & Incidents](https://apify.com/offerastudio/status-page-sla-monitor): SaaS vendor uptime, incidents and a monthly SLA table from public status pages.

**Company data and compliance**

- [Company Contact Finder: Emails, Phones & Socials](https://apify.com/offerastudio/company-contact-finder): contact details published on company websites.
- [UK New Companies Feed: Companies House Daily](https://apify.com/offerastudio/uk-new-companies-feed): newly incorporated UK companies with sector filters.
- [EU VAT Number Validator: Bulk VIES Checker](https://apify.com/offerastudio/eu-vat-number-validator): bulk VAT checks with name, address and consultation number.
- [LEI Corporate Tree: GLEIF Parents & Subsidiaries](https://apify.com/offerastudio/gleif-lei-corporate-tree): LEI lookup with parents, subsidiaries and a KYC summary.
- [IBAN Validator: Bulk Check & Bank Lookup](https://apify.com/offerastudio/iban-bank-validator): IBAN format and checksum, plus bank name and BIC where open data exists.
- [Sanctions Screening: OFAC, EU, UN & UK Lists](https://apify.com/offerastudio/sanctions-screening): names screened against official sanctions lists, with match scores.
- [OSHA & EPA Violation Monitor: Fines by Company](https://apify.com/offerastudio/osha-epa-violation-monitor): US OSHA and EPA enforcement cases and penalties by company.
- [Email List Precheck: Syntax, MX & Disposable Check](https://apify.com/offerastudio/email-list-precheck): cheap email list hygiene before a real verification.
- [UK Company Officer Changes: Director & PSC Alerts](https://apify.com/offerastudio/uk-company-officer-changes): director, owner, address and status changes for a watchlist of UK companies.
- [FDA Warning Letters Monitor: By Company & Subject](https://apify.com/offerastudio/fda-warning-letters-monitor): FDA warning letters by company and subject, with cited regulations.
- [Supplier Risk Report: Sanctions, VAT & Insolvency](https://apify.com/offerastudio/supplier-risk-report): one risk row per supplier from eight official registers, with changes since last run.
- [Brand Impersonation Domain Monitor: Look-alikes](https://apify.com/offerastudio/brand-impersonation-domain-monitor): look-alike domains and certificates that imitate your brand, with a risk score.

**Media and AI**

- [Audio & Video Transcriber: Podcasts, SRT, Speakers](https://apify.com/offerastudio/audio-video-transcriber): audio, video, podcasts and social links to text, SRT and VTT.
- [Podcast Mention Alerts: Brand Mentions by Second](https://apify.com/offerastudio/podcast-mention-alerts): where your brand is said in new podcast episodes, with the exact second.
- [News Brand Mentions Monitor: New Articles Only](https://apify.com/offerastudio/news-brand-mentions-monitor): new news articles about your brand, people or topics.
- [YouTube Channel Monitor: New Videos & Growth](https://apify.com/offerastudio/youtube-channel-monitor): new videos and view growth of the channels you watch.

**Market signals**

- [US WARN Layoff Notices: 12 States Daily Feed](https://apify.com/offerastudio/us-warn-layoff-notices): layoff and plant closure notices from official state sources.
- [US Product Recalls Monitor: FDA & CPSC Feed](https://apify.com/offerastudio/us-product-recalls-monitor): FDA and CPSC recalls in one feed, with severity.
- [EU Tenders Feed: TED Public Procurement Alerts](https://apify.com/offerastudio/eu-tender-feed): EU public tenders from TED with CPV, country and value filters.
- [Liquor License Openings: New Bars & Stores (US)](https://apify.com/offerastudio/liquor-license-openings): new US liquor licences from official state open data.
- [Clinical Trials Change Monitor: Status & Updates](https://apify.com/offerastudio/clinicaltrials-change-monitor): status, enrollment and results changes on ClinicalTrials.gov studies.
- [Career Site Jobs Monitor: ATS Jobs & New Roles](https://apify.com/offerastudio/career-site-jobs-monitor): open roles from company career sites, with new and closed roles since the last run.
- [App Reviews Monitor: App Store & Google Play](https://apify.com/offerastudio/app-store-reviews-monitor): app reviews from both stores, only new ones in monitor mode.
- [US Federal Contracts Feed: SAM.gov & USAspending](https://apify.com/offerastudio/us-federal-contracts-feed): SAM.gov contract opportunities with the buyer's award history.
- [Grants.gov Opportunities: US Federal Grants Feed](https://apify.com/offerastudio/grants-gov-opportunities): US federal grant opportunities by keyword, eligibility and agency.
- [Federal Register Monitor: US Rules & Notices Feed](https://apify.com/offerastudio/federal-register-monitor): new US rules, proposed rules and notices by agency or topic.
- [B2B Sales Trigger Feed: Hiring + Tech Leads](https://apify.com/offerastudio/b2b-sales-trigger-feed): companies hiring for a role and using (or not using) a technology, with contacts.
- [Local Business Leads: OpenStreetMap, No Website](https://apify.com/offerastudio/local-business-leads-osm): local businesses by city and category, including those with no website.
- [Solana Token Pair Monitor: New & Trending Pairs](https://apify.com/offerastudio/solana-token-pair-monitor): new and trending Solana pairs with liquidity, volume and safety flags.

### Feedback

Missing an event type or a filter you need? Open an issue on the **Issues** tab.

# Changelog

This Actor's version history is a separate document: https://apify.com/offerastudio/uk-company-distress-watch/changelog.md

# Actor input Schema

## `dateFrom` (type: `string`):

First Gazette publication date (UK date), e.g. 2026-09-01, or a relative date like "7 days" (7 days ago). Empty = the last 7 days. At most 366 days per run.

## `dateTo` (type: `string`):

Last publication date, inclusive. Empty = today. For a daily alert, schedule the Actor every morning with both dates set to "1 day" (yesterday).

## `categories` (type: `array`):

Which events to return. Default: everything except the follow-up notices. Strike-off proposals and CVAs are not published as Gazette data notices; the Actor reads them from Companies House for the companies in your watch list, so they need a watch list and an API key.

## `companyNumbers` (type: `array`):

Return only events for these companies, e.g. your customers or suppliers: Companies House numbers such as 01234567, SC123456 or OC123456 (up to 1,000). Leave empty to get events for all UK companies.

## `companyNameContains` (type: `string`):

Optional word or phrase the company name must contain, e.g. CONSTRUCTION.

## `sectors` (type: `array`):

Ready-made groups of SIC codes, the same as in UK New Companies Feed. Needs Companies House data (an API key), because notices don't carry SIC codes.

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

SIC 2007 codes (62012) or prefixes of 2 to 4 digits (62 = every code starting with 62). Needs Companies House data (an API key).

## `postcodePrefixes` (type: `array`):

Keep only companies whose registered office postcode starts with one of these: an area (M = Manchester area, not ME), a district (M1, SW1A) or a longer start (SW1A 1). Uses the Companies House address when available, otherwise the postcode published in the notice.

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

Stop after this many events (newest first). Each event returned costs $0.003.

## `enrichWithCompaniesHouse` (type: `boolean`):

Adds company status, incorporation date, SIC codes with descriptions, registered office and insolvency cases from the Companies House API, and finds the company number by name when a notice doesn't give one. Needs an API key; without one, the Gazette data is still returned and each row says that enrichment was skipped.

## `apiKey` (type: `string`):

Your free REST API key from the Companies House Developer Hub (developer.company-information.service.gov.uk: register, create an application, create an API key). It is stored encrypted. Leave it empty to use the Actor owner's default key if one is set; without any key, Gazette data is returned without Companies House fields.

## Actor input object example

```json
{
  "categories": [
    "administration",
    "creditors-voluntary-liquidation",
    "members-voluntary-liquidation",
    "winding-up-petition",
    "winding-up-order",
    "receivership",
    "moratorium-cva",
    "strike-off-proposal"
  ],
  "maxResults": 50,
  "enrichWithCompaniesHouse": true
}
```

# Actor output Schema

## `events` (type: `string`):

No description

## `practitioners` (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 = {
    "categories": [
        "administration",
        "creditors-voluntary-liquidation",
        "members-voluntary-liquidation",
        "winding-up-petition",
        "winding-up-order",
        "receivership",
        "moratorium-cva",
        "strike-off-proposal"
    ],
    "maxResults": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("offerastudio/uk-company-distress-watch").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 = {
    "categories": [
        "administration",
        "creditors-voluntary-liquidation",
        "members-voluntary-liquidation",
        "winding-up-petition",
        "winding-up-order",
        "receivership",
        "moratorium-cva",
        "strike-off-proposal",
    ],
    "maxResults": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("offerastudio/uk-company-distress-watch").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 '{
  "categories": [
    "administration",
    "creditors-voluntary-liquidation",
    "members-voluntary-liquidation",
    "winding-up-petition",
    "winding-up-order",
    "receivership",
    "moratorium-cva",
    "strike-off-proposal"
  ],
  "maxResults": 50
}' |
apify call offerastudio/uk-company-distress-watch --silent --output-dataset

```

## MCP server setup

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

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/MbEkDfw49UM2tIsct/builds/SSIlqtaND42rVbxCC/openapi.json
