# UK Find a Tender bulk notices (`kman-br/find-a-tender-uk`) Actor

Bulk UK Find a Tender notices from the official OCDS Release Packages API. No API key, Open Government Licence. Optional Companies House enrichment (company profile only: no officers, PSC or person names) with the user's own free key. Contact details are dropped.

- **URL**: https://apify.com/kman-br/find-a-tender-uk.md
- **Developed by:** [Kman](https://apify.com/kman-br) (community)
- **Categories:** Business, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 notice returneds

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 Find a Tender bulk notices — official OCDS API (Avisos em lote Find a Tender + Companies House)

Query the official **Find a Tender** OCDS Release Packages API in bulk and get sanitized **UK public procurement notices** (planning, tender, award). **No API key, Open Government Licence v3, no proxy.** Optional enrichment looks up **GB-COH** numbers on the official **Companies House Public Data API** (company profile only). Contact details are dropped.

> Independent tool. Not affiliated with the Cabinet Office, Find a Tender, Companies House, or the UK government.
>
> Source: **Find a Tender OCDS Release Packages API** (`https://www.find-tender.service.gov.uk/api/1.0/ocdsReleasePackages`), licence [Open Government Licence v3](http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/). Optional enrichment: [Companies House Public Data API](https://developer.company-information.service.gov.uk/) (user's own free key).

**Keywords:** Find a Tender, FTS, UK procurement, OCDS, contracts finder, tender notices, award notices, Companies House, GB-COH, bulk, lote, Open Government Licence, public contracts.

### How it works

- Official HTTP JSON only. No browser, no residential proxy, no login for Find a Tender.
- `GET /api/1.0/ocdsReleasePackages` with a required `updatedFrom` / `updatedTo` window. Optional `stages`: `planning`, `tender` or `award`.
- Pagination follows `links.next` (cursor). Page size is `min(100, maxItems)`. 200 ms pause between pages. Sliding window 30 requests / 60 s on Find a Tender; Companies House stays within 600 requests / 5 minutes.
- Internal deadline: 150 s from `ACTOR_STARTED_AT`, or `ACTOR_TIMEOUT_AT` minus 20 s, whichever comes first. Default run `timeoutSecs`: 180. Memory: 256 MB.
- One dataset row per unique OCDS release (`ocid` + `id`). Duplicate releases are skipped.
- Contact fields (`contactPoint`, email, telephone, fax) are never written to the output.
- Optional Companies House lookup uses **your** key. On Apify, `chApiKey` in the input is required. `CH_API_KEY` from the environment is used only when `FAT_ORIGEM=api.market`. Only the **company profile** is requested. Officers, PSC and person names are out of scope.
- Up to **500** notices per Apify run; **100** when `FAT_ORIGEM=api.market`. `FAT_ORIGEM` must be set (`apify` or `api.market`); an empty value fails, so an api.market build cannot silently inherit the Apify cap. Default `maxItems`: 100.

### Input

| Field | Type | Notes |
|---|---|---|
| `updatedFrom` | string | Required. `YYYY-MM-DDTHH:MM:SS`. Prefill: `2026-11-08T00:00:00`. |
| `updatedTo` | string | Required. `YYYY-MM-DDTHH:MM:SS`. Prefill: `2026-11-10T00:00:00`. |
| `stages` | `"planning"` | `"tender"` | `"award"` | Optional official stage filter. |
| `maxItems` | integer | Prefill 20, default 100, max 500. |
| `enrichCompaniesHouse` | boolean | Default / prefill: `false`. |
| `chApiKey` | secret string | Required on Apify when enrichment is on. `CH_API_KEY` is accepted only when `FAT_ORIGEM=api.market`. Free key: developer.company-information.service.gov.uk. |

### Output (`status: ok`)

`ocid`, `notice_id`, `date`, `tag`, tender title / status / description (email and phone masked), classification, value, buyer name, parties and suppliers, `company_numbers` (GB-COH only), optional `companies_house` profiles, plus `fonte`, `license`, `source_url`, `retrieved_at`, `warnings`, `status`. Parties and suppliers **with** a GB-COH identifier keep registered-office locality and postcode. Parties **without** one keep only **name and region**; postcode and locality are dropped because the party may be a sole trader.

`RUN_SUMMARY` records pages fetched, unique notices, charged events and enrichment counts.

### Pricing (proposed PPE — pending owner approval to publish)

| Event | When | Price |
|---|---|---|
| `inicio-run` | Once after valid input | **US$0.01** |
| `aviso-retornado` | Each `ok` notice | **US$0.003** |
| `empresa-enriquecida` | Each ok company profile attached | **US$0.003** |

Invalid input is not charged. Error items are free. Enrichment is not charged when it is off, the number is missing, or the lookup fails.

**Cost rationale:** 256 MB, HTTP-only, no proxy. 100 notices ≈ 1–2 official pages (limit 100), typically 5–15 s, worst case ~60 s → about **US$0.00083** compute (0.25 GB × 60/3600 CU × US$0.20). Revenue for 100 ok notices: US$0.01 + US$0.30 = **US$0.31**; after Apify's 20% cut ≈ **US$0.248**. Optional Companies House lookups add about US$0.0008 compute per 100 companies and US$0.003 each, still above cost. The official website already covers one-by-one search; this Actor is a capped, schedulable bulk JSON feed with contact stripping and optional company-only enrichment.

### Privacy / UK GDPR

This Actor returns **public procurement notices** and, optionally, **company** (legal-entity) profiles. It is **not** built to collect personal data. `contactPoint`, email, telephone and fax are removed from structured fields, and email and phone in `tender_description` are masked. Companies House enrichment calls only `/company/{number}` and ignores officers, PSC and person names.

**Sole traders / UK GDPR:** a party or supplier without a GB-COH (Companies House) identifier may be a sole trader. For those records the Actor keeps only **name and region** and drops **postcode and locality**, which can identify a home or small premises. Do not use this Actor to build personal dossiers, to contact individuals named in a tender, or to reconstruct a sole trader's address.

Data from Find a Tender and Companies House is reused under the Open Government Licence. You remain responsible for lawful use under UK GDPR and for keeping your own Companies House key safe. This Actor does not store your key in the dataset.

### FAQ

**Do I need a Find a Tender key?** No. The official OCDS API is public and unauthenticated.

**When do I need a Companies House key?** Only if `enrichCompaniesHouse` is true. On Apify, pass `chApiKey` in the input. The `CH_API_KEY` environment variable is used only on the api.market build (`FAT_ORIGEM=api.market`). Company data only.

**Is this a website clone?** No. The Find a Tender site already exists. This Actor is a filtered, schedulable bulk JSON feed, with a hard cap, no personal contacts, and optional company enrichment.

**How often do notices include a Companies House number?** Many parties use GB-PPON only. GB-COH appears when the publisher included it. Notices without a company number are still returned; they are just not enriched.

**Live API in CI?** `npm test` uses **fixtures** only (no network). `npm run test:live` makes one short official Find a Tender call (enrichment off) and does not save personal data.

### Tests

```bash
npm test
npm run test:live
```

***

## Avisos em lote Find a Tender — API OCDS oficial + Companies House (português)

Consulta em lote a **API oficial** de pacotes OCDS do Find a Tender (Reino Unido) e devolve **avisos de contratação pública** (planning, tender, award). **Sem chave, licença OGL v3, sem proxy.** Enriquecimento opcional consulta números **GB-COH** na **API pública do Companies House** (só perfil da empresa). Contatos pessoais são removidos.

Ferramenta independente, sem vínculo com o Cabinet Office, o Find a Tender, o Companies House ou o governo do Reino Unido. Fonte: `https://www.find-tender.service.gov.uk/api/1.0/ocdsReleasePackages`. Enriquecimento opcional: [Companies House Public Data API](https://developer.company-information.service.gov.uk/), com a chave gratuita do usuário.

### Entrada

- `updatedFrom` e `updatedTo` (obrigatórios, `YYYY-MM-DDTHH:MM:SS`; prefill `2026-11-08T00:00:00` a `2026-11-10T00:00:00`)
- `stages` opcional: `planning`, `tender` ou `award`
- `maxItems` (prefill 20, padrão 100, máximo 500)
- `enrichCompaniesHouse` (padrão `false`); na Apify, `chApiKey` é obrigatório quando o enriquecimento está ligado. `CH_API_KEY` no ambiente só vale se `FAT_ORIGEM=api.market`. `FAT_ORIGEM` vazia faz o run falhar.

### Saída

Um item por aviso OCDS único (`ocid` + `id`): título, situação, comprador, partes, awards, `company_numbers` e, se pedido, perfis do Companies House. E-mail, telefone e fax estruturados saem da resposta; e-mail e telefone em `tender_description` são mascarados. Partes e fornecedores **sem** identificador GB-COH ficam só com **nome e região** (sem postcode nem locality), porque podem ser sole traders.

### Custo proposto

`inicio-run` US$0,01 + `aviso-retornado` US$0,003 + `empresa-enriquecida` US$0,003 (somente quando o perfil da empresa é anexado com sucesso). Input inválido e itens com erro não são cobrados.

100 avisos: compute no pior caso ≈ US$0,00083; receita US$0,31; após 20% da Apify ≈ US$0,248.

### Privacidade / UK GDPR

Só avisos públicos e, se ligado, dados de **empresa**. `contactPoint`, e-mail, telefone e fax estruturados saem da resposta; e-mail e telefone em `tender_description` são mascarados. O enriquecimento chama apenas `/company/{number}` e ignora officers, PSC e nomes de pessoa. **Sole traders / UK GDPR:** parte ou fornecedor sem identificador GB-COH pode ser pessoa física (sole trader). Nesses casos o Actor mantém só **nome e região** e remove **postcode e locality**, que podem identificar um endereço residencial. Não use este Actor para montar dossiê, contatar pessoa física ou reconstruir o endereço de um sole trader. A reutilização segue a Open Government Licence; o uso lícito no UK GDPR é responsabilidade de quem executa. A chave do Companies House não entra no dataset.

### Testes

```bash
npm test
npm run test:live
```

Ainda não publicado. Publicar na Store depende de OK explícito do dono, da configuração do PPE no Console (eventos automáticos em zero) e da review de código.

# Actor input Schema

## `updatedFrom` (type: `string`):

Earliest last-updated timestamp (YYYY-MM-DDTHH:MM:SS), required.

## `updatedTo` (type: `string`):

Latest last-updated timestamp (YYYY-MM-DDTHH:MM:SS), required.

## `stages` (type: `string`):

Optional official stage filter: planning, tender or award.

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

Hard cap per run. Default 100, absolute maximum 500 on Apify (100 when FAT_ORIGEM=api.market).

## `enrichCompaniesHouse` (type: `boolean`):

If true, look up GB-COH company numbers on the official Companies House Public Data API (company profile only). On Apify, requires chApiKey. On api.market, CH_API_KEY may be set on the build.

## `chApiKey` (type: `string`):

Required on Apify when enrichCompaniesHouse is true. The CH_API_KEY environment variable is used only when FAT_ORIGEM=api.market. Free key: developer.company-information.service.gov.uk. Stored as a secret.

## Actor input object example

```json
{
  "updatedFrom": "2026-11-08T00:00:00",
  "updatedTo": "2026-11-10T00:00:00",
  "maxItems": 20,
  "enrichCompaniesHouse": false
}
```

# Actor output Schema

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

No description

## `summary` (type: `string`):

RUN_SUMMARY: status, counts, charged events.

# 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 = {
    "updatedFrom": "2026-11-08T00:00:00",
    "updatedTo": "2026-11-10T00:00:00",
    "maxItems": 20,
    "enrichCompaniesHouse": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("kman-br/find-a-tender-uk").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 = {
    "updatedFrom": "2026-11-08T00:00:00",
    "updatedTo": "2026-11-10T00:00:00",
    "maxItems": 20,
    "enrichCompaniesHouse": False,
}

# Run the Actor and wait for it to finish
run = client.actor("kman-br/find-a-tender-uk").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 '{
  "updatedFrom": "2026-11-08T00:00:00",
  "updatedTo": "2026-11-10T00:00:00",
  "maxItems": 20,
  "enrichCompaniesHouse": false
}' |
apify call kman-br/find-a-tender-uk --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kman-br/find-a-tender-uk"
        }
    }
}
```

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/6Ssbd6h18DpJ8B3Sg/builds/ZRVlZblX6UlkGleMP/openapi.json
