# UK Public Tenders (`grunkage/uk-public-tenders`) Actor

Search UK public procurement notices from Find a Tender and Contracts Finder (official OCDS APIs, Open Government Licence). Filter by keywords, CPV, region, date, value and notice type.

- **URL**: https://apify.com/grunkage/uk-public-tenders.md
- **Developed by:** [Nika Kakhidze](https://apify.com/grunkage) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.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 Tenders

Collect UK public-sector procurement notices from the two **official government OCDS APIs**:

- **Find a Tender** (`find-tender.service.gov.uk`) – higher-value UK notices
- **Contracts Finder** (`contractsfinder.service.gov.uk`) – English notices above ~£12k/£30k

### What it does

Pulls recent notices (by published/updated date), normalises them into one row per notice, and filters by keywords, CPV code prefixes, region (NUTS code or postcode prefix), minimum value and notice type. `onlyNewSinceLastRun` remembers already-returned notice IDs in the named key-value store `uk-public-tenders-state`, ideal for daily schedules/alerts. Requests are rate-limited (≈1 request/second, retries with back-off).

### Input example

```json
{ "keywords": ["software", "cloud"], "cpvCodes": ["72000000"], "region": "UKI", "daysBack": 7, "minValue": 100000, "noticeTypes": ["tender"], "maxItems": 50, "onlyNewSinceLastRun": true }
```

Keyword/CPV/region/value/type filters are applied to scanned pages; `maxPagesPerSource` (default 20 × 100 notices) bounds how far back each run scans.

### Output example

```json
{
  "id": "104036-2026", "ocid": "ocds-h6vhtk-079633", "title": "Vehicle Maintenance",
  "buyer": "University of Exeter", "value": 40300, "currency": "GBP", "cpvCodes": ["50110000"],
  "regions": [], "deadline": "2026-11-17T12:00:00+00:00", "status": "active", "noticeType": ["tender"],
  "source": "find-tender", "url": "https://www.find-tender.service.gov.uk/Notice/104036-2026",
  "publishedDate": "2026-11-03T10:04:44Z", "description": "…"
}
```

### Privacy

Contact person names, emails and phone numbers present in the source data are **deliberately not output**. Only the buyer organisation name is included.

### Data source & licence

Contains public sector information licensed under the [Open Government Licence v3.0](https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/). Source: Find a Tender service and Contracts Finder (Crown copyright). Not affiliated with or endorsed by the UK Government.

### Limits

- Value may be missing on some notices (then `value` is null; such notices are excluded if `minValue` is set).
- The same procurement can appear in both sources and as several releases (tender, award, …).
- Free Apify plan users get limited results per run.

### Pricing

Pay per result (price set by the Actor owner in Apify Console).

# Actor input Schema

## `keywords` (type: `array`):

Match any keyword in title or description (case-insensitive). Leave empty for all.

## `cpvCodes` (type: `array`):

CPV code prefixes, e.g. 72000000 (IT services) matches 72xxxxxx.

## `region` (type: `string`):

e.g. UKI (London), UKJ4 (Kent), or a postcode prefix like ME14.

## `sources` (type: `array`):

Which official services to query.

## `daysBack` (type: `integer`):

Look back this many days when Date from is empty.

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

Published/updated on or after this date.

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

Published/updated on or before this date.

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

Only notices with a stated value >= this (notices without a value are excluded when set).

## `noticeTypes` (type: `array`):

Leave empty for all types.

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

Hard cap on notices returned.

## `maxPagesPerSource` (type: `integer`):

Safety cap on API pages (100 notices each) scanned per source.

## `onlyNewSinceLastRun` (type: `boolean`):

Skip notices returned by previous runs (state kept in named key-value store 'uk-public-tenders-state').

## Actor input object example

```json
{
  "keywords": [
    "services"
  ],
  "sources": [
    "find-tender",
    "contracts-finder"
  ],
  "daysBack": 3,
  "maxItems": 20,
  "maxPagesPerSource": 20,
  "onlyNewSinceLastRun": false
}
```

# Actor output Schema

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

Dataset items in the Overview view

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

All dataset items with every field

# 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 = {
    "keywords": [
        "services"
    ],
    "sources": [
        "find-tender",
        "contracts-finder"
    ],
    "daysBack": 3,
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("grunkage/uk-public-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 = {
    "keywords": ["services"],
    "sources": [
        "find-tender",
        "contracts-finder",
    ],
    "daysBack": 3,
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("grunkage/uk-public-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 '{
  "keywords": [
    "services"
  ],
  "sources": [
    "find-tender",
    "contracts-finder"
  ],
  "daysBack": 3,
  "maxItems": 20
}' |
apify call grunkage/uk-public-tenders --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,grunkage/uk-public-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/GsXcihCBU2QjW1YJ0/builds/Tr8kIsbJnnEozRcQt/openapi.json
