# UK Contract Winners: Contracts Finder + Companies House (`zaphod-b/uk-contract-winners`) Actor

Who won UK public contracts? Contracts Finder and Find a Tender awards in one table, complete over long date ranges, with supplier Companies House numbers, an expiring-contracts (re-tender) mode and delta runs. Official open data (OGL). MCP-ready.

- **URL**: https://apify.com/zaphod-b/uk-contract-winners.md
- **Developed by:** [InkWorks](https://apify.com/zaphod-b) (community)
- **Categories:** Business, Lead generation, MCP servers
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 contract award 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/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 Contract Winners: Contracts Finder, Find a Tender and Companies House

**Who won UK public-sector contracts?** One clean table of contract awards from the two official portals, with each winning supplier's Companies House number where the notice publishes one. Built for lead generation, competitor tracking, re-tender pipelines and AI agents (MCP-ready).

Sources:

- **Contracts Finder** (central government and wider public sector, below and above threshold)
- **Find a Tender** (high-value contracts)

For every award and every winning supplier you get the buyer, title, value, CPV codes, dates, contract end date where published, and the **supplier's Companies House company number** where the notice publishes one, so the row joins straight onto your CRM, Companies House data or other datasets.

### Quick start

Paste this input to get awards published in the last 7 days from both portals:

```json
{
  "mode": "recentAwards",
  "daysBack": 7,
  "maxResults": 100,
  "sources": ["contracts_finder", "find_a_tender"]
}
```

`maxResults` is your cost ceiling: you are charged per row returned. In a measured 7-day window (28 Nov 2026) the two portals together published 711 award rows, of which 247 carried a published company number. At $0.005 a row that whole window costs about $3.56. A daily schedule with `onlyNew` turned on returns only new awards, so it costs a fraction of that.

### Example output

Three real rows from a run on 28 Nov 2026 (shortened; each row has more fields, listed below):

| supplierName | supplierCompanyNumber | buyerName | value (GBP) | source |
|---|---|---|---|---|
| ASHE CONSTRUCTION LIMITED | (not published in the notice) | Hertfordshire Partnership Foundation NHS Trust | 46,200 | contracts_finder |
| Turner & Townsend Project Management Limited | (not published in the notice) | Defra group Commercial | 173,285 | contracts_finder |
| DH Opco UK Ltd (Dedalus) | 12888223 | Northern Care Alliance NHS Foundation Trust | 468,461 | contracts_finder |

Where a notice does not publish a company number, you can add your own free Companies House API key and the Actor looks the company up by exact name only. It never guesses.

### Ready-to-use recipes

**1. Leads: IT suppliers that just won public work (CPV 72, over £50k)**

```json
{ "mode": "recentAwards", "daysBack": 30, "cpvPrefixes": ["72"], "minValue": 50000, "maxResults": 500 }
```

**2. Competitor tracking: every award won by a named supplier**

```json
{ "mode": "recentAwards", "daysBack": 180, "supplierContains": "Capita", "maxResults": 1000 }
```

**3. Re-tender pipeline: contracts ending in the next 12 months for one buyer type**

```json
{ "mode": "expiringContracts", "lookbackMonths": 24, "endingWithinMonths": 12, "buyerContains": "NHS", "maxResults": 1000 }
```

**4. Daily watch list: only new awards matching your keywords**

```json
{ "mode": "recentAwards", "daysBack": 7, "keywords": ["software"], "onlyNew": true, "stateKey": "software-watch" }
```

Run recipe 4 on an Apify schedule once a day and you are only charged for awards you have not seen before.

### Use from AI agents (MCP)

This Actor works as a tool in the Apify MCP server. To give an MCP client (for example Claude Desktop, Cursor or VS Code) this Actor as a tool, point it at:

```
https://mcp.apify.com?tools=zaphod-b/uk-contract-winners
```

Sign in with your Apify account when the client asks. An agent can then ask things like "Which companies won NHS IT contracts over £100k in the last 30 days, and what are their Companies House numbers?" and the Actor returns structured rows. Set `maxResults` low for exploratory questions, because each row returned is a paid event.

### Modes

1. **Recent awards**: who won what in the last N days, or any date range. Useful for lead generation (firms that have just won public work are often hiring and buying), competitor tracking (`supplierContains`) and market research.
2. **Expiring contracts**: contracts ending within the next N months, drawn from awards published in the last N months — a re-tender pipeline. Contracts Finder publishes end dates on nearly every award; Find a Tender award notices usually do not, so this mode is effectively Contracts Finder only for now.

### Why this Actor

- **Complete results for long date ranges.** Contracts Finder's API stops at 1,000 results per query without saying so. A single six-month query returned 1,000 award notices; slicing the same window returned 15,764. This Actor slices automatically and splits any slice that hits the cap.
- **Companies House linkage.** Company numbers are extracted from published identifiers and normalised to 8 characters. With your own free Companies House API key it also adds company status, SIC codes, incorporation date, registered postcode and last accounts type (a proxy for company size), and finds missing company numbers by *exact* name match only. It never guesses.
- **Only pay for new rows on schedules.** `onlyNew` remembers what it returned before (per `stateKey`), so a daily schedule only returns and charges for new awards.
- **Merged and de-duplicated.** An award published on both portals is returned once (Find a Tender copy preferred), with a link to the other copy.
- **Agent-friendly.** Flat, documented fields; works through Apify's MCP server for AI agents.
- **Official open data only.** No scraping of websites, no proxies, no logins.

### Pricing

Pay per event:

- **$0.005 per award row** ($5 per 1,000 rows)
- **$0.002 per Companies House enrichment**, only when you supply your own Companies House API key

You can set a maximum spend on each run. Scheduled runs with `onlyNew` turned on are charged only for new rows.

### Input (main fields)

| Field | Meaning |
|---|---|
| `mode` | `recentAwards` or `expiringContracts` |
| `daysBack` / `dateFrom` / `dateTo` | Window for recent awards |
| `lookbackMonths`, `endingWithinMonths` | Window for expiring contracts |
| `keywords`, `cpvPrefixes`, `minValue`, `maxValue`, `buyerContains`, `supplierContains` | Filters |
| `onlyNew`, `stateKey` | Delta mode for schedules |
| `companiesHouseApiKey`, `matchByName` | Optional enrichment with your own key |

### Output (one row per award per supplier)

`supplierName`, `supplierCompanyNumber`, `companyNumberSource` (`published` / `companies_house_exact_name_match`), `supplierScale` (Find a Tender), `supplierPostcode`, `supplierLocality`, `title`, `description` (first 1,000 characters), `buyerName`, `buyerPostcode`, `cpvCodes`, `value`, `currency`, `awardDate`, `datePublished`, `contractStart`, `contractEnd`, `contractEndEstimated`, `source`, `noticeUrl`, `ocid`, `noticeId`, `alsoPublishedOn`, `retrievedAt`, `licence`; with a key also `chCompanyName`, `chStatus`, `chType`, `chIncorporated`, `chSicCodes`, `chRegisteredPostcode`, `chLastAccountsType`, `chLastAccountsMadeUpTo`, `chUrl`.

### FAQ

**Why are results from other tools capped at 1,000?** Contracts Finder's API stops at 1,000 results per query without saying so. This Actor slices the date window and splits any slice that hits the cap. In one test a single six-month query returned 1,000 award notices, while the sliced run returned 15,764.

**Does it cover contracts that were never published?** No. It covers award notices that the authorities published on Contracts Finder and Find a Tender. Some contracts, such as many below-threshold or exempt awards, are never published.

**Why is the company number sometimes empty?** Notices only include one when the buyer entered it. About a third of rows carry one in our samples. Add your own Companies House API key to look up the rest by exact name.

**Is the data licensed for commercial use?** Contracts Finder and Find a Tender notices are published under the Open Government Licence v3.0, which allows commercial reuse with attribution. See "Data licence and attribution" below.

**What does a run cost?** Only the events in the Pricing section. Set `maxResults` to cap your spend.

**Something looks wrong?** Open an issue on this Actor's page with the input you used and the notice URL. We check issues and fix source-format changes.

### Data licence and attribution

Contains public sector information licensed under the Open Government Licence v3.0 (Contracts Finder and Find a Tender, Crown copyright). Companies House data is fetched with your own API key, under Companies House terms. This Actor is not associated with or endorsed by Contracts Finder, Find a Tender, Companies House or any government department.

### Limits

- Find a Tender award notices rarely carry contract end dates, so expiring-contract coverage is mostly Contracts Finder.
- About a third of award rows carry a published company number (35% in a 7-day sample); more with a Companies House key.
- Supplier postcodes are often missing from Contracts Finder notices.

# Actor input Schema

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

Recent awards returns awards published in the date window. Expiring contracts scans awards from the last lookbackMonths and returns those whose contract ends within endingWithinMonths.

## `daysBack` (type: `integer`):

Ignored if dateFrom is set.

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

Optional, e.g. 2026-11-01.

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

Optional; defaults to now.

## `lookbackMonths` (type: `integer`):

Expiring-contracts mode: how many months of past awards to scan for contract end dates.

## `endingWithinMonths` (type: `integer`):

Expiring-contracts mode: return contracts ending within this many months from now.

## `keywords` (type: `array`):

Match in title or description, case-insensitive.

## `cpvPrefixes` (type: `array`):

e.g. 72 (IT services), 4881 (medical software).

## `minValue` (type: `integer`):

Minimum award value in GBP.

## `maxValue` (type: `integer`):

Maximum award value in GBP.

## `buyerContains` (type: `string`):

Only awards whose buyer name contains this text.

## `supplierContains` (type: `string`):

Track a competitor's wins.

## `sources` (type: `array`):

Which official portals to read.

## `onlyNew` (type: `boolean`):

For scheduled runs: skips awards already returned under the same stateKey, so you only pay for new rows.

## `stateKey` (type: `string`):

Separate watch lists keep separate memories.

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

Your own free key from developer.company-information.service.gov.uk. Adds status, SIC codes, incorporation date, registered postcode and accounts type, and finds company numbers by exact name where the notice did not publish one.

## `matchByName` (type: `boolean`):

Only with an API key. Accepts a single exact normalised-name match among active companies; never guesses.

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

Maximum rows returned. You are charged per row, so this is your cost ceiling.

## `maxPagesPerSource` (type: `integer`):

Safety limit on API pages (100 notices each) per source.

## Actor input object example

```json
{
  "mode": "recentAwards",
  "daysBack": 7,
  "lookbackMonths": 24,
  "endingWithinMonths": 12,
  "sources": [
    "contracts_finder",
    "find_a_tender"
  ],
  "onlyNew": false,
  "stateKey": "default",
  "matchByName": true,
  "maxResults": 1000,
  "maxPagesPerSource": 1500
}
```

# Actor output Schema

## `awardRows` (type: `string`):

JSON/CSV/Excel of award rows: supplier, company number, buyer, title, value, dates, CPV codes and the official notice URL.

# 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("zaphod-b/uk-contract-winners").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("zaphod-b/uk-contract-winners").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 '{}' |
apify call zaphod-b/uk-contract-winners --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,zaphod-b/uk-contract-winners"
        }
    }
}
```

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/nxavf9bpQZOsDS8ue/builds/rZoCyYqI7brwYCDPY/openapi.json
