# EU + UK Public Tender Alerts (TED + Contracts Finder) (`m8forever/eu-uk-tender-alerts`) Actor

New/changed public tenders from TED Search API v3 and UK Contracts Finder OCDS. Official open data, no API key.

- **URL**: https://apify.com/m8forever/eu-uk-tender-alerts.md
- **Developed by:** [Hanxiao Yang](https://apify.com/m8forever) (community)
- **Categories:** Business, Lead generation, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.30 / 1,000 eu/uk 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/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

## EU + UK Public Tender Alerts (TED + Contracts Finder)

Sister of `sam-opportunities-actor` (same output contract: `noticeId`, `summary`, `changeType` new/changed + `changedFields`/`previous`, KV-state change detection). Sources: official TED Search API v3 and UK Contracts Finder OCDS API, no keys needed.

### Input

| field | default | |
|---|---|---|
| `sources` | \["TED","ContractsFinder"] | |
| `postedWithinDays` | 2 | |
| `tedCountries` | – | ISO3, e.g. \["DEU","FRA"] |
| `cpvCodes` | – | prefixes, e.g. \["72","48"] (IT); applied to both sources |
| `keywords`, `minValue`, `smeOnly`, `minDaysUntilDeadline` | – | client-side filters |
| `languages` | \["eng"] | TED title/buyer language preference |
| `tedExpertQuery` | – | raw TED expert query overrides builder |
| `cfStages` | tender | planning,tender,award |
| `onlyNewOrChanged` | true | |
| `stateStoreName` | eu-uk-tenders-state | one per saved search |

TED default notice types: contract notices + PIN calls for competition (open opportunities only).

### Live run (2026-10-11, Sunday, local Apify mode)

2-day window, deadline ≥7 days: 693 notices (TED 681, Contracts Finder 12, low because of the weekend) in ~4 s; 2nd run: 0 changes. Sample: `sample_output.json`.

### Limits / unverified

- Contracts Finder notice URL pattern `/Notice/<GUID>` derived from OCDS release id; site is bot-protected (403 to curl), not browser-verified.
- TED `estimatedValue` = sum of lot estimates; many notices have none.
- UK Find a Tender service (above-threshold) not yet included; next candidate (also OGL).
- Docker build not verified locally.

### Dev

`python -m pytest tests` (6 tests, real fixtures fetched 2026-10-08/10).

### Buyer field notes

TED `buyer` comes from search-index fields `organisation-name-buyer` (preferred) then `buyer-name`, with language picked by buyer country when possible. Titles mentioning a place (e.g. Strasbourg) are not always the contracting authority — verify on the TED notice page. `buyerCity` is included when the index provides it.

# Actor input Schema

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

Sources

## `postedWithinDays` (type: `integer`):

Posted within last N days

## `maxRecords` (type: `integer`):

Max records per source

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

CPV codes

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

Keywords

## `minValue` (type: `number`):

Min estimated value

## `minDaysUntilDeadline` (type: `integer`):

Min days until deadline

## `smeOnly` (type: `boolean`):

SME suitable only

## `languages` (type: `array`):

Preferred languages for summary

## `onlyNewOrChanged` (type: `boolean`):

Only new or changed

## `stateStoreName` (type: `string`):

State store name

## Actor input object example

```json
{
  "sources": [
    "TED",
    "ContractsFinder"
  ],
  "postedWithinDays": 2,
  "maxRecords": 100,
  "smeOnly": false,
  "languages": [
    "eng"
  ],
  "onlyNewOrChanged": true,
  "stateStoreName": "eu-uk-tenders-state"
}
```

# Actor output Schema

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

No description

# 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("m8forever/eu-uk-tender-alerts").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("m8forever/eu-uk-tender-alerts").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 m8forever/eu-uk-tender-alerts --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,m8forever/eu-uk-tender-alerts"
        }
    }
}
```

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/Nbc2R6nvGGY5X0gc7/builds/yqkRLWysfyBOe3BYU/openapi.json
