# UK Government Tenders & Contracts Scraper (OCDS API) (`perceptive_city_af7/uk-gov-tenders-scraper`) Actor

Official UK Find a Tender (FTS) OCDS API scraper for high-value UK public procurement tenders, contract awards, buyer orgs, CPV codes & deadlines. Built for B2B sales lead gen & AI agents. UK OGL v3.0.

- **URL**: https://apify.com/perceptive_city_af7/uk-gov-tenders-scraper.md
- **Developed by:** [fall Rainy](https://apify.com/perceptive_city_af7) (community)
- **Categories:** Lead generation, Automation, Agents
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 uk procurement notices

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

## UK Government Tenders & Contracts Scraper (OCDS API)

> **Free Integration Kits:** Download ready-to-use Google Sheets, Excel Power Query, Postman/Bruno, n8n CSV workflows, Python/JS SDKs & MCP configs in [Open Data Kits](https://github.com/Rainy-fall-end/open-data-kits) · Need 7-country unified procurement (US + UK + EU + World Bank + Canada + Australia)? Check our **Global Public Tenders & Grants Aggregator** Actor!

**Keywords:** UK Government Tenders Scraper · Contracts Finder OCDS · UK public procurement · tender opportunities · contract awards · B2G lead generation · CPV codes

Fetches **zero-Playwright, structured OCDS** public procurement notices — planning, tender opportunities, and contract awards — directly from the **UK Cabinet Office Contracts Finder API**. No browsers, no HTML scraping: clean JSON records ready to feed lead generation, market intelligence, and award-tracking pipelines.

### Input Parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `keyword` | string | `""` | Free-text search on notice title/description, e.g. `"software"`. Empty = no keyword filter. |
| `stages` | string | `"tender"` | `"tender"`, `"planning"`, `"award"`, or `"planning,tender,award"` (comma-combine). |
| `minValue` | number | – | Optional minimum contract value in **GBP**. Drops lower-valued notices. |
| `publishedFrom` | string | – | Optional ISO 8601 date/timestamp, e.g. `"2026-11-01"`. |
| `maxItems` | integer | `10` | Max saved notices, `1`–`2000`. |

**JSON input example**

```json
{
  "keyword": "software",
  "stages": "planning,tender,award",
  "minValue": 50000,
  "publishedFrom": "2026-11-01",
  "maxItems": 50
}
```

### Sample JSON Output

```json
{
  "ocid": "ocds-b5fd17-3f2a1c7e-9b41-4b6a-8d2e-1f7b9c0e4a21",
  "releaseId": "001234-2026",
  "tenderId": "2026/S 123-456789",
  "title": "Provision of Cloud Software Licences and Support",
  "stage": "tender",
  "status": "active",
  "publishedDate": "2026-11-12T09:30:00Z",
  "deadlineDate": "2026-12-15T12:00:00Z",
  "valueAmount": 250000.00,
  "minValueAmount": 150000.00,
  "currency": "GBP",
  "procurementCategory": "Services",
  "cpvCode": "48000000",
  "cpvDescription": "Software package and information systems",
  "smeSuitable": true,
  "buyerId": "GB-COH-RC000766",
  "buyerName": "Cabinet Office",
  "buyerLocality": "London",
  "buyerCountry": "United Kingdom",
  "noticeUrl": "https://www.contractsfinder.service.gov.uk/Notice/3f2a1c7e-9b41-4b6a-8d2e-1f7b9c0e4a21",
  "sourceDataset": "Contracts Finder OCDS",
  "sourcePublisher": "Cabinet Office",
  "sourceUrl": "https://www.contractsfinder.service.gov.uk/Published/Notices/OCDS/Search",
  "accessedOn": "2026-11-25",
  "licenceName": "Open Government Licence v3.0",
  "licenceUrl": "http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/",
  "attribution": "Contains public sector information licensed under the Open Government Licence v3.0."
}
```

### Pay-Per-Event (PPE) Pricing

| Event | Price | Notes |
|---|---|---|
| `apify-actor-start` | **$0.00005** | Includes first 5s of compute free |
| `apify-default-dataset-item` | **$0.005** | Per saved notice — **$5.00 per 1,000 notices** |

You only pay for notices actually written to the dataset.

### MCP Quick Start

Point any MCP client — e.g. the **Apify MCP Server** (`mcp.apify.com`) — at this Actor and invoke it with a compact JSON payload:

```json
{"stages": "tender", "keyword": "software", "minValue": 50000, "maxItems": 10}
```

Ideal for AI-driven **UK B2G lead generation**, market intelligence, and award tracking. Ask your agent *"Find UK public tenders for software above £50k published this month"* and it returns structured OCDS notices.

### Data Source & Open Government Licence v3.0 Attribution

Data is sourced from the **Cabinet Office UK Government Contracts Finder OCDS Search API** — `https://www.contractsfinder.service.gov.uk/Published/Notices/OCDS/Search` — and licensed under the **Open Government Licence v3.0** (`http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/`). The OGL permits **commercial reuse with attribution**.

- Personal `contactPoint` details are **excluded** from every record.
- Every dataset record carries OGL v3.0 attribution metadata (`licenceName`, `licenceUrl`, `attribution`).

### Verification / Local Testing

```bash
python tests/test_live_and_unit.py              # live + unit tests
python tests/test_live_and_unit.py --skip-live  # unit tests only
python -m src.client --probe                    # connectivity / API probe
```

### 中文简介

本 Actor 抓取**英国政府公共采购招标与中标公告**数据（Contracts Finder OCDS），覆盖规划、招标与合同授予三个阶段，输出结构化规范字段，适合 B2G 商机挖掘与中标跟踪。数据基于 **OGL v3.0** 开放政府许可，允许商业再利用（须署名），不含个人联系方式。采用**按条计费**：启动事件 `$0.00005`，每条保存的公告 `$0.005`（即每 1,000 条 `$5.00`）。

# Actor input Schema

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

Case-insensitive filter applied across title, description, buyer name, CPV code/description, OCID, tender ID, and supplier names. Leave empty for no keyword filtering.

## `stages` (type: `string`):

Select which notice stages to include. Use 'planning,tender,award' to include all stages.

## `minValue` (type: `number`):

Optional minimum contract value in GBP or the notice's original currency. Notices with lower or unknown values are excluded if set.

## `publishedFrom` (type: `string`):

Optional earliest notice publication date in ISO 8601 format, e.g. 2026-11-01 or 2026-11-01T00:00:00Z. Leave empty for all dates.

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

Maximum distinct OCID notices to save. Default 10 completes in under 15 seconds.

## Actor input object example

```json
{
  "keyword": "",
  "stages": "tender",
  "publishedFrom": "",
  "maxItems": 10
}
```

# Actor output Schema

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

Deduplicated UK Government Contracts Finder OCDS notices with Open Government Licence v3.0 attribution.

# 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("perceptive_city_af7/uk-gov-tenders-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("perceptive_city_af7/uk-gov-tenders-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 '{}' |
apify call perceptive_city_af7/uk-gov-tenders-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,perceptive_city_af7/uk-gov-tenders-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/txnvyTckeQx4hVBc6/builds/hn9J1iJ2DkBZEmDAf/openapi.json
