# TED Europa EU Tenders & Contracts Scraper (eForms API) (`autotroph/ted-eu-eforms-normalizer`) Actor

Scrape EU public procurement tenders, contract awards, multi-lot breakdowns, CPV codes, values, deadlines, buyers & winners from TED Europa without wrestling with eForms XML graphs. Built for B2B lead gen, tender tracking & AI Agents via Apify MCP.

- **URL**: https://apify.com/autotroph/ted-eu-eforms-normalizer.md
- **Developed by:** [Shuma Fujino](https://apify.com/autotroph) (community)
- **Categories:** Lead generation, Business, MCP servers
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 normalized eu 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

## TED EU Public Procurement Normalizer (eForms XML + Legacy + API v3)

Extract clean, schema-validated EU public procurement tenders, contract awards, multi-lot breakdowns, CPV codes, contract values, deadlines, buyers, and awarded winners directly from **official, zero-WAF European Union TED channels** — ready for B2B procurement intelligence, data pipelines, and **AI Agents via Apify MCP**.

### Why This Actor Beats Brittle HTML & Naive XML Scrapers

| Capability | Brittle HTML / Naive XML Scrapers | TED EU Procurement Normalizer |
|---|---|---|
| **Data Source & Reliability** | Scrapes `ted.europa.eu` frontend (frequently blocked by AWS WAF challenges; burns residential proxies) | Uses **official zero-WAF EU endpoints** (`api.ted.europa.eu/v3/notices/search` + official daily bulk XML `packages/daily/{yyyynnnnn}`) |
| **UBL 2.3 eForms Graph Resolution** | Leaks opaque IDs (`ORG-0001`, `ORG-0004`) for buyers and winners | Full **2-hop buyer** & **4-hop winner** graph resolution (`LotResult → LotTender → TenderingParty → Tenderer → Organization`) |
| **Legacy TED_EXPORT Support** | Breaks on pre-2024 notices (`F01`/`F02`/`F03`, alpha-2 countries `DE`/`GR`/`RS`) | Dual-schema parser auto-normalizes **both UBL 2.3 eForms & Legacy `TED_EXPORT`** into one unified JSON schema |
| **Framework Agreements & Multi-Lot** | Misses `<OverallMaximumFrameworkContractsAmount>` and chokes on 40+ lot notices | Resolves framework ceilings, extracts every `ProcurementProjectLot`, and scopes `<TenderSubmissionDeadlinePeriod>` cleanly |
| **Schema Integrity Verification** | Silent nulls, malformed CPVs, mixed ISO2/ISO3 codes | Deterministic per-record validator (`integrity_valid`, `integrity_errors`) verified **100% pass across 25 real multilingual notices** |
| **AI Agent / MCP Ready** | Raw nested XML blobs exceed LLM context limits (up to 700 KB/notice) | Compact, flat, typed JSON ready for Claude, Cursor, and autonomous workflows via `mcp.apify.com` |

### Two Ingestion Modes

1. **`search_api` (Default — Live Filtered Search)**: Query EU tenders & contract awards in real time by `keywords`, `countries` (ISO-3166-1 alpha-3), `cpvPrefixes`, `formTypes` (`competition`, `result`, `planning`), and publication date range.
2. **`daily_bulk_xml` (Full Multi-Lot XML Archive)**: Download an official daily OJ S package (`ojsPackageId`, e.g., `202600001` for 2026 eForms or `202200001` for Legacy `TED_EXPORT`) and emit deep multi-lot, graph-resolved JSON records at >900 notices/sec.

### Verified Output Schema Example

```json
{
  "publication_number": "845-2026",
  "publication_date": "2026-01-02",
  "schema_family": "UBL_2_3_EFORMS",
  "form_type": "result",
  "notice_type": "can-standard",
  "buyer_country_iso3": "FIN",
  "buyer_name": "Tampereen Tilapalvelut Oy",
  "all_buyers": ["Tampereen Tilapalvelut Oy"],
  "title": "Takahuhdin B koulun perusparannus ja päiväkotilaajennus",
  "cpv_codes": ["45000000", "45330000", "45331000", "45310000"],
  "lots": [
    {
      "lot_id": "LOT-0001",
      "title": "Rakennusurakka",
      "cpv_codes": ["45000000"],
      "estimated_value": null,
      "currency": null,
      "deadline_iso_date": null
    }
  ],
  "lot_count": 4,
  "value_amount": 20754761.0,
  "value_currency": "EUR",
  "deadline_iso_date": null,
  "winners": [
    "Pallas Rakennus Länsi-Suomi Oy",
    "Pallas Rakennus Kaakkois-Suomi Oy",
    "Isokouvola Oy"
  ],
  "contract_nature": "works",
  "procedure_type": "open",
  "ted_url": "https://ted.europa.eu/en/notice/-/detail/845-2026",
  "source_channel": "daily_bulk_xml",
  "integrity_valid": true,
  "integrity_errors": []
}
```

### Transparent Pay-Per-Event (PPE) Pricing

- **`apify-actor-start`**: `$0.005` per run start
- **`tender-normalized`**: `$0.004` per verified tender record (`$4.00 / 1,000 tenders`)
- **Zero proxy surcharge**: Uses official EU public endpoints only.

### Local Standalone Test (No Apify Credentials Needed)

```bash
python -m src.main --local-test --mode search_api --keywords "software" --max-items 5
```

# Actor input Schema

## `mode` (type: `string`):

Choose 'search_api' for filtered live queries via TED Search API v3, or 'daily_bulk_xml' for full multi-lot UBL 2.3 eForms / Legacy TED_EXPORT XML parsing from official EU daily packages.

## `keywords` (type: `string`):

Free-text search keywords (e.g., 'software', 'cloud infrastructure', 'solar'). Used in search_api FT query or client-side filter in daily_bulk_xml mode.

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

Optional list of 3-letter country codes (e.g., \['DEU', 'FRA', 'FIN', 'ESP', 'POL', 'NLD']). Empty = all EU/EEA countries.

## `cpvPrefixes` (type: `array`):

Optional 2-to-8 digit CPV prefixes (e.g., \['72', '48'] for IT & software services, \['45'] for construction).

## `formTypes` (type: `array`):

Filter by notice lifecycle stage: 'competition' (open tenders), 'result' (contract awards), 'planning' (prior information notices).

## `dateFrom` (type: `string`):

Inclusive start publication date for search_api mode (e.g., '2026-01-01').

## `dateTo` (type: `string`):

Optional inclusive end publication date for search_api mode (e.g., '2026-12-31').

## `customTedQuery` (type: `string`):

Optional raw TED v3 expert query string (overrides keywords/countries/dateFrom/dateTo/formTypes when non-empty).

## `ojsPackageId` (type: `string`):

9-digit Official Journal S daily package ID ({yyyynnnnn}, e.g., '202600001' for eForms or '202200001' for Legacy TED_EXPORT).

## `preferredLang` (type: `string`):

Preferred 3-letter language code when multilingual titles are available (e.g., 'eng', 'deu', 'fra', 'spa'). Falls back to notice native language.

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

Maximum number of normalized tender records to emit (1 to 10,000).

## `strictValidation` (type: `boolean`):

When true, records failing deterministic schema integrity checks are logged as warnings instead of billed/pushed to dataset.

## Actor input object example

```json
{
  "mode": "search_api",
  "keywords": "software",
  "countries": [],
  "cpvPrefixes": [],
  "formTypes": [
    "competition",
    "result"
  ],
  "dateFrom": "2026-01-01",
  "dateTo": "",
  "customTedQuery": "",
  "ojsPackageId": "202600001",
  "preferredLang": "eng",
  "maxItems": 50,
  "strictValidation": false
}
```

# Actor output Schema

## `tenders` (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("autotroph/ted-eu-eforms-normalizer").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("autotroph/ted-eu-eforms-normalizer").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 autotroph/ted-eu-eforms-normalizer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,autotroph/ted-eu-eforms-normalizer"
        }
    }
}
```

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/6eUUlNlTRaRglcVZa/builds/bhzKpKAeVuZpql5Z0/openapi.json
