# UK Contracts Finder & Find a Tender OCDS Procurement Scraper (`groundplanes/uk-contracts-finder-ocds-procurement-scraper`) Actor

Extract UK public sector procurement notices, tenders, RFPs, and contract awards from Contracts Finder and Find a Tender using official OCDS open data.

- **URL**: https://apify.com/groundplanes/uk-contracts-finder-ocds-procurement-scraper.md
- **Developed by:** [Groundplane Labs](https://apify.com/groundplanes) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.10 / 1,000 notices

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Contracts Finder & Find a Tender OCDS Procurement Scraper

Extract UK public sector procurement notices, early-engagement planning pipelines, live tenders, RFPs, and contract awardees across Central Government, local councils, NHS trusts, and universities.

Found a problem or need a field? Open an issue on the Issues tab; we respond quickly.

***

### What It Does

The **UK Contracts Finder & Find a Tender OCDS Procurement Scraper** connects directly to the official UK Government Open Contracting Data Standard (OCDS) REST APIs across two complementary national procurement portals:

1. **Contracts Finder:** Below-threshold and domestic public sector opportunities across England and non-devolved UK bodies (contracts typically over £12,000 for central government or £30,000 for local authorities).
2. **Find a Tender (FTS):** High-value public sector notices and above-threshold procurements regulated under UK public contracts regulations.

#### Key Capabilities

- **Unified OCID Notice Consolidation:** Automatically merges multi-stage releases (Planning, Tender, Award, Contract) by their unique Open Contracting ID (`ocid`) into a single record reflecting the latest procurement stage.
- **Cross-Source Deduplication:** Releases are correlated across the two portals only when both portals publish the same `ocid`, in which case the row records both origins in `dataSources`. The portals use different `ocid` publisher prefixes (`ocds-b5fd17-` for Contracts Finder, `ocds-h6vhtk-` for Find a Tender), so in practice the same underlying procurement published on both portals carries two different `ocid`s and is not merged: cross-source merges are rare, and most consolidation happens between the multi-stage releases of a single portal.
- **Accurate Contact Parsing:** Separates published institutional procurement officers into distinct name, email, and phone fields without confusing emails for person names.
- **SME Suitability & Classification:** Captures Small and Medium Enterprise (SME) flags and maps Common Procurement Vocabulary (CPV) codes across tender items and award schedules.

***

### Who It's For

- **Suppliers & Commercial Bidders:** Monitor active tenders, expressions of interest, and RFP deadlines across UK central and local government.
- **Public Sector Consultancies:** Track competitor contract wins, awarded pricing, and framework renewals.
- **SME Bidders & Regional Contractors:** Filter specifically for high-value tenders explicitly designated for SME participation.
- **Procurement Analysts & Researchers:** Analyze UK public spending patterns, contracting timelines, and supplier market share.

***

### Input Parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `stages` | array | `["planning", "tender", "award"]` | Target procurement stages: `planning` (PIN/early engagement), `tender` (active RFPs), or `award` (concluded contracts). |
| `cpvCodePrefixes` | array | `["72000000", "45000000", "79000000"]` | Filter by CPV codes (e.g. `72000000` for IT, `45000000` for Construction, `79000000` for Business Consulting). Empty includes all. |
| `publishedFromIso` | string | run date minus 30 days | Earliest publication timestamp in ISO-8601 format. Leave empty to use the default, computed at run time. |
| `onlySmeSuitable` | boolean | `false` | When true, restricts results strictly to notices flagged by the buyer as suitable for SMEs. |
| `minContractValueGbp` | integer | `25000` | Minimum contract value threshold in GBP. Unpriced notices are preserved. Notices whose only published values are in a non-GBP currency count as unpriced for this filter (see the currency rule below) and are also preserved. |
| `maxItems` | integer | `1000` | Maximum number of unique procurement records to extract. |

#### Example Run Options (canary input)

The smallest run that proves the actor end to end: the default filters over the dynamic 30-day window, capped at 25 rows. `publishedFromIso` is left empty on purpose, so the window is the run date minus 30 days, computed at run time.

```json
{
  "stages": [
    "planning",
    "tender",
    "award"
  ],
  "cpvCodePrefixes": [
    "72000000",
    "45000000",
    "79000000"
  ],
  "publishedFromIso": "",
  "onlySmeSuitable": false,
  "minContractValueGbp": 25000,
  "maxItems": 25,
  "maxTotalChargeUsd": 50
}
```

***

### Output Fields

Each row represents a unique consolidated public procurement notice:

| Field | Type | Description |
|---|---|---|
| `ocid` | string | Globally unique Open Contracting Data Standard identifier (e.g. `ocds-b5fd17-...`). |
| `noticeTitle` | string | Official title of the procurement notice or award. |
| `stage` | string | Current procurement stage (`planning`, `tender`, or `award`). |
| `buyerName` | string | Procuring public authority, council, or trust name. |
| `buyerContactName` | string / null | Published procurement officer or department name. |
| `buyerContactEmail` | string / null | Official procurement inquiry email. |
| `buyerContactPhone` | string / null | Official procurement inquiry telephone number. |
| `buyerRegion` | string / null | Territorial region or NUTS/ITL code of the buyer. |
| `cpvCodes` | array | Common Procurement Vocabulary (CPV) codes identified in the notice. |
| `valueMinGbp` | number / null | Minimum estimated contract value in GBP, derived only from published minimum/maximum semantics (see the value rules below). |
| `valueMaxGbp` | number / null | Maximum or total estimated contract value in GBP, derived only from published minimum/maximum semantics (see the value rules below). |

#### Value rules (currency and minimum/maximum semantics)

- **Currency:** the currency of every published value is read. Amounts published in a currency other than GBP (for example a British Council notice priced in THB) are never converted at an invented rate and never relabelled as GBP: the row ships with `valueMinGbp` and `valueMaxGbp` null, the run ends PARTIAL stating how many non-GBP values were seen, and the `minContractValueGbp` filter treats the notice as having no usable GBP value, so it is kept under the same rule as an unpriced notice. Amounts published without a currency code are treated the same way, because their currency cannot be verified.
- **Minimum/maximum:** a published tender `minValue`/`maxValue` pair governs the range. A single published tender value sets both min and max. Lot values are parts of a total, not a range, and are never used to derive the minimum or maximum. Award and contract values are never pooled either: when the tender publishes no value and exactly one award or contract value exists, that single value sets both min and max; otherwise the fields stay null.
  | `isSuitableForSme` | boolean / null | Whether the buyer designated the opportunity as suitable for SMEs. |
  | `publishedDate` | string | Official publication timestamp in ISO-8601 format. |
  | `tenderDeadlineDate` | string / null | Bid submission deadline timestamp in ISO-8601 format. |
  | `awardedSupplierNames` | array | Names of winning contractors or consulting firms (on `award` notices). |
  | `noticeUrl` | string | Direct web link to the official notice on Contracts Finder or Find a Tender. |
  | `dataSources` | array | Portals where releases were found (`Contracts Finder`, `Find a Tender`). |

#### Sample Output Row

```json
{
  "ocid": "ocds-b5fd17-c58c79ec-1a82-4be3-8fb5-a73ef2c8f421",
  "noticeTitle": "Enterprise Cloud Architecture and Integration Support Services",
  "stage": "award",
  "buyerName": "Example Metropolitan District Council",
  "buyerContactName": "Commercial Procurement Directorate",
  "buyerContactEmail": "commercial.procurement@example.gov.uk",
  "buyerContactPhone": "+44 20 7946 0000",
  "buyerRegion": "UKI31",
  "cpvCodes": [
    "72000000",
    "72222300"
  ],
  "valueMinGbp": 450000.0,
  "valueMaxGbp": 450000.0,
  "isSuitableForSme": true,
  "publishedDate": "2026-10-31T12:00:00Z",
  "tenderDeadlineDate": "2026-11-20T17:00:00Z",
  "awardedSupplierNames": [
    "Acme Digital Solutions UK Ltd"
  ],
  "noticeUrl": "https://www.contractsfinder.service.gov.uk/Notice/c58c79ec-1a82-4be3-8fb5-a73ef2c8f421",
  "dataSources": [
    "Contracts Finder"
  ]
}
```

***

### How Pricing Works

Pay per result. You only pay for rows returned.

Set `maxTotalChargeUsd` in your run options to ensure a strict spending limit on every extraction.

***

### Data Source & Terms

All records are collected directly from keyless, public UK Government Open Contracting Data Standard (OCDS) REST APIs:

- Contracts Finder: `contractsfinder.service.gov.uk/Published/Notices/OCDS/Search`
- Find a Tender: `find-tender.service.gov.uk/api/1.0/ocdsReleasePackages`

**Update cadence and freshness:** both portals are live publication feeds, not bulk files. New and amended notices appear as contracting authorities publish them, at any time of day, and the OCDS endpoints serve each notice as soon as the portal publishes it. There is no fixed refresh time and this actor keeps no cache: a run reads the portals live, so its data is exactly as fresh as the portals' own publication, and the default window is always the 30 days before the run.

Public sector procurement notices are released under the Open Government Licence (OGL v3.0).

**Disclaimer:** This tool is independently developed and maintained. It is not affiliated with, endorsed by, or sponsored by the Crown Commercial Service, the UK Cabinet Office, or any contracting public authority.

***

### Compliance & Responsible Use

- This actor outputs official UK public procurement opportunities published for transparent competitive bidding.
- Users and buyers are solely responsible for ensuring compliance with PECR, GDPR, the UK Data Protection Act 2018, and relevant telecommunications outreach regulations before initiating communications.
- Consumer and private individual targeting is strictly prohibited.

***

### Limits & FAQ

- **How are multi-stage releases handled?** If a project has an initial planning release, followed by an invitation to tender and an award notice, the scraper combines them into one row carrying the most recent stage state, unioning all awarded suppliers and CPV codes.
- **Why is SME suitability sometimes null?** In accordance with OCDS standards, if an authority does not publish an SME suitability declaration, the field remains `null` rather than guessing.

***

### Troubleshooting

- **Zero matches:** A run with no matching notices ends as `Complete: 0 ... matched your filters`, not as a failure. Widen the CPV prefixes (or leave them empty for all codes), lower `minContractValueGbp`, or set `onlySmeSuitable` to false.
- **PARTIAL status:** The status message names the cause: skipped packages or releases that could not be merged by `ocid`, unparseable published values, values published in a non-GBP currency (shipped null, never converted), classification or date format drift at the source, or a sustained source rate limit. A PARTIAL caused only by your `maxTotalChargeUsd` limit means raising the limit delivers more rows.
- **Caps:** `maxItems` caps delivered rows exactly, and when it withholds matched rows the status message names the cap and how many matched rows were not delivered. Paging follows each source cursor to exhaustion, fetching one page per portal in turn and checking the `maxItems` quota after each page: if one portal's pages alone satisfy `maxItems`, the run stops there and the other portal contributes no rows to that run.
- **Stale window:** With no `publishedFromIso`, the window is always the 30 days before the run, computed at run time, so a default run never ships an old fixed window.

### Changelog

- **v0.2.1** (2026-11-02): Red Team fix round. Currency is now read on every published value: non-GBP amounts ship null with a counted PARTIAL reason and are never converted or compared against the GBP threshold. `valueMinGbp`/`valueMaxGbp` derive only from published tender minimum/maximum semantics (a published min/max pair, or a single tender value setting both); lot values and pooled award/contract values no longer feed the minimum, superseding the v0.2 note below where it says contract and lot values are read into the value fields (they are now read only for currency and format checks, plus a single award or contract value when the tender publishes none). Classification shape and release date format are validated, with drift ending PARTIAL with counts. Buyer name falls back to the buyer party in `parties`. Unknown OCDS tags map to no stage instead of shipping as stage values. Skipped-release counting is scoped to the stage filter. The status message names the `maxItems` cap when it withholds matched rows. README corrected on paging and cross-source correlation, with a source cadence statement and a labelled canary input. An offline adversarial fixture suite ships in `tests/`.
- **v0.2** (2026-11-01): Review fixes: dynamic 30-day default window, spec default for `minContractValueGbp`, empty filter lists honored, uncapped interleaved cursor paging, 6-try jittered retries with Retry-After, zero matches as success, Issues CTA only on source-caused PARTIALs, contract and lot values read, CPV division matching corrected, email-in-name contact guard, skipped and unparsed counts stated, row validation before push.
- **v0.1** (2026-11-01): Initial release featuring unified OCDS release merging, cursor-based pagination across Contracts Finder & Find a Tender, and CPV prefix filtering.

# Actor input Schema

## `cpvCodePrefixes` (type: `array`):

Common Procurement Vocabulary (CPV) code prefixes to filter (e.g. '72000000' for IT Services, '45000000' for Construction, '79000000' for Business & Advisory). Matches both 8-digit codes and 2-digit divisions. Leave empty to include all CPV codes.

## `maxItems` (type: `integer`):

Maximum number of deduplicated public procurement records to return.

## `minContractValueGbp` (type: `integer`):

Minimum contract value in GBP. Notices with known contract or award values strictly below this threshold are excluded. Notices with unstated/open value are preserved.

## `onlySmeSuitable` (type: `boolean`):

If true, restricts results strictly to notices explicitly flagged by the procuring authority as suitable for Small and Medium Enterprises (SMEs). Defaults to false to ensure broad market coverage.

## `publishedFromIso` (type: `string`):

Earliest notice publication timestamp in ISO-8601 format (e.g. '2026-10-01T00:00:00Z'). Leave empty to use the run date minus 30 days, computed at run time. Notices published before this timestamp are filtered out.

## `stages` (type: `array`):

Filter by procurement stage (e.g. 'planning' for early engagement/PIN, 'tender' for active bids/RFPs, 'award' for concluded contracts).

## Actor input object example

```json
{
  "cpvCodePrefixes": [
    "72000000",
    "45000000",
    "79000000"
  ],
  "maxItems": 200,
  "minContractValueGbp": 25000,
  "onlySmeSuitable": false,
  "publishedFromIso": "",
  "stages": [
    "planning",
    "tender",
    "award"
  ]
}
```

# Actor output Schema

## `results` (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 = {
    "cpvCodePrefixes": [
        "72000000",
        "45000000",
        "79000000"
    ],
    "maxItems": 200,
    "minContractValueGbp": 25000,
    "onlySmeSuitable": false,
    "publishedFromIso": "",
    "stages": [
        "planning",
        "tender",
        "award"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("groundplanes/uk-contracts-finder-ocds-procurement-scraper").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 = {
    "cpvCodePrefixes": [
        "72000000",
        "45000000",
        "79000000",
    ],
    "maxItems": 200,
    "minContractValueGbp": 25000,
    "onlySmeSuitable": False,
    "publishedFromIso": "",
    "stages": [
        "planning",
        "tender",
        "award",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("groundplanes/uk-contracts-finder-ocds-procurement-scraper").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 '{
  "cpvCodePrefixes": [
    "72000000",
    "45000000",
    "79000000"
  ],
  "maxItems": 200,
  "minContractValueGbp": 25000,
  "onlySmeSuitable": false,
  "publishedFromIso": "",
  "stages": [
    "planning",
    "tender",
    "award"
  ]
}' |
apify call groundplanes/uk-contracts-finder-ocds-procurement-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,groundplanes/uk-contracts-finder-ocds-procurement-scraper"
        }
    }
}
```

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/iFLi488qQSV7fTxmp/builds/qMtv8JntBUcReDKpA/openapi.json
