# UK Cleaning Contract Renewal Leads (`afkdigital/uk-cleaning-contract-renewal-leads`) Actor

Discover public UK cleaning contract award records with officially disclosed end dates, named suppliers where available, and verifiable source evidence. Does not predict new tenders.

- **URL**: https://apify.com/afkdigital/uk-cleaning-contract-renewal-leads.md
- **Developed by:** [AFK Digital](https://apify.com/afkdigital) (community)
- **Categories:** Business, Lead generation
- **Stats:** 2 total users, 1 monthly users, 91.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$80.00 / 1,000 verified cleaning contract matches

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 Cleaning Contract Renewal Leads

**UK public-sector cleaning contract intelligence for bidding and sales teams.** Search published contract awards by location, cleaning CPV, keyword, publication date, and disclosed contract end dates. Export structured lead records with verifiable evidence.

**Price: $0.08 per matching contract result.** Searches with zero matching results have no event charge. There is no charge to start a run; only delivered, deduplicated contract results are billed.

Find *published* UK public-sector cleaning awards whose **award or contract end date is explicitly disclosed**. Data comes exclusively from the [official Contracts Finder published OCDS JSON API](https://www.contractsfinder.service.gov.uk/apidocumentation/Notices/1/GET-Published-Notice-OCDS-Search). No sign-in, browser scraping, procurement bidding, protected endpoints, contact harvesting or unlicensed datasets.

**Important:** A published end date is **not** evidence that a new procurement will occur. Framework agreements may have multiple users and suppliers. Output is a research lead for manual verification, **not** a promised renewal, tender or incumbent replacement.

### Data, access and legal basis

- Official GET: `https://www.contractsfinder.service.gov.uk/Published/Notices/OCDS/Search` with documented `publishedFrom`, `publishedTo`, `stages`, `limit=100` and `cursor` parameters.
- The server returns OCDS JSON, a `links.next` cursor and the licence field **OGL v3**. The `Published/Notices/OCDS/Search` path worked without authentication from Netcup on **2026-10-13**.
- Authentication for **other** API methods, including draft notice publication, does **not** authorize using them here. Only this published GET path is called.
- OGL attribution: **Contains public sector information licensed under the Open Government Licence v3.0.** Source: Crown Commercial Service / Cabinet Office, Contracts Finder. See [OGL v3](https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/) and [GOV.UK Open Contracting](https://www.gov.uk/government/publications/open-contracting).
- Do not suggest the UK government or any public buyer endorses this product. Verify updates to licensing/API terms before changing use.

### Filters and source semantics

The published OCDS search endpoint does not expose a cleaning keyword, CPV or region server-side filter. **Those filters are applied locally** to the downloaded public releases. The input supplies `keywords` (OR of literal text phrases), `region` (literal published locality/address), `cpvCodes` (8-digit code or children), publication period, disclosed contract end window and bounded results/pages.

Defaults: publication date from 180 days ago to today; disclosed **contract end** from today through 365 days ahead; at most **50** results; at most **20** pages of 100 records with **1.5 seconds** between pages. Choose narrower publication windows or raise `maxPages` for fuller coverage. The run report flags `truncated=true` if a next page exists when scanning stops.

The match engine requires published cleaning-service CPV evidence (`9090`, `9091`, `9092` or street cleaning `9061`) **or** conservative physical cleaning-service text. Supply-only cleaning products and data-cleaning services are rejected when not supported by service classification. Supplied keywords and CPV filters must additionally match. User keywords are **literal strings**, never regex.

For the end date, the Actor only accepts `contracts[].period.endDate` or `awards[].contractPeriod.endDate` from an awarded/implementation record. **Never** take a projected `tender.contractPeriod.endDate` as an executed contract end. If the former is absent, the row is excluded, not guessed.

Region is based on `tender.items[].deliveryAddresses` where possible; otherwise an expressly labelled buyer-office address is used. A postcode-only location will not be automatically converted to a geographic region. The declared supplier must appear in the selected award/contract, and the contract value must appear in `contract.value` or `award.value`. Tender budgets are **not** displayed as awarded contract values. Missing supplier, value or currency remains `null`.

### Input & output examples

- Example input: [examples/input.json](examples/input.json).
- Historical reproducible integration input: [examples/historical-smoke-input.json](examples/historical-smoke-input.json).
- Source-derived sample output is generated by `npm run smoke` into [examples/observed-output.json](examples/observed-output.json). This is genuine historical data, not invented or promised fresh leads.
- Primary output: default Apify dataset with `noticeId`, `releaseId`, `ocid`, `contractId`, buyer, service description, source-disclosed supplier, value/currency, award/publication/contract/closing dates, location and its source, notice URL, contract record URL and `matchEvidence`.
- Audit output: default key-value store `RUN_REPORT` with source status, pages/releases scanned, duplicate count, partial-scan status and per-source errors. These audit records are not charged.
- Source dataset is historical. Availability, publication gaps, frameworks and amendments can make prospective leads incomplete; users must independently verify each notice.

### Stability and failure behavior

The Actor calls only the fixed official HTTPS endpoint and validated `links.next` URLs on the **same host and path**. It reads no private account information, uses no proxy and does not crawl a website. A maximum of 100 records/page and at least 1 second between requests are enforced. HTTP **403/429** stops requests immediately with a minimum **five-minute** no-retry instruction. HTTP 401, invalid schema, changed licence or unexpected paging host stops the run for manual review. It does **not** bypass blocks. Any source failure occurs **before** delivery/charging. An empty search generates **zero billable events**.

Revisions/duplicate releases are deduplicated in a single execution using `ocid::contractId`, preferring the most recently published version. The run's result cap applies **after** filtering and deduplication; `maxPages` caps cost and may make a scan incomplete.

### Price and billing (pay-per-event)

The Actor uses one custom pay-per-event event for a verified cleaning contract match. No extra start or dataset item event is charged. Platform compute costs are included in the event price (not added separately).

| Event | Trigger | Price | Charge on errors / no results? |
| --- | --- | --- | --- |
| `cleaning-contract` | One unique, qualified cleaning contract dataset row in this run | **USD $0.08 per record** | **No** |

The **only configured event** is `cleaning-contract` (the primary event). Synthetic start and default dataset-item events are absent. The Actor bills only after public-source collection, cleaning-service classification, disclosed-end-date checking and in-run deduplication. The per-run spend cap is enforced by Apify.

**Repeat billing across runs:** Deduplication is **within each run only**. If a user repeats the same input in a **separate** run, matching contracts are delivered and **charged again**. Apify's SDK idempotency keys primarily protect short-term retries, not permanent cross-run billing (currently documented as a 3-minute horizon). Persistent account-level deduplication is not implemented; do not market this Actor as globally deduplicated.

Billing uses Apify's pay-per-event system. The price is shown before a run. All amounts in published contracts are passed through from the official record; this Actor does not calculate, verify, or guarantee procurement value.

### Developer commands

```bash
cd /opt/APIFY/API21
npm ci --omit=dev
npm test
npm run smoke
```

`npm run smoke` downloads historical **published** OCDS JSON and writes `reports/live-smoke.json` and `examples/observed-output.json`; it does not invoke the Actor and **cannot bill**. The default Actor command is `npm start`, reading Apify input storage.

### Live verification snapshot

2026-10-13: the Netcup server received HTTP 200 JSON without sign-in. An 8-page / 800-release historical scan of May 2025 found one unique published cleaning contract with a disclosed end date. This is a **partial scan** (not proof that only one matching contract exists). See `reports/live-smoke.json` for exact filters, metrics and source-linked sample.

### Support and caveats

This Actor reads public UK Contracts Finder OCDS data; it is **not affiliated with or endorsed by the UK Government or Contracts Finder**. Notice data may contain amendments, missing fields, awards under frameworks, or outdated end dates. Scan-page limits and source publication gaps can omit relevant contracts. Do not infer automatic re-tendering from an end date. Always review the original notice before preparing a bid or contacting a public buyer.

# Actor input Schema

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

Optional literal phrases in the title or description. Cleaning-service evidence is always required.

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

Optional location substring. Buyer-address fallback is clearly flagged.

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

Inclusive date; default 180 days ago.

## `publishedTo` (type: `string`):

Inclusive date; default today.

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

Optional eight-digit CPV codes, e.g. 90910000. Child codes included.

## `contractEndFrom` (type: `string`):

YYYY-MM-DD, inclusive. Defaults today; absent end dates excluded.

## `contractEndTo` (type: `string`):

YYYY-MM-DD, inclusive. Defaults one year ahead.

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

Only matching, deduplicated published contracts are billable.

## `maxPages` (type: `integer`):

100 releases per page; truncated scanning is reported.

## `pageDelayMs` (type: `integer`):

Polite API access; stop immediately on 403 or 429.

## Actor input object example

```json
{
  "keywords": [],
  "cpvCodes": [],
  "maxResults": 50,
  "maxPages": 20,
  "pageDelayMs": 1500
}
```

# Actor output Schema

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

Only deduplicated published cleaning awards/contracts with disclosed contract end dates.

## `runReport` (type: `string`):

Filter range, page counts, truncation, and source errors (never billed).

# 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("afkdigital/uk-cleaning-contract-renewal-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("afkdigital/uk-cleaning-contract-renewal-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 '{}' |
apify call afkdigital/uk-cleaning-contract-renewal-leads --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,afkdigital/uk-cleaning-contract-renewal-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/bATzXMb0ah4Yl90NM/builds/LhfgggnUNRqiqpLYv/openapi.json
