# UK Contracts Finder & Find a Tender OCDS Scraper (`plainkitbin/uk-contracts-finder-tenders`) Actor

Extract UK public procurement notices from Contracts Finder and Find a Tender (FTS) OCDS 1.1 APIs as structured JSON. Contains public sector information licensed under the Open Government Licence v3.0. Not affiliated with Crown Commercial Service or Cabinet Office.

- **URL**: https://apify.com/plainkitbin/uk-contracts-finder-tenders.md
- **Developed by:** [PlainKit bin](https://apify.com/plainkitbin) (community)
- **Categories:** Business, Developer tools
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.80 / 1,000 uk tender notice records

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/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 Scraper (`plainkitbin/uk-contracts-finder-tenders`)

**Actor slug:** `plainkitbin/uk-contracts-finder-tenders` — **UK Contracts Finder and Find a Tender** public procurement scraper. Retrieve UK government contract notices, tender opportunities, award updates, buyer organisations, CPV classification codes, contract values, and direct notice URLs from the keyless Contracts Finder and Find a Tender (FTS) OCDS 1.1 APIs as clean tabular JSON.

This Actor is not affiliated with Crown Commercial Service or the Cabinet Office. Contains public sector information licensed under the Open Government Licence v3.0.

### Introduction

Public sector procurement across the United Kingdom spans central government departments, local councils, NHS trusts, emergency services, and universities. This Actor queries the documented UK government Open Contracting Data Standard (OCDS 1.1) release package feeds on Contracts Finder (`www.contractsfinder.service.gov.uk`) and Find a Tender (`www.find-tender.service.gov.uk`) and normalizes notices into a single flat schema ready for JSON, CSV, Excel, or AI agent workflows.

#### Key Use Cases

- **Bid Pipeline Monitoring**: Track newly published `planning` and `tender` notices across UK contracting authorities with submission deadlines.
- **Award & Market Intelligence**: Monitor `award` notices, contract values, currencies, and CPV categories across sectors.
- **Sector Filtering by CPV & Keyword**: Filter notices client-side by CPV classification prefixes (such as `48` for software packages or `72` for IT services) and case-insensitive title or description keywords.
- **Dual-Portal Coverage**: Query Contracts Finder, Find a Tender (FTS), or both sources in a single run without managing API keys or proxies.

### Why use this Actor vs. raw DIY scripts

| Capability | This Actor (`plainkitbin/uk-contracts-finder-tenders`) | Custom DIY Script |
| --- | --- | --- |
| Dual OCDS schema normalization | Handles both Contracts Finder (`publishedFrom`) and Find a Tender (`updatedFrom`) formats plus `amount` / `amountGross` values | Separate parsers and query builders needed |
| Bounded retry & rate limiting | Exponential backoff on HTTP `429` and `500`/`502`/`503`/`504` with request pacing | Manual retry and rate-limit handling |
| Restart deduplication | Tracks `(ocid, release_id)` pairs across restarts so notices are never duplicated or double-charged | Re-fetches and duplicates rows on resume |
| Host & redirect pinning | Zero redirect hops; restricts network calls strictly to `www.contractsfinder.service.gov.uk` and `www.find-tender.service.gov.uk` | Exposed to unexpected redirects |
| Contact-data exclusion | Never emits `contactPoint` personal names, emails, or phone numbers; output passes deterministic egress scrubbing | Raw OCDS parties contain personal contact details |

### Input Configuration

| Field | Type | Description | Default |
| --- | --- | --- | --- |
| `source` | String | Source portal: `contracts_finder`, `find_a_tender`, or `both`. | `"contracts_finder"` |
| `published_from` | String | Optional ISO 8601 start date or datetime (`YYYY-MM-DD` or `YYYY-MM-DDTHH:MM:SSZ`). Defaults to the last 30 days for Contracts Finder when omitted. | `""` |
| `published_to` | String | Optional ISO 8601 end date or datetime (`YYYY-MM-DD` or `YYYY-MM-DDTHH:MM:SSZ`). | `""` |
| `stages` | Array of strings | Optional procurement stages (`planning`, `tender`, `award`, `implementation`). Empty means all stages. | `[]` |
| `cpv_codes` | Array of strings | Optional CPV classification prefix filters applied client-side (for example `["48", "72"]`). | `[]` |
| `keyword` | String | Optional case-insensitive substring filter matched against notice title and description. | `""` |
| `max_items` | Integer (1-500) | Maximum number of tender notice records to output. | `25` |

#### Sample Input

```json
{
  "source": "contracts_finder",
  "max_items": 5
}
```

#### Sample Output Record

```json
{
  "ocid": "ocds-b5fd17-f7b8b90c-544e-4f8f-9d2f-f13fcabed835",
  "release_id": "04d03a31-3807-45dc-9309-02f397f681a2-923085",
  "source": "contracts_finder",
  "title": "18 Tonne B Type Pumping Appliances",
  "buyer_name": "Lancashire Fire & Rescue Service",
  "stage": "awardUpdate",
  "status": "complete",
  "published_date": "2026-12-01T16:47:08Z",
  "deadline_date": "2025-03-07T12:00:00Z",
  "value_amount": 3849010.0,
  "value_currency": "GBP",
  "cpv_codes": [
    "34144213"
  ],
  "notice_url": "https://www.contractsfinder.service.gov.uk/Notice/04d03a31-3807-45dc-9309-02f397f681a2",
  "license": "http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/"
}
```

### Pricing

This Actor uses Apify Pay-Per-Event pricing charged per delivered tender notice row (event name: `uk-tender-notice`):

- **FREE**: `$0.004` per event
- **BRONZE**: `$0.0036` per event
- **SILVER**: `$0.0032` per event
- **GOLD**: `$0.0028` per event
- **PLATINUM**: `$0.0028` per event
- **DIAMOND**: `$0.0026` per event

Each row is pushed first and charged right after a successful push; a refused charge stops work and that row stays delivered and uncharged; a reached limit stops work after that row was charged; failed items are neither pushed nor charged. Across platform restarts, previously delivered `(ocid, release_id)` rows are skipped without duplicate pushes or charges.

### REST API & SDK Usage

Run synchronously and fetch dataset items via the Apify API:

```bash
curl -X POST "https://api.apify.com/v2/acts/plainkitbin~uk-contracts-finder-tenders/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"source": "contracts_finder", "stages": ["tender"], "max_items": 10}'
```

### Data Licence & Privacy

Contains public sector information licensed under the Open Government Licence v3.0 (`https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/`). The Open Government Licence v3.0 does not cover personal data; accordingly, this Actor omits `contactPoint` personal names, email addresses, and telephone numbers and passes all output through deterministic contact-data scrubbing.

### Use as an MCP Tool (AI Agents)

AI agents and MCP clients (such as Claude Desktop or Cursor) can invoke `plainkitbin/uk-contracts-finder-tenders` directly via `@apify/actors-mcp-server` over `stdio`:

```bash
APIFY_TOKEN=<YOUR_APIFY_TOKEN> npx -y @apify/actors-mcp-server --actors plainkitbin/uk-contracts-finder-tenders
```

Hosted (Streamable HTTP): connect to `https://mcp.apify.com?tools=plainkitbin/uk-contracts-finder-tenders` using OAuth or the header `Authorization: Bearer <YOUR_APIFY_TOKEN>`.

Example MCP client configuration (`mcpServers`):

```json
{
  "mcpServers": {
    "uk-contracts-finder-tenders": {
      "command": "npx",
      "args": [
        "-y",
        "@apify/actors-mcp-server",
        "--actors",
        "plainkitbin/uk-contracts-finder-tenders"
      ],
      "env": {
        "APIFY_TOKEN": "<YOUR_APIFY_TOKEN>"
      }
    }
  }
}
```

Example JSON tool call matching `.actor/input_schema.json`:

```json
{
  "source": "contracts_finder",
  "stages": [
    "tender"
  ],
  "cpv_codes": [
    "48",
    "72"
  ],
  "max_items": 5
}
```

Catalog and registry: browse all Actors at [PlainKitBin](https://plainkitbin.com/) or discover the multi-Actor server `com.plainkitbin/public-data-actors` in the MCP Registry.

# Actor input Schema

## `source` (type: `string`):

Select which UK government OCDS feed to query: Contracts Finder, Find a Tender (FTS), or both.

## `published_from` (type: `string`):

Optional lower date/datetime bound in ISO 8601 format (for example 2026-11-01 or 2026-11-01T00:00:00Z). Defaults to the last 30 days for Contracts Finder when omitted.

## `published_to` (type: `string`):

Optional upper date/datetime bound in ISO 8601 format (for example 2026-12-01 or 2026-12-01T23:59:59Z).

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

Optional procurement stage filters such as planning, tender, award, or implementation. Leave empty for all stages.

## `cpv_codes` (type: `array`):

Optional CPV classification prefix strings (for example 48 or 72000000) filtered client-side against notice item classification IDs.

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

Optional case-insensitive substring matched client-side against notice title and description.

## `max_items` (type: `integer`):

Maximum number of tender notice records to output (1 to 500).

## Actor input object example

```json
{
  "source": "contracts_finder",
  "published_from": "",
  "published_to": "",
  "stages": [],
  "cpv_codes": [],
  "keyword": "",
  "max_items": 25
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset items produced by this run.

# 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 = {
    "source": "contracts_finder",
    "published_from": "",
    "published_to": "",
    "stages": [],
    "cpv_codes": [],
    "keyword": "",
    "max_items": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("plainkitbin/uk-contracts-finder-tenders").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 = {
    "source": "contracts_finder",
    "published_from": "",
    "published_to": "",
    "stages": [],
    "cpv_codes": [],
    "keyword": "",
    "max_items": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("plainkitbin/uk-contracts-finder-tenders").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 '{
  "source": "contracts_finder",
  "published_from": "",
  "published_to": "",
  "stages": [],
  "cpv_codes": [],
  "keyword": "",
  "max_items": 25
}' |
apify call plainkitbin/uk-contracts-finder-tenders --silent --output-dataset

```

## MCP server setup

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

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/GH5rlGHIqngSvk6lB/builds/KWzrmHvIUSudzTkh3/openapi.json
