# UK Public Contracts (Contracts Finder + Find a Tender) (`weathered_trumpetvine/uk-public-contracts`) Actor

Search official UK government contract notices from Contracts Finder and Find a Tender in one place. Get cleaned public records: title, buyer, value, dates, CPV codes, stage, region and the official notice link. No personal contact details.

- **URL**: https://apify.com/weathered_trumpetvine/uk-public-contracts.md
- **Developed by:** [Coin Scout](https://apify.com/weathered_trumpetvine) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.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?

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 Public Contracts (Contracts Finder + Find a Tender)

Pull official UK government contract notices from **Contracts Finder** and **Find a Tender**, merge them into one list, and return clean rows you can open in a spreadsheet or feed to another tool.

This Actor talks only to the official public OCDS APIs. It does not scrape the websites, does not need a login or API key, and it **does not include personal contact names, email addresses or phone numbers**. If you need to bid, follow the official notice link and use the contact details published there.

Contains public sector information licensed under the Open Government Licence v3.0.

### What you get

Each row is one public notice, with:

- **source** — `contracts-finder` or `find-a-tender`
- **noticeId** — the public notice identifier
- **ocid** — the Open Contracting ID for that procurement
- **title** and a trimmed **description**
- **buyerName** — the buying organisation only
- **valueAmount** and **valueCurrency** (usually GBP), when published
- **publishedDate** and **deadline**, when published
- **cpvCodes** — official category codes
- **stage** (`planning`, `tender` or `award`) and **status**
- **region**, when published
- **noticeUrl** — a link to the official notice page

Emails and phone numbers are removed from text fields. Contact keys from the official data (name, email, phone, fax) are never copied into the output.

### How to use it

1. Leave the dates empty to search the last 7 days, or set **Date from** and **Date to** as `YYYY-MM-DD`.
2. Optionally add **Keywords** (comma-separated), a **CPV prefix** such as `72` for IT or `45` for construction, a value range, or a stage.
3. Set **Maximum results** so a run stays small (try 50 first).
4. Run the Actor and export the dataset as JSON, CSV or Excel.

Example input:

```json
{
  "keywords": "software, digital",
  "dateFrom": "2026-11-01",
  "dateTo": "2026-11-12",
  "stage": "tender",
  "cpvPrefix": "72",
  "maxResults": 50,
  "sources": "both"
}
```

### Where the data comes from

- [Contracts Finder OCDS search API](https://www.contractsfinder.service.gov.uk/apidocumentation/) — mostly below-threshold contracts. The date filter uses the publication date.
- [Find a Tender OCDS API](https://www.find-tender.service.gov.uk/Developer/Documentation) — above-threshold UK procurements. The date filter uses the time the record was last updated.

Both registers publish under the [Open Government Licence v3.0](https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/). Please keep the attribution when you reuse the data:

> Contains public sector information licensed under the Open Government Licence v3.0.

### Notes and limits

- Keyword, CPV and value filters are applied after the official APIs return results, because those APIs search by date and stage only.
- The same procurement can appear as more than one notice (for example a tender, then an award). Duplicate copies of the same official notice URL are removed.
- Award notices often have no submission deadline.
- The Actor pauses briefly between pages and retries politely if a register is busy. If a register is down or rate-limits for too long, the run fails with a clear message.
- This tool is meant for public procurement data. It will not help you collect personal leads.

### Licence

The Actor code can be used with the project. The notice data itself remains public sector information licensed under the Open Government Licence v3.0.

# Actor input Schema

## `keywords` (type: `string`):

Optional words or phrases to match in the title, description or buying organisation. Separate alternatives with commas (a notice matches if any phrase appears). Leave empty to return every notice in the date range.

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

Start of the date window, as YYYY-MM-DD (UTC). Defaults to 7 days ago if left empty. Contracts Finder filters by publication date; Find a Tender filters by last update time.

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

End of the date window, as YYYY-MM-DD (UTC). Defaults to today if left empty.

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

Keep only notices whose amount is at least this number (same currency as the notice, usually GBP). Notices with no amount are dropped when this filter is set.

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

Keep only notices whose amount is at most this number. Notices with no amount are dropped when this filter is set.

## `cpvPrefix` (type: `string`):

Optional CPV code prefix, for example 72 for IT services or 45 for construction. A notice matches if any of its CPV codes starts with this prefix. Leave empty for all categories.

## `stage` (type: `string`):

Which procurement stage to include.

## `sources` (type: `string`):

Which official registers to query.

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

Maximum number of notices to return. Helps control run time and cost.

## Actor input object example

```json
{
  "stage": "all",
  "sources": "both",
  "maxResults": 100
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset of cleaned public contract notices.

# 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("weathered_trumpetvine/uk-public-contracts").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("weathered_trumpetvine/uk-public-contracts").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 weathered_trumpetvine/uk-public-contracts --silent --output-dataset

```

## MCP server setup

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

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/Fc3LkAiKtowjdthwh/builds/0PRdt9aifzfkkZ2eV/openapi.json
