# UK Gov Tenders & Buyer Emails Scraper (`ttyan0111/uk-gov-tenders-buyer-leads`) Actor

Zero-proxy UK Contracts Finder OCDS scraper for public sector tenders, planning notices & contract awards. Extracts GBP contract values, deadlines, CPV codes, buyer contact names, direct .gov.uk/NHS procurement emails, awarded suppliers, agentSummary, and RUN_SUMMARY for AI agents.

- **URL**: https://apify.com/ttyan0111/uk-gov-tenders-buyer-leads.md
- **Developed by:** [Truong Truong Giang](https://apify.com/ttyan0111) (community)
- **Categories:** Lead generation, Agents
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 uk tender or contract award scrapeds

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/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 Gov Tenders & Buyer Emails Scraper

Fast **zero-proxy UK public sector procurement & B2B lead scraper** powered by the official **UK Contracts Finder Open Contracting Data Standard (OCDS)** endpoints (`contractsfinder.service.gov.uk`). Built for **B2B sales teams, IT/SaaS consultancies, government bid managers, SME suppliers, and AI agents (via Apify MCP Server)**.

### Key Capabilities

1. **Direct UK Public Sector Buyer Emails:** Extracts named procurement officers (`contactName`), direct `.gov.uk`, NHS, university (`.ac.uk`), police, and local council emails (`contactEmail`), phone numbers (`contactTelephone`), postcodes (`postalCode`), and buyer websites (`buyerWebsite`) from OCDS `parties[]`.
2. **Full OCDS Financial & Deadline Intelligence:** Captures `ocid`, `stage` (`tender`, `award`, `planning`), `valueGBP`, `minValueGBP`, `awardedValueGBP`, `deadlineDate`, `contractStartDate`, `contractEndDate`, `cpvCode`, `cpvDescription`, `suitableForSME`, and `suitableForVCSE`.
3. **Contract Awards & Competitor Supplier Tracking:** Extracts `awardedSuppliers` (including SME flags and addresses) and `awardedSuppliersText` on awarded notices so agencies can spot incumbent renewals, framework winners, and subcontracting partners.
4. **Dual-Engine Speed (`$0` Proxy Cost, `256 MB` RAM):** Uses the bulk OCDS Release Search feed when browsing latest UK notices and pairs Contracts Finder REST v2 keyword search with parallel per-notice OCDS release resolution when filtering by `keywords`.
5. **AI Agent & MCP Ready:** Includes a compact 1-line `agentSummary` on every dataset item (budget, deadline, buyer org, and direct email) plus an executive `RUN_SUMMARY` JSON record in the Key-Value Store (`totalScraped`, `emailsFoundCount`, `directBuyerEmails`, `totalValueGBP`, `byStage`, `topTenders`).

### Input Parameters

| Parameter | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `keywords` | `string[]` | `[]` | Search terms (e.g. `["software", "cloud"]`), or empty `[]` for latest UK tenders |
| `stages` | `string[]` | `["tender", "award"]` | Stages to include: `tender`, `award`, `planning` |
| `minValueGBP` | `integer` | `0` | Minimum contract value in GBP (`0` keeps all notices) |
| `region` | `string` | `""` | Optional UK region or locality filter (e.g. `"London"`, `"South East"`) |
| `onlyWithEmail` | `boolean` | `false` | Export only notices with a verified buyer email address |
| `maxItems` | `integer` | `25` | Maximum unique notices to return (`1–200`, prefill `20`) |
| `publishedFrom` | `string` | `""` | Optional earliest publication date (`YYYY-MM-DD`) |

### Pricing

Pay-per-Event (`PAY_PER_EVENT`): `actor-start`, `tender-scraped`, and `buyer-email-enriched` (charged only when a verified direct buyer email is returned).

# Actor input Schema

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

Search terms (e.g. 'software', 'cloud', 'cyber security', 'cleaning', 'training'). Leave empty \[] to fetch the latest UK public sector notices directly from the OCDS feed.

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

OCDS procurement stages to include: 'tender' (open opportunities), 'award' (awarded contracts & winning suppliers), 'planning' (early market engagement / future pipeline).

## `minValueGBP` (type: `integer`):

Keep only notices with estimated or awarded value >= this GBP amount. Set to 0 to include all notices (including undisclosed budgets).

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

Optional case-insensitive UK region, nation, or locality filter (e.g. 'London', 'South East', 'North West', 'Scotland', 'Manchester'). Leave empty for all UK regions.

## `onlyWithEmail` (type: `boolean`):

When enabled, exports only notices that contain a verified buyer contact email address (e.g. procurement@council.gov.uk, @nhs.net).

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

Maximum number of unique deduplicated notices to return (1–200).

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

Optional earliest publication date filter in YYYY-MM-DD format (e.g. '2026-01-01'). Leave empty for automatic recency prioritization.

## Actor input object example

```json
{
  "keywords": [
    "software",
    "cloud"
  ],
  "stages": [
    "tender",
    "award"
  ],
  "minValueGBP": 0,
  "region": "",
  "onlyWithEmail": false,
  "maxItems": 20,
  "publishedFrom": ""
}
```

# Actor output Schema

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

Structured UK Contracts Finder OCDS tenders, planning notices, and contract awards with GBP values, deadlines, direct buyer emails, CPV classifications, awarded suppliers, and agentSummary.

## `runSummary` (type: `string`):

Aggregate UK procurement intelligence summary in Key-Value Store (totalScraped, emailsFoundCount, directBuyerEmails, totalValueGBP, byStage, and topTenders).

# 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": [
        "software",
        "cloud"
    ],
    "stages": [
        "tender",
        "award"
    ],
    "minValueGBP": 0,
    "region": "",
    "maxItems": 20,
    "publishedFrom": ""
};

// Run the Actor and wait for it to finish
const run = await client.actor("ttyan0111/uk-gov-tenders-buyer-leads").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": [
        "software",
        "cloud",
    ],
    "stages": [
        "tender",
        "award",
    ],
    "minValueGBP": 0,
    "region": "",
    "maxItems": 20,
    "publishedFrom": "",
}

# Run the Actor and wait for it to finish
run = client.actor("ttyan0111/uk-gov-tenders-buyer-leads").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": [
    "software",
    "cloud"
  ],
  "stages": [
    "tender",
    "award"
  ],
  "minValueGBP": 0,
  "region": "",
  "maxItems": 20,
  "publishedFrom": ""
}' |
apify call ttyan0111/uk-gov-tenders-buyer-leads --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ttyan0111/uk-gov-tenders-buyer-leads"
        }
    }
}
```

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/DzbTiN1nN4Ab1Yhki/builds/0g6dlYVhqml1PiRCk/openapi.json
