# EU Contract Award Notices (TED) and Tenders (`hopeful_crabgrass/ted-eu-awards`) Actor

EU contract award notices (default) plus optional TED tenders, from the free TED Search API v3, as one flat row per notice. Optional onlyNew stores seen publication numbers so a scheduled run skips already-returned notices. This Actor adds pagination, flattening, filters, and normalized fields.

- **URL**: https://apify.com/hopeful_crabgrass/ted-eu-awards.md
- **Developed by:** [Juan Marcos](https://apify.com/hopeful_crabgrass) (community)
- **Categories:** Business, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.00005 / actor start

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 Contract Award Notices (TED) and Tenders

A pay-per-event Apify Actor that returns EU contract award notices from the official TED Search API v3 as one flat row per notice (default `noticeKind` is `award`, TED type `can-standard`). A second mode (`noticeKind` = `tender`) returns open contract notices (`cn-standard`).

### What it does

It calls the documented, anonymous Search API at `https://api.ted.europa.eu/v3/notices/search`, pages with ITERATION, flattens nested multilingual and per-lot JSON, and applies CPV, buyer-country, and date filters. Optional `onlyNew` stores seen publication numbers (identifiers only) in a named key-value store (`ted-seen-publication-numbers`) so a scheduled run is not re-billed for notices already returned.

The underlying notices are free from TED. The TED Search API v3 needs no key. This Actor adds pagination and ITERATION handling, flattening into one row per notice, CPV/country/date filters, optional `onlyNew` delta state for scheduled runs, normalized award fields (dates as `YYYY-MM-DD`, unique CPV codes, and sentinel or list-shaped currency/date values normalized), consistent error handling, and a flat dataset of those rows (JSON items; the Apify platform can export the dataset as JSON or CSV). It does not parse or fetch `ted.europa.eu` or `www.ted.europa.eu` HTML pages (those hosts use an AWS WAF challenge). Notice links may be returned; they are never requested.

Winner names are **off by default** (`includeWinnerNames` defaults to `false` in the input schema). Even when enabled, a name the documented heuristic treats as a natural person is blanked. The heuristic is Unicode-aware (accented Latin, Greek, and Cyrillic letters count as word characters). Residual: unusual punctuation, single-token names, or sole traders can still be kept or blanked incorrectly.

No contact, email, phone, fax, website, jury, or participant fields are requested or output. Notice values are not altered or currency-converted. This is not an official EU product. Not endorsed by the EU. Only the Official Journal S is authentic. Editorial content is CC BY 4.0 and system metadata is CC0. Do not use the TED logo. Every output row includes this attribution: `Source: TED, (c) European Union, Decision 2011/833/EU, CC BY 4.0`.

If a TED search response is marked `timedOut`, the run fails rather than treating a partial page as complete. Pagination is also bounded by an internal max-pages guard.

### Input

| Field | Default | Description |
| --- | --- | --- |
| `noticeKind` | `award` | `award` (can-standard) or `tender` (cn-standard) |
| `cpvPrefixes` | `[]` | Optional CPV codes or prefixes |
| `buyerCountries` | `[]` | Optional ISO-3 buyer country codes |
| `sinceDays` | `7` | Used when `publishedFrom`/`publishedTo` are empty (max 365) |
| `publishedFrom` / `publishedTo` | empty | Inclusive YYYY-MM-DD window |
| `minValue` | `0` | Minimum total or lot value in the **notice's own currency** (no FX conversion) |
| `maxResults` | `100` | Hard cap, maximum 1,000. There is no unlimited mode. |
| `onlyNew` | `false` | Skip already-seen publication numbers using the named store above |
| `includeWinnerNames` | `false` | Include winner organisation names, subject to the person-name heuristic |

Invalid dates, country codes, or caps are rejected with a clear error. Empty but defaultable input is accepted (defaults apply). Oversized `maxResults` is rejected.

### Output example

Example flattened from a live award notice (winner names off). Dates are stored as `YYYY-MM-DD`, CPV codes are unique, and sentinel or list-shaped currency/date values are normalized.

```json
{
    "noticeId": "775147-2026",
    "noticeType": "can-standard",
    "publishedOn": "2026-11-09",
    "buyerName": "Univerzitetna klinika za pljučne bolezni in alergijo Golnik",
    "buyerCountry": "SVN",
    "cpvCodes": ["33690000"],
    "title": "Slovenia – Various medicinal products – SUKCESIVNA DOBAVA ZDRAVIL – ZDR26-A5",
    "lots": [{"lotId": "LOT-0000", "winners": [], "value": 1235806.15, "currency": "EUR"}],
    "totalValue": 1235806.15,
    "totalValueCurrency": "EUR",
    "concludedOn": "2026-09-17",
    "tedUrl": "https://ted.europa.eu/en/notice/-/detail/775147-2026",
    "attribution": "Source: TED, (c) European Union, Decision 2011/833/EU, CC BY 4.0"
}
```

Every row includes the attribution: `Source: TED, (c) European Union, Decision 2011/833/EU, CC BY 4.0`.

### Pricing

Pay-per-event. The primary event is `notice-result` at **$0.004** per notice row actually pushed. The platform also bills a synthetic `apify-actor-start` event automatically; this Actor does not call `Actor.charge()` for that event. If the user sets a maximum total charge, the Actor stops when a charge is refused or the remaining budget cannot cover another result. Uncharged rows are not written.

### Support

Contact via the Apify Store Issues tab.

# Actor input Schema

## `noticeKind` (type: `string`):

award = contract award notices (can-standard). tender = contract notices (cn-standard).

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

Optional CPV codes or prefixes to include.

## `buyerCountries` (type: `array`):

Optional ISO-3 buyer country codes, for example POL or DEU.

## `sinceDays` (type: `integer`):

Used when publishedFrom/publishedTo are not set. Default 7, maximum 365.

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

Inclusive start date (YYYY-MM-DD). Use with publishedTo, or leave blank to use sinceDays.

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

Inclusive end date (YYYY-MM-DD).

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

Optional minimum total or lot value in the notice's own currency (no conversion).

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

Hard cap on notice rows returned. Default 100, maximum 1000.

## `onlyNew` (type: `boolean`):

If true, skip publication-number values already stored in this Actor's key-value store.

## `includeWinnerNames` (type: `boolean`):

Default off. When on, winner organisation names are included unless the documented heuristic flags a natural person.

## Actor input object example

```json
{
  "noticeKind": "award",
  "cpvPrefixes": [],
  "buyerCountries": [],
  "sinceDays": 7,
  "publishedFrom": "",
  "publishedTo": "",
  "minValue": 0,
  "maxResults": 5,
  "onlyNew": false,
  "includeWinnerNames": false
}
```

# 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 = {
    "noticeKind": "award",
    "sinceDays": 7,
    "maxResults": 5,
    "includeWinnerNames": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("hopeful_crabgrass/ted-eu-awards").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 = {
    "noticeKind": "award",
    "sinceDays": 7,
    "maxResults": 5,
    "includeWinnerNames": False,
}

# Run the Actor and wait for it to finish
run = client.actor("hopeful_crabgrass/ted-eu-awards").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 '{
  "noticeKind": "award",
  "sinceDays": 7,
  "maxResults": 5,
  "includeWinnerNames": false
}' |
apify call hopeful_crabgrass/ted-eu-awards --silent --output-dataset

```

## MCP server setup

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

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/piPjDlNQtgP44wSSl/builds/gmz9ZndudLqt9twMd/openapi.json
