# UK Find a Tender — Government Procurement Tracker (`nexgendata/uk-find-a-tender`) Actor

UK gov tender opportunities + contract awards via the official Find a Tender OCDS API (Cabinet Office open data). Returns tender\_id, title, buyer, value\_gbp, status, deadline, awarded supplier, CPV codes. B2G sales intel — alt to Tussell / BiP.

- **URL**: https://apify.com/nexgendata/uk-find-a-tender.md
- **Developed by:** [Stephan Corbeil](https://apify.com/nexgendata) (community)
- **Categories:** Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $100.00 / 1,000 tenders

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## UK Find a Tender — Government Procurement Intel

Pull **UK government tender opportunities and contract award notices** from the official **Find a Tender Service (FTS)** OCDS API run by the Cabinet Office. Returns every UK regulated procurement notice covered by the Public Contracts Regulations 2015, the Utilities Contracts Regulations 2016, the Concession Contracts Regulations 2016, the Defence and Security Public Contracts Regulations 2011, and the new Procurement Act 2023 transparency regime — every Contract Notice, Contract Award Notice, Prior Information Notice (PIN), Pipeline Notice, Modification Notice, and Termination Notice, in machine-readable OCDS 1.1 format with the UK extension. Per-tender output includes `tender_id`, `ocid`, `title`, `buyer_name`, `buyer_id`, `value_gbp`, `tender_status`, `published_date`, `deadline_date`, `award_date`, `awarded_supplier`, `cpv_codes[]`, `description`, `procurement_category`, `procurement_method`, `notice_type`, `above_threshold`, and the canonical Find a Tender notice URL.

The UK Cabinet Office publishes the **most open, machine-readable government procurement register in the G7**. Since 1 January 2021, Find a Tender Service has replaced OJEU / TED for UK regulated notices post-Brexit. Every UK contracting authority — central government, executive agencies, NHS Trusts, local authorities, fire and rescue services, police and crime commissioners, devolved-administration bodies in Scotland / Wales / Northern Ireland, NHS Foundation Trusts, the BBC, the universities sector, defence and security buyers, and utilities buyers in water, energy, transport, and postal services — is **statutorily required** to publish every above-threshold procurement notice on Find a Tender. The service is published under the **Open Government Licence v3.0**: no auth, no per-record fee, no NDA, no rate-card, no enterprise contract. That openness is why FTS is the foundational input for every B2G sales pipeline, every public-sector market intelligence platform, every defence-industry capture team, every NHS commercial-intelligence dashboard, and every public-procurement academic research dataset in the country.

This Actor wraps the official FTS OCDS endpoint (`/api/1.0/ocdsReleasePackages`) with **cursor-based pagination** (follows the OCDS `links.next` reference until the requested max is hit), **client-side filtering** for search query, GBP minimum value, buyer name, CPV prefix, and tender status, and pushes every matching tender as one dataset row ready for downstream Snowflake / BigQuery / Postgres / Salesforce / HubSpot ingestion or for ingestion into Claude / GPT / Cursor agents via Apify's MCP server.

---

### What is Find a Tender, exactly?

Find a Tender Service is the UK's **statutory single point of publication** for above-threshold public procurement notices. Pre-Brexit, UK notices flowed to OJEU (Official Journal of the European Union) and were published on TED (Tenders Electronic Daily). From 1 January 2021 onwards, the UK exited the EU procurement regime and stood up its own equivalent — FTS — at `find-tender.service.gov.uk`. The Cabinet Office Government Commercial Function operates the service; the data is published as machine-readable OCDS (Open Contracting Data Standard) 1.1 with the formal UK extension and the EU profile extension.

Every UK contracting authority covered by the four UK procurement regimes has to publish on FTS:

- **Public Contracts Regulations 2015 (PCR 2015)** — central government departments, executive agencies, NHS Trusts, NHS Foundation Trusts, local authorities, fire and rescue, police, devolved admin bodies. Thresholds (2024 rates): goods/services central gov **£138,760**, goods/services sub-central **£213,477**, works **£5,336,937**, light-touch services **£663,540**.
- **Utilities Contracts Regulations 2016 (UCR 2016)** — water companies, gas distribution, electricity transmission and distribution, rail and metro operators, port authorities, airports, postal services. Higher thresholds: goods/services **£426,955**, works **£5,336,937**.
- **Concession Contracts Regulations 2016 (CCR 2016)** — works and services concessions where the supplier takes operating risk. Threshold **£5,336,937**.
- **Defence and Security Public Contracts Regulations 2011 (DSPCR 2011)** — military equipment, sensitive non-military procurement, dual-use goods. MoD, DE&S, Strategic Command, and downstream Tier 1 primes file on DSPCR for above-threshold work.

The **Procurement Act 2023** (in force February 2025) reshapes this regime. It introduces six new notice types — **Pipeline Notice, Preliminary Market Engagement Notice, Tender Notice, Transparency Notice, Contract Details Notice, Contract Change Notice, Contract Termination Notice, Contract Performance Notice** — and pushes contracting authorities to publish *more*, not less. KPI reporting on contracts over £5m becomes mandatory. This Actor surfaces all the new notice types through the `notice_type` field as they roll out across the FTS catalogue.

---

### Contract Notice vs Award Notice vs PIN — the three lifecycle stages

For a B2G sales team, the timing of when a notice appears in your inbox is the difference between hitting a competitive bid or watching your incumbent extend its 7-figure contract.

1. **Prior Information Notice (PIN) / Pipeline Notice — `status="planning"`**. A pre-procurement signal. The buyer announces the procurement is coming — typical lead time 6-18 months ahead of the Contract Notice. This is where capture teams **win**: you have time to influence the requirement, register on the buyer's supplier portal, attend the supplier engagement event, position your win themes, and pre-qualify. Procurement Act 2023 makes Pipeline Notices mandatory for contracting authorities with over £100m annual spend.
2. **Contract Notice — `status="active"`**. The procurement is **open**. The buyer publishes the ITT (Invitation to Tender), the SQ (Selection Questionnaire), and the deadline. Typical tender period is 25-35 days for an open procedure under PCR 2015, often longer for complex defence or framework procurements. After this point, capture-team influence is **constrained** — the requirement is fixed and the evaluation methodology is locked.
3. **Contract Award Notice — `status="complete"`**. The decision is published. The winning supplier is named in `awarded_supplier`, the actual award value in `award.value`, and the award date in `award_date`. From this notice, your competitive-intel team can: track which suppliers are winning which buyer / CPV combinations, calculate win-rates against named primes, identify framework lots where you should have been on the panel, and time renewal-window outreach to the buyer 6-12 months before the awarded contract expires.

This Actor surfaces all three lifecycle stages through the `tender_status` field. Set `status="awarded"` to pull only completed competitions for competitive-intel back-testing, or `status="active"` for live bid pipeline, or `status="planning"` for capture-team pipeline horizon scanning.

---

### CPV codes — the procurement taxonomy

The **Common Procurement Vocabulary (CPV)** is the EU/UK statutory taxonomy used to classify procurement subject matter. Every FTS notice is tagged with one or more 8-digit CPV codes that describe what is being bought, organised in a strict hierarchy: division (first 2 digits), group (3rd digit), class (4th digit), category (5th-8th). The taxonomy has 9,454 codes covering everything from `03000000` (Agricultural, farming, fishing) to `98000000` (Other community, social and personal services).

The big divisions that matter for B2G sales:

| CPV prefix | Division | Typical buyers |
|---|---|---|
| `30` | Office and computing machinery | Every central gov department, every council |
| `48` | Software packages | Cabinet Office, GDS, HMRC, NHS Digital, DWP |
| `72` | IT services (consulting, software dev, internet services) | Every department, every NHS Trust |
| `73` | R&D services | Defence (Dstl, DSTL, DASA), UKRI, BEIS |
| `79` | Business services (management consulting, legal, audit) | Big Four shadow market, Cabinet Office GCO |
| `85` | Health and social work services | Every NHS Trust, every council adults / childrens social care |
| `45` | Construction | DfT, Network Rail, HS2, DfE schools rebuilding |
| `50` | Repair and maintenance | FM market, MoD prime contracts |
| `35` | Security, fire-fighting, police, defence equipment | MoD, DE&S, Home Office |
| `71` | Architectural, engineering, surveying | DfT, MoJ prisons estate, Homes England |

Use the `cpvCode` input as a **prefix filter** — passing `cpvCode=72` returns every notice with at least one CPV in the 72000000-72999999 range (all IT services), `cpvCode=7222` narrows to software development sub-category, `cpvCode=72222100` returns one specific code.

---

### OJEU thresholds — the above-threshold filter

Not every UK government procurement appears on FTS. Below-threshold procurements (under-OJEU spend) are covered by Contracts Finder, the parallel low-value notice service. Above the threshold, FTS publication is **mandatory**; below, it is *encouraged but optional*. The Procurement Act 2023 keeps this two-tier split but raises Contracts Finder publication obligations for spend over £30,000 across central government.

For a B2G sales team targeting **above-threshold strategic work** — frameworks, multi-million-pound transformations, prime contractor positions, sole-source DPS calls — use the `valueGbpMin` filter set to **138760** to capture above the goods/services PCR 2015 central gov threshold and screen out the small-value mini-tender noise. Set to **5336937** for works-threshold-and-above only. The `above_threshold` boolean output mirrors the OCDS `aboveThreshold` field which FTS publishes per-tender as the authoritative test.

---

### Who buys this Actor

- **B2G sales teams at IT primes, management consultancies, FM providers, construction primes, engineering consultancies, and SaaS vendors** — daily / weekly tender alerts feeding into Salesforce or HubSpot opportunity pipelines. The `searchQuery` + `buyer` + `cpvCode` combination replaces the £6,000-£20,000/year Tussell / BiP / Spend Network alerting subscriptions for teams that already have the downstream CRM. Run nightly with `status="active"` and a 1-day `dateFrom` window; pipe to Slack / email / your CRM webhook.
- **Defence and security contractors (BAE, Babcock, QinetiQ, Leonardo, Thales UK, Rolls-Royce Defence, plus the SME ecosystem)** — track DSPCR notices, MoD DE&S framework calls, Strategic Command awards, Defence Equipment & Support Tier 1 / Tier 2 subcontracting opportunities. Filter `buyer="Ministry of Defence"` or `buyer="Defence Equipment"` and watch CPV `35` for security/defence equipment, CPV `73` for defence R&D, CPV `50` for in-service support and maintenance.
- **Healthcare contractors (Cerner / Oracle Health, Epic, EMIS, TPP, System C, plus medical-device manufacturers and clinical-services providers)** — track NHS Trust IT spend, ICS commissioning, NHS England framework calls, GP federation tenders, NHS Shared Business Services frameworks. Filter `buyer="NHS"` plus CPV `48`, `72`, `33` (medical equipment), or `85`.
- **Public-sector consultancies (Deloitte, EY, KPMG, PwC, plus the boutiques — Newton Europe, Methods, Capita Consulting, BJSS, Made Tech, Difrent)** — track CPV `79` management consulting plus CPV `72` digital services framework calls. Crown Commercial Service's DOS (Digital Outcomes & Specialists) and MCF (Management Consultancy Framework) calls land here.
- **Procurement analysts, public-spend transparency researchers, and policy think tanks (Spend Network, Tussell, IfG, Reform, Onward, Institute for Public Procurement Research)** — bulk pulls for cross-government spend analysis, supplier concentration studies, and accountability journalism.
- **Investigative journalists** — The Bureau of Investigative Journalism, Tussell's published research, openDemocracy, Good Law Project, Private Eye, Tortoise Media, and the broadsheet investigations desks (FT, Guardian, Times, Telegraph). Filter on specific buyers post-scandal to surface every related award.

---

### Output schema

Each dataset row is a single OCDS release (one notice in the procurement lifecycle):

- **`tender_id`** — the FTS notice ID, format `NNNNNN-YYYY` (e.g. `046692-2026`). The same OCID can have multiple notice IDs over its lifetime as the procurement progresses through PIN → Contract Notice → Award Notice → Contract Performance Notice.
- **`ocid`** — Open Contracting ID. Stable across the whole procurement lifecycle for one tender. Use this for de-duplication when you back-fill historical data.
- **`title`** — the tender title as the buyer wrote it.
- **`buyer_name`** + **`buyer_id`** — the contracting authority. `buyer_id` is `GB-COH-NNNNNNNN` for Companies House registered bodies (NHS Foundation Trusts, executive agencies set up as cos), `GB-PPON-NNNN-NNNN` for the new Procurement Act PPON (Procurement Provider Organisation Number) identifiers, or `GB-GOR-...` for central gov departments registered against the Government Reference Number scheme.
- **`value_gbp`** + **`value_currency`** — the tender's net (ex-VAT) value in GBP. Some notices only publish gross (VAT-inclusive) values; we fall back to that field with the currency preserved separately. ~99% of FTS notices are GBP; non-GBP edge cases (notices published from Scottish / NI bodies who happened to declare a non-GBP value) return `null` on `value_gbp` and the actual currency on `value_currency`.
- **`tender_status`** — OCDS canonical status: `planning` / `active` / `complete` / `cancelled` / `unsuccessful` / `withdrawn`. The `status` input filter maps `awarded` → `complete` and `closed` → `cancelled|unsuccessful|withdrawn`.
- **`published_date`** — the release publication datetime (ISO 8601 with `+01:00` BST or `+00:00` GMT timezone).
- **`deadline_date`** — `tender.tenderPeriod.endDate`. The submission deadline for active Contract Notices. `null` for PINs and Award Notices.
- **`award_date`** — `award.date`. The date the buyer formally awarded the contract. `null` for non-award releases.
- **`awarded_supplier`** — the named winner. For framework / DPS multi-supplier awards (CCS DOS, CCS MCF, NHS Shared Business Services frameworks) we concatenate up to the first 5 supplier names with `; ` separators and append `; +N more` for the remainder.
- **`cpv_codes`** — array of CPV codes (8-digit). One notice can carry multiple codes when the procurement covers multiple subject categories.
- **`procurement_category`** — `goods` / `services` / `works` / `socialAndOtherSpecificServices`. The OCDS `mainProcurementCategory`.
- **`procurement_method`** — `open` / `selective` / `limited` / `direct`. Translates to the PCR 2015 / UCR 2016 procedure (open / restricted / competitive dialogue / competitive procedure with negotiation / innovation partnership / direct award).
- **`notice_type`** — the FTS notice type code: `UK1` (Pipeline), `UK2` (Preliminary Market Engagement), `UK3` (Tender), `UK4` (Tender — below threshold), `UK5` (Transparency), `UK6` (Contract Details), `UK7` (Contract Change), `UK8` (Contract Termination), `UK9` (Contract Performance). Plus legacy `F02` (Contract Notice), `F03` (Contract Award Notice) for pre-Procurement Act 2023 publications.
- **`above_threshold`** — boolean. The OCDS authoritative test against PCR 2015 / UCR 2016 / CCR 2016 / DSPCR 2011 thresholds.
- **`description`** — the buyer's free-text description, truncated to 1500 chars with a trailing ellipsis.
- **`full_notice_url`** — canonical Find a Tender notice URL. Open in a browser to read the full ITT / SQ / supporting documents and to access the buyer's e-procurement portal link.

---

### Sister actors (NexGenData fleet)

This Actor is the **B2G sales / procurement-intel** sibling in the NexGenData UK + APAC public-data fleet. Pair it with these actors for cross-dataset enrichment:

- **[UK Companies House Officers](https://apify.com/nexgendata/uk-companies-house-officers-actor?fpr=2ayu9b)** — pull directors / company secretaries / LLP members. Cross-reference `buyer_id` (where it's `GB-COH-...`) to identify the named directors of NHS Foundation Trusts, executive agencies, and arms-length bodies, and to track director-overlap patterns between supplier and buyer (a flag pattern for Cabinet Office GIAA / NAO accountability work).
- **[UK FCA Enforcement Register](https://apify.com/nexgendata/uk-fca-enforcement-actor?fpr=2ayu9b)** — pull FCA fines, prohibitions, and enforcement actions. Cross-reference `awarded_supplier` against the FCA enforcement list before signing a financial-services framework call. Public-sector buyers under PCR 2015 Regulation 57 are *required* to consider mandatory and discretionary exclusion grounds, and FCA enforcement findings are a Regulation 57 discretionary exclusion under "professional misconduct".
- **[UK LSE IPO Calendar](https://apify.com/nexgendata/uk-lse-ipo-actor?fpr=2ayu9b)** — pull London Stock Exchange Main Market and AIM IPO admission notices. Use to identify newly-public UK companies that have grown to government-contracting scale and can now compete for above-threshold framework lots.
- **[France Pappers Companies](https://apify.com/nexgendata/france-pappers-companies?fpr=2ayu9b)** — bulk French SIREN / SIRET company-registry lookups via Pappers. Pair with `awarded_supplier` to enrich French-domiciled UK government contract winners (Atos, Capgemini, Sopra Steria, Bouygues, Veolia, Suez, Engie subsidiaries) with French parent / beneficial-owner structure, NAF activity codes, registered share capital, and dirigeants — useful for cross-Channel supplier due-diligence and parent-subsidiary mapping on UK defence / FM / consulting frameworks.
- **[UK PSC Tracker](https://apify.com/nexgendata/uk-psc-beneficial-ownership?fpr=2ayu9b)** — pull Companies House Persons with Significant Control. Combine with `awarded_supplier` to identify the beneficial owners of UK government contract winners — useful for accountability journalism and for cross-supplier ownership-overlap analysis (e.g. private-equity-backed FM / outsourcing groups operating under multiple trading names).
- **[UK Companies House Search](https://apify.com/nexgendata/uk-companies-house-officers-actor?fpr=2ayu9b)** — bulk Companies House profile lookups. Pair with `awarded_supplier` for company-status enrichment, registered-office geocoding, and SIC-code categorisation.

---

### Pricing

Pay-Per-Event (PPE). Pricing is set on the Apify platform and is visible at the top of the Actor's listing page.

- **Actor start** — flat fee per run. Covers FTS connection setup, pagination state, and dataset I/O.
- **Tender record** — per-row charge for every UK tender notice pushed to the dataset. Filtering happens client-side after the API page is fetched: notices that don't match the searchQuery / value floor / buyer / CPV / status filters are dropped before the per-row charge, so you only pay for tenders that actually match your filter set.

The pricing tier matches the rest of the UK institutional KYC / B2G fleet (UK PSC, UK Companies House, UK FCA Enforcement). Comparable B2G procurement intel platforms charge £4,000-£20,000/year per seat (Tussell, BiP Solutions Tenders Direct, Stotles, Spend Network, Mindshare, OJEU Online). This Actor's per-tender pricing intentionally undercuts the per-seat platform cost for any team running daily / weekly bid-pipeline alerts at typical UK-government volume.

---

### Run it via Apify

Try the Apify platform free — sign up via this link and the run cost shows in your Apify console: [https://apify.com/?fpr=2ayu9b](https://apify.com/?fpr=2ayu9b)

# Actor input Schema

## `searchQuery` (type: `string`):

Free-text filter applied client-side against the tender title + description. Use to narrow a date-window pull to a domain — e.g. 'cyber security', 'electronic patient record', 'managed service desk', 'occupational health', 'drone'. Leave blank to return every notice in the date window matching the other filters.
## `dateFrom` (type: `string`):

Lower bound for notice publication date. Mapped to the OCDS API `updatedFrom` parameter. Default is 30 days before the run start. The Find a Tender service publishes ~200-400 notices per UK business day, so a 30-day window typically returns 5,000-10,000 notices before searchQuery / status / value filters.
## `dateTo` (type: `string`):

Upper bound for notice publication date. Mapped to the OCDS API `updatedTo` parameter. Default is the run start timestamp. Combine with dateFrom for back-fill (e.g. dateFrom=2024-01-01 dateTo=2024-12-31 for a full-year sweep) or leave both blank for rolling 30-day windows.
## `valueGbpMin` (type: `integer`):

Drop any tender whose net value (ex-VAT) is below this GBP threshold. Useful for filtering out below-threshold mini-tenders when chasing OJEU-threshold framework lots. Public Contracts Regulations 2015 thresholds (current 2024 rates): Goods/Services central gov GBP 138,760, Goods/Services sub-central GBP 213,477, Works GBP 5,336,937, Light-touch services GBP 663,540. Set to 138760 to capture above-threshold only. Default 0 = no filter.
## `buyer` (type: `string`):

Case-insensitive substring match against the buyer name. Examples: 'NHS', 'Ministry of Defence', 'Cabinet Office', 'Transport for London', 'Birmingham City Council', 'Crown Commercial Service', 'Network Rail'. Leave blank to return notices from every buyer.
## `cpvCode` (type: `string`):

Filter by CPV (Common Procurement Vocabulary) code — the EU/UK statutory taxonomy used to classify procurement subject matter. Accepts a prefix: '72' = IT services (everything from 72000000 to 72999999), '7222' = software development, '85' = health and social work, '45' = construction, '79' = business services. Full code list at https://simap.ted.europa.eu/cpv. Leave blank to return notices across all CPV codes.
## `status` (type: `string`):

Filter by OCDS tender.status. 'planning' = pipeline / pre-procurement notice (PIN). 'active' = open Contract Notice accepting tenders. 'awarded' = Contract Award Notice published, supplier named. 'closed' = tender period ended without award (withdrawn / cancelled). 'all' (default) returns every status.
## `maxResults` (type: `integer`):

Hard cap on dataset rows pushed (1-2000). Each tender is one row. The Find a Tender OCDS API paginates 100 notices per page; this actor follows the `links.next` cursor until maxResults is hit or no more pages remain. Set tight on broad sweeps — a 30-day NHS sweep can return 500-1500 rows.

## Actor input object example

```json
{
  "valueGbpMin": 0,
  "status": "all",
  "maxResults": 10
}
````

# 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 = {
    "searchQuery": "",
    "dateFrom": "",
    "dateTo": "",
    "valueGbpMin": 0,
    "buyer": "",
    "cpvCode": "",
    "status": "all",
    "maxResults": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("nexgendata/uk-find-a-tender").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 = {
    "searchQuery": "",
    "dateFrom": "",
    "dateTo": "",
    "valueGbpMin": 0,
    "buyer": "",
    "cpvCode": "",
    "status": "all",
    "maxResults": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("nexgendata/uk-find-a-tender").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchQuery": "",
  "dateFrom": "",
  "dateTo": "",
  "valueGbpMin": 0,
  "buyer": "",
  "cpvCode": "",
  "status": "all",
  "maxResults": 10
}' |
apify call nexgendata/uk-find-a-tender --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=nexgendata/uk-find-a-tender",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "UK Find a Tender — Government Procurement Tracker",
        "description": "UK gov tender opportunities + contract awards via the official Find a Tender OCDS API (Cabinet Office open data). Returns tender_id, title, buyer, value_gbp, status, deadline, awarded supplier, CPV codes. B2G sales intel — alt to Tussell / BiP.",
        "version": "0.0",
        "x-build-id": "bp71m4p3dVWFIwRkJ"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/nexgendata~uk-find-a-tender/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-nexgendata-uk-find-a-tender",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/nexgendata~uk-find-a-tender/runs": {
            "post": {
                "operationId": "runs-sync-nexgendata-uk-find-a-tender",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/nexgendata~uk-find-a-tender/run-sync": {
            "post": {
                "operationId": "run-sync-nexgendata-uk-find-a-tender",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "searchQuery": {
                        "title": "Search query (matched against title + description, case-insensitive)",
                        "type": "string",
                        "description": "Free-text filter applied client-side against the tender title + description. Use to narrow a date-window pull to a domain — e.g. 'cyber security', 'electronic patient record', 'managed service desk', 'occupational health', 'drone'. Leave blank to return every notice in the date window matching the other filters."
                    },
                    "dateFrom": {
                        "title": "Date from (ISO YYYY-MM-DD, inclusive)",
                        "type": "string",
                        "description": "Lower bound for notice publication date. Mapped to the OCDS API `updatedFrom` parameter. Default is 30 days before the run start. The Find a Tender service publishes ~200-400 notices per UK business day, so a 30-day window typically returns 5,000-10,000 notices before searchQuery / status / value filters."
                    },
                    "dateTo": {
                        "title": "Date to (ISO YYYY-MM-DD, inclusive)",
                        "type": "string",
                        "description": "Upper bound for notice publication date. Mapped to the OCDS API `updatedTo` parameter. Default is the run start timestamp. Combine with dateFrom for back-fill (e.g. dateFrom=2024-01-01 dateTo=2024-12-31 for a full-year sweep) or leave both blank for rolling 30-day windows."
                    },
                    "valueGbpMin": {
                        "title": "Minimum tender value (GBP, applied to tender.value.amount)",
                        "minimum": 0,
                        "maximum": 1000000000,
                        "type": "integer",
                        "description": "Drop any tender whose net value (ex-VAT) is below this GBP threshold. Useful for filtering out below-threshold mini-tenders when chasing OJEU-threshold framework lots. Public Contracts Regulations 2015 thresholds (current 2024 rates): Goods/Services central gov GBP 138,760, Goods/Services sub-central GBP 213,477, Works GBP 5,336,937, Light-touch services GBP 663,540. Set to 138760 to capture above-threshold only. Default 0 = no filter.",
                        "default": 0
                    },
                    "buyer": {
                        "title": "Buyer / contracting authority name (partial match)",
                        "type": "string",
                        "description": "Case-insensitive substring match against the buyer name. Examples: 'NHS', 'Ministry of Defence', 'Cabinet Office', 'Transport for London', 'Birmingham City Council', 'Crown Commercial Service', 'Network Rail'. Leave blank to return notices from every buyer."
                    },
                    "cpvCode": {
                        "title": "CPV code prefix (Common Procurement Vocabulary, 2-8 digits)",
                        "type": "string",
                        "description": "Filter by CPV (Common Procurement Vocabulary) code — the EU/UK statutory taxonomy used to classify procurement subject matter. Accepts a prefix: '72' = IT services (everything from 72000000 to 72999999), '7222' = software development, '85' = health and social work, '45' = construction, '79' = business services. Full code list at https://simap.ted.europa.eu/cpv. Leave blank to return notices across all CPV codes."
                    },
                    "status": {
                        "title": "Tender lifecycle status",
                        "enum": [
                            "all",
                            "planning",
                            "active",
                            "awarded",
                            "closed"
                        ],
                        "type": "string",
                        "description": "Filter by OCDS tender.status. 'planning' = pipeline / pre-procurement notice (PIN). 'active' = open Contract Notice accepting tenders. 'awarded' = Contract Award Notice published, supplier named. 'closed' = tender period ended without award (withdrawn / cancelled). 'all' (default) returns every status.",
                        "default": "all"
                    },
                    "maxResults": {
                        "title": "Max tender rows returned",
                        "minimum": 1,
                        "maximum": 2000,
                        "type": "integer",
                        "description": "Hard cap on dataset rows pushed (1-2000). Each tender is one row. The Find a Tender OCDS API paginates 100 notices per page; this actor follows the `links.next` cursor until maxResults is hit or no more pages remain. Set tight on broad sweeps — a 30-day NHS sweep can return 500-1500 rows.",
                        "default": 100
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
