# EU TED tenders monitor (`keepable_injera/eu-ted-tenders-monitor`) Actor

Monitor TED procurement notices by CPV, country, notice type, and keywords. Emit new and changed notices with persistent state.

- **URL**: https://apify.com/keepable_injera/eu-ted-tenders-monitor.md
- **Developed by:** [Chee Chiaw Lim](https://apify.com/keepable_injera) (community)
- **Categories:** Business, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 notices

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 TED tenders monitor

Collect procurement notices from the anonymous [TED Search API v3](https://api.ted.europa.eu/v3/notices/search). Filter by CPV prefix, buyer country, notice type, and keywords. Each filter list matches any entry. Different filters combine with AND.

### Run

Install with `npm install`, edit `storage/key_value_stores/default/INPUT.json`, and run `npm start`. Run offline tests with `npm test`.

The sample requests up to five notices from the last two days for Germany or France with CPV prefixes 72 or 48. Dates use UTC. The cutoff is inclusive.

### Input

| Field | Default | Meaning |
| --- | --- | --- |
| lookbackDays | 2 | Publication lookback, 1 to 365 days |
| cpvCodes | \[] | CPV prefixes, 1 to 8 digits |
| countries | \[] | ISO3 buyer-country codes such as DEU and FRA |
| noticeTypes | \[] | Exact types such as cn-standard and can-standard |
| keywords | \[] | Case-insensitive substrings in title or buyer organisation name |
| language | eng | Three-letter language code, otherwise first available language |
| onlyNew | true | Emit new and changed notices; false also emits unchanged notices |
| maxItems | 100 | Maximum emitted records, 1 to 10000 |
| stateStoreName | eu-ted-tenders-monitor-state | Persistent history for this monitor |

The API query uses `publication-date>=YYYYMMDD`, `classification-cpv IN (72000000 48000000)`, and `buyer-country IN (DEU FRA)`. CPV clauses are sent only when every supplied code has eight digits. Shorter prefixes are checked locally against the date and country result set. Notice types and keywords are also checked locally. Broad searches may reach the page cap before finding all matches.

Requests use iteration pagination with up to 250 notices per page and a hard cap of 100 pages. Requests run sequentially, at least one second apart. HTTP 429 and 5xx responses retry up to three times with exponential backoff and Retry-After. Requests time out after 30 seconds. API timeouts, malformed responses, and repeated pagination tokens fail the run and appear in RUN_SUMMARY.

### Output and history

Records contain `publicationNumber`, `title`, `buyerName`, `buyerCountry`, `cpvCodes`, `noticeType`, `publishedDate`, `deadline`, `estimatedValue`, `currency`, `placeOfPerformance`, `noticeUrl`, `pdfUrl`, `source`, `license`, `checkedAt`, `changeType`, and `changedFields`.

Countries, CPV codes, locations, and changed fields are arrays. Missing scalar values are null. Repeated codes are removed. `publishedDate` is YYYY-MM-DD. `deadline` is the earliest reported lot deadline with its original offset. Monetary values sum lot estimates when all supplied amounts are numeric and share one currency; otherwise they use total-value. Different currencies are never added or converted. Total-value can be an award value, so the output is not always a pre-award estimate.

State is a publication-number map of SHA-256 fingerprints and field snapshots under `NOTICES` in the named key-value store. Only successful charged pushes update history. `checkedAt` and change metadata do not affect fingerprints. First appearances have `changeType: "new"` and an empty changedFields array. Later differences produce `changed` and the names of differing fields. Reordered code arrays do not count as changes. Unchanged records are suppressed by default.

Use a different state store for independent filters or languages. Updates are detected only when their publication date remains inside the lookback window. A crash between a dataset push and a state write can repeat that result on restart. Each pushed record uses the PPE event `result`.

The default key-value store contains `RUN_SUMMARY`, including fetched, eligible, and pushed counts, API page count, query, totalNoticeCount, charge-limit status, errors when present, and stoppedAtPageCap when the cap ends pagination. Fetched counts include records examined before the result limit stops the run.

### Source attribution and licence

Source: TED, Publications Office of the European Union, © European Union.

Each record carries `Reuse permitted (Commission Decision 2011/833/EU); © European Union`. The [TED legal notice](https://ted.europa.eu/en/legal-notice) permits commercial and non-commercial reuse of procurement notices unless otherwise noted. Specific content may require additional rights clearance. This actor does not use TED logos and outputs buyer organisation names without contact-person fields. See [TERMS.md](TERMS.md) for the checked terms and operational requirements.

### Verification fixtures

`test/fixtures/ted-search_iter.json` and `ted-page2.json` contain real API responses saved on 2026-10-21 with trimmed titles and links. They are response-shape fixtures, not a guaranteed consecutive cursor sequence. Tests stub HTTP and use temporary local storage. For a local fixture run, preload `scripts/offline-fetch.mjs` with `node --import ./scripts/offline-fetch.mjs src/main.js` and point both `CRAWLEE_STORAGE_DIR` and `APIFY_LOCAL_STORAGE_DIR` at a temporary directory containing the sample INPUT. Network probes and the live local run were intentionally deferred to the reviewer because this workspace has no network.

# Actor input Schema

## `lookbackDays` (type: `integer`):

UTC publication-date lookback. Inclusive cutoff.

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

Match any CPV prefix containing 1 to 8 digits. Prefixes are checked locally.

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

Match any buyer country using ISO3 codes, for example DEU or FRA.

## `noticeTypes` (type: `array`):

Match any TED notice type, for example cn-standard or can-standard. Checked locally.

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

Case-insensitive substring match for any keyword in the selected title or buyer name. Checked locally.

## `language` (type: `string`):

Three-letter language code. Falls back to the first available language.

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

Emit new and changed notices. Disable to also emit unchanged notices.

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

Maximum results emitted per run.

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

Named key-value store holding publication snapshots under NOTICES. Use separate stores for independent monitors.

## Actor input object example

```json
{
  "lookbackDays": 2,
  "language": "eng",
  "onlyNew": true,
  "maxItems": 100,
  "stateStoreName": "eu-ted-tenders-monitor-state"
}
```

# Actor output Schema

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

No description

## `runSummary` (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("keepable_injera/eu-ted-tenders-monitor").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("keepable_injera/eu-ted-tenders-monitor").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 keepable_injera/eu-ted-tenders-monitor --silent --output-dataset

```

## MCP server setup

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

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/UoOUKrdmZQUXaMSxh/builds/kbd6PSu0qRZbJkf9r/openapi.json
