# EU Tender Aggregator (TED) — CPV & Country Filtered (`preservable_mocha/eu-tender-aggregator`) Actor

Official EU public procurement notices (TED) as clean, unified JSON. Filter by CPV code, country and date. Keyless official open data.

- **URL**: https://apify.com/preservable\_mocha/eu-tender-aggregator.md
- **Developed by:** [Onur Hadzhaoglu](https://apify.com/preservable_mocha) (community)
- **Categories:** Business, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

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 web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## EU Tender Aggregator (TED) — CPV & Country Filtered

Turn the EU's official public-procurement feed into **clean, unified JSON** you can
actually use. This actor queries **TED (Tenders Electronic Daily)** — the official
EU procurement journal — and returns notices filtered by **CPV code, country and
publication date**, newest first, in one consistent schema.

No API key, no scraping tricks, no personal data — TED's search API is official,
public and keyless. This actor adds the part TED doesn't: **normalization**. TED's
raw response is deeply nested and multi-lingual; this actor flattens each notice to
a single, predictable record.

### What you get — one record per notice

```json
{
  "noticeNumber": "557198-2026",
  "title": "Netherlands – Catering services – Event Catering",
  "buyerName": "Gemeente Den Haag",
  "country": "NLD",
  "cpv": "55520000",
  "noticeType": "can-standard",
  "publicationDate": "2026-08-12",
  "deadlineDate": null,
  "totalValue": 1200000,
  "tenderUrl": "https://ted.europa.eu/en/notice/-/detail/557198-2026",
  "source": "TED"
}
```

### Input

| Field | Type | Example | Meaning |
|-------|------|---------|---------|
| `cpvCodes` | list | `["55000000"]` | CPV sector codes (e.g. 55 = catering/hospitality). Empty = all sectors. |
| `countries` | list | `["NLD","DEU"]` | Buyer country, ISO alpha-3. Empty = all EU. |
| `publishedAfter` | string | `"20260101"` | Only notices on/after this date (YYYYMMDD). |
| `maxResults` | int | `50` | Max notices, newest first (1–250). |

### Who this is for

- **Bid / tender managers** tracking new opportunities in a sector.
- **Exporters** (e.g. Turkish or non-EU suppliers) watching EU tenders by CPV.
- **GovTech / consultancies** that need procurement data in a clean schema.
- **Catering / facility / construction** firms watching their CPV vertical.

### Why not just use TED directly?

TED's raw API returns nested, multi-lingual objects (24 languages per title, link
maps per format). This actor picks the right language, flattens the structure, and
gives you a stable schema that drops straight into a spreadsheet, CRM or database.

### Pricing (pay-per-event)

Billed per returned notice (`result` event). Suggested price point ~$2–4 per 1,000
records — set in the Apify Console when publishing.

### Roadmap

- `sources/ekap.py` — Turkey (EKAP) adapter
- `sources/tenderned.py` — Netherlands (TenderNed) adapter
- Company enrichment join (buyer → registry data)

### Legal

Uses only **official, public, already-published** procurement notices from TED's
open API. No login-gated data, no personal data, no ToS circumvention.

***

### Developer notes (running & testing)

The fetch + normalize core is in `src/ted_source.py` and has **no dependency on the
Apify SDK** — you can prove it works standalone:

```bash
python -m src.ted_source
## → prints the query, total matching count, and the first normalized records
```

The actor wrapper (`src/main.py`) adds Apify input handling, dataset push and
per-event charging. To run as an actor locally you need the Apify CLI + login:

```bash
apify run
```

To publish:

```bash
apify push
```

# Actor input Schema

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

EU Common Procurement Vocabulary codes to filter by (e.g. 55000000 = hotel, restaurant and retail trade services / catering). Leave empty for all sectors.

## `countries` (type: `array`):

Filter by the buyer's country as ISO 3166-1 alpha-3 codes, e.g. NLD, DEU, FRA, BEL. Leave empty for all EU.

## `publishedAfter` (type: `string`):

Only return notices published on or after this date, e.g. 20260101. Leave empty for no lower bound.

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

Maximum number of notices to return (1-250), newest first.

## Actor input object example

```json
{
  "cpvCodes": [
    "55000000"
  ],
  "countries": [
    "NLD"
  ],
  "maxResults": 50
}
```

# Actor output Schema

## `tenders` (type: `string`):

All matched procurement notices as JSON items in the default dataset.

# 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 = {
    "cpvCodes": [
        "55000000"
    ],
    "countries": [
        "NLD"
    ],
    "maxResults": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("preservable_mocha/eu-tender-aggregator").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 = {
    "cpvCodes": ["55000000"],
    "countries": ["NLD"],
    "maxResults": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("preservable_mocha/eu-tender-aggregator").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 '{
  "cpvCodes": [
    "55000000"
  ],
  "countries": [
    "NLD"
  ],
  "maxResults": 50
}' |
apify call preservable_mocha/eu-tender-aggregator --silent --output-dataset

```

## MCP server setup

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

```

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/GcNk7syFJUB4CKMQs/builds/81WcL7JYZZwbwpJOM/openapi.json
