# Government Tenders Scraper — EU / TED (`masked_hacker/government-tenders-scraper`) Actor

Scrape EU public-procurement tenders from the official TED API into normalized, country-agnostic rows: title, buyer, CPV, value, deadline and document links.

- **URL**: https://apify.com/masked\_hacker/government-tenders-scraper.md
- **Developed by:** [Masked Hacker](https://apify.com/masked_hacker) (community)
- **Categories:** Lead generation
- **Stats:** 2 total users, 0 monthly users, 0.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 tenders

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## Government Tenders Scraper: EU / TED

Pull **EU public-procurement tenders** straight from the official **TED (Tenders Electronic Daily)
API** into one clean, normalized dataset: one row per notice, with buyer, CPV category, value,
deadline and document links. Filter by **CPV category, country and publication date**, or pass a
raw TED expert query for full control.

No API key, no login, no anti-bot. TED is an open government API.

### What you get

- 🇪🇺 **EU-wide coverage:** every notice in TED, ~130k+ per CPV category.
- 🏷️ **Filter by CPV, country and date:** or a raw expert query for anything else.
- 🧾 **Normalized rows:** title, buyer, description, CPV, value, deadline, document links.
- 🌍 **Country-agnostic schema:** the same shape other portals can plug into later.
- 🔑 **No API key or login required.**
- 📄 Clean JSON / CSV / Excel export.

### Input

| Field | Type | Description |
|---|---|---|
| `searchQuery` | string | Optional raw TED expert-query clause, AND-ed with the filters below. |
| `cpvCodes` | string\[] | CPV category codes; any one matches (e.g. `72000000` for IT services). |
| `countries` | string\[] | Buyer countries as ISO-3 codes; any one matches (e.g. `ESP`, `FRA`). |
| `dateFrom` | string | Only notices published on/after this date, `YYYYMMDD`. |
| `dateTo` | string | Only notices published on/before this date, `YYYYMMDD`. |
| `maxItems` | integer | Stop after collecting this many rows. Default 200. |
| `proxyConfiguration` | object | Optional. Not needed. TED is an open API. |

At least one of `searchQuery`, `cpvCodes`, `countries`, `dateFrom`, or `dateTo` is required.

#### Example input

```json
{
    "cpvCodes": ["72000000"],
    "countries": ["ESP", "FRA"],
    "dateFrom": "20240101",
    "maxItems": 500
}
```

### Output

Each row: `publicationNumber`, `noticeType`, `title`, `buyerName`, `description`, `cpv`, `value`,
`currency`, `publishDate`, `deadlineDate`, `sourceCountry`, `noticeUrl`, `documentLinks`,
`sourcePortal`, `query`, `scrapedAt`.

Multilingual TED fields (title, buyer, description) are resolved to English where present, else the
first available language.

### Notes

- Pagination uses TED's page-number mode; very deep result sets (beyond ~10k) are best narrowed
  with tighter filters.
- `value` / `deadlineDate` are populated only when the notice publishes them (award and some
  modification notices omit them).

# Actor input Schema

## `searchQuery` (type: `string`):

Optional raw TED expert-query clause, AND-ed with the filters below (e.g. "notice-title~"software"").

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

CPV category codes to match (any one matches), e.g. "72000000" for IT services.

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

Buyer countries as ISO-3 codes (any one matches), e.g. "ESP", "FRA", "DEU".

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

Only notices published on/after this date, format YYYYMMDD.

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

Only notices published on/before this date, format YYYYMMDD.

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

Stop after collecting this many tender rows.

## `proxyConfiguration` (type: `object`):

Optional. TED is an open API and needs no proxy; leave empty unless your network requires one.

## Actor input object example

```json
{
  "cpvCodes": [
    "72000000"
  ],
  "countries": [
    "ESP",
    "FRA"
  ],
  "maxItems": 200
}
```

# Actor output Schema

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

All scraped tender rows 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("masked_hacker/government-tenders-scraper").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("masked_hacker/government-tenders-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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 masked_hacker/government-tenders-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=masked_hacker/government-tenders-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/2oelvc7HttpyzJSE3/builds/ShA7svzf2FspEr2bY/openapi.json
