# UK Public Tender Monitor - Contracts Finder (`minimal_ricegrass/uk-tender-monitor`) Actor

Watches UK Contracts Finder for new public-sector tender opportunities matching your keyword, CPV codes, minimum value and SME suitability. Each scheduled run emits only tenders published since the last run, with buyer, value and closing date, plus optional webhook POST.

- **URL**: https://apify.com/minimal\_ricegrass/uk-tender-monitor.md
- **Developed by:** [FJ Banks](https://apify.com/minimal_ricegrass) (community)
- **Categories:** Lead generation, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $40.00 / 1,000 results

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?

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 Public Tender Monitor — Contracts Finder

Watches **UK Contracts Finder** for **new public-sector tender opportunities**
matching your keyword, CPV codes, minimum value and SME suitability. Each
scheduled run emits only tenders published since the last run, with the buyer,
value, closing date and a link. Optional webhook POST to Slack, Zapier, Make or
n8n.

### Who it's for

| Buyer | Use |
|---|---|
| SMEs bidding for government work | Every relevant tender the day it's published, no daily portal-checking |
| Bid writers / proposal consultants | A qualified pipeline filtered to your clients' sectors |
| Sales teams selling into the public sector | Early signal that a buyer is going to market |
| Trade bodies / membership orgs | A curated tender feed as a member benefit |
| Researchers / journalists | Public-procurement activity by sector, buyer or value band |

### Quick start

1. No API key — Contracts Finder is free open data.
2. Set a **`keyword`** and/or **`cpvPrefixes`** for your sector (CPV is the more
   precise filter — see the list in the input). Optionally set `minValueGbp` or
   `smeOnly`.
3. Run once to seed (`firstRunLookbackDays` controls the backfill).
4. **Schedule** it daily. Later runs are incremental.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `keyword` | string | — | Broad free-text search. Combine with CPV for precision, or leave empty and filter purely on CPV/value. |
| `cpvPrefixes` | string\[] | `[]` | Keep only tenders whose CPV code (or an item's CPV) starts with one of these. Divisions: `45` Construction · `48` Software · `72` IT services · `71` Engineering/architecture · `79` Business services · `80` Education · `85` Health/social · `90` Environmental · `60` Transport · `92` Culture/sport. Use longer codes (e.g. `72200000`) to narrow. |
| `minValueGbp` | integer | `0` | Skip tenders with a stated value below this. Tenders with no value are kept only when this is `0`. |
| `smeOnly` | boolean | `false` | Keep only tenders flagged suitable for SMEs. |
| `firstRunLookbackDays` | integer 1–30 | `3` | First run only: days of history to fetch. |
| `webhookUrl` | string | — | POST `{source, filter, window, count, tenders[]}` each run. |
| `maxResults` | integer 1–5000 | `500` | Cap per run. |

### Output

One dataset item per new tender:

| Field | Example |
|---|---|
| `ocid` / `release_id` | `"ocds-b5fd17-458c4a19-…"` |
| `title` | `"Managed IT Support Services 2026–2029"` |
| `description` | *(first 2000 chars)* |
| `status` | `"active"` |
| `buyer` | `"East Sussex County Council"` |
| `cpv_code` / `cpv_description` | `"72500000"` / `"Computer-related services"` |
| `category` | `"services"` |
| `procurement_method` | `"Open procedure"` |
| `value` | `{ "amount": 250000, "currency": "GBP" }` or `null` |
| `published` | `"2026-09-02T14:22:34+01:00"` |
| `closing_date` | `"2026-10-01T12:00:00+01:00"` |
| `sme_suitable` | `true` |
| `documents_count` | `2` |
| `link` | `https://www.contractsfinder.service.gov.uk/notice/ocds-b5fd17-…` |
| `scraped_at` | `"2026-09-03T09:00:00.000Z"` |

### How incremental mode works

Cross-run state (seen release IDs + last-run time) lives in a **named** key-value
store, `uk-tender-monitor-state`, namespaced by a hash of `keyword` + `cpvPrefixes`

- `minValueGbp` + `smeOnly`. Runs after the first fetch from the day before the
  previous run to today, then drop every release ID already seen. Seen-set capped
  at 20,000.

### Scope note

Contracts Finder covers **below-threshold and lower-value UK public
procurement** plus voluntary notices. High-value / above-threshold tenders are
published on the separate **Find a Tender Service** — a future version of this
actor may add it. Contracts Finder has no server-side CPV or value filter, so
when no keyword is given the actor scans the whole publication window (a few
hundred notices/day) and filters locally.

### Local development

```bash
npm install
npm test
echo '{"cpvPrefixes":["72","48"],"firstRunLookbackDays":5}' > storage/key_value_stores/default/INPUT.json
npm start
```

### Deploy

```bash
npm i -g apify-cli && apify login && apify push
```

### Data source & licensing

Data from **Contracts Finder** (`contractsfinder.service.gov.uk`), a Crown
Commercial Service system, in OCDS format, published under the
[Open Government Licence v3.0](https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/).

### Related actors

Part of a small suite of UK public-register monitors, same publisher, same
pattern (incremental, no duplicates, webhook-ready):

- **[UK New Company Monitor](https://apify.com/minimal_ricegrass/uk-newco-monitor)** — new incorporations by SIC / location
- **[UK Insolvency Notice Monitor](https://apify.com/minimal_ricegrass/uk-insolvency-monitor)** — winding-up, administration, bankruptcy (The Gazette)
- **[UK Food Business Monitor](https://apify.com/minimal_ricegrass/uk-food-monitor)** — new food businesses + hygiene-rating changes (FSA)
- **[UK Company Change Monitor](https://apify.com/minimal_ricegrass/uk-company-change-monitor)** — watchlist diffing: status, charges, officers, filings

***

### Changelog

- **0.1** — Initial release: keyword + CPV + value + SME filters, incremental
  dedup, cursor pagination, webhook, transient-error retry.

# Actor input Schema

## `keyword` (type: `string`):

Free-text search across the notice (matching is broad - combine with CPV codes for precision). Leave empty to rely on CPV / value filters.

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

Keep only tenders whose CPV classification starts with one of these. Divisions: 45 Construction, 48 Software, 72 IT services, 71 Engineering/architecture, 79 Business services, 80 Education, 85 Health/social, 90 Environmental, 60 Transport, 92 Culture/sport. Use finer codes (e.g. 72200000) to narrow.

## `minValueGbp` (type: `integer`):

Skip tenders with a stated value below this. Tenders with no value are kept only when this is 0.

## `smeOnly` (type: `boolean`):

Keep only tenders flagged as suitable for small and medium enterprises.

## `firstRunLookbackDays` (type: `integer`):

On the first run only, how many days of tenders to fetch. Later runs are incremental.

## `webhookUrl` (type: `string`):

POST the new tenders from each run to this URL (Slack, Zapier, Make, n8n, custom).

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

Safety cap on tenders emitted per run. Excess is picked up next run.

## Actor input object example

```json
{
  "cpvPrefixes": [],
  "minValueGbp": 0,
  "smeOnly": false,
  "firstRunLookbackDays": 3,
  "maxResults": 500
}
```

# Actor output Schema

## `tenders` (type: `string`):

Tenders published since the last run.

## `table` (type: `string`):

No description

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

// Run the Actor and wait for it to finish
const run = await client.actor("minimal_ricegrass/uk-tender-monitor").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("minimal_ricegrass/uk-tender-monitor").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 minimal_ricegrass/uk-tender-monitor --silent --output-dataset

```

## MCP server setup

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

```

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/N46G1FPTCyT9yJgdb/builds/hlIob9QjpdM1r2rOE/openapi.json
