# Government Tenders Scraper - EU TED, USAspending, UK (`bachiembmt/government-tenders-contracts-scraper`) Actor

Government tenders scraper for EU TED, US federal contract awards (USAspending) and UK Contracts Finder. Search public procurement notices by keyword, country, CPV/NAICS code, value and date in one unified schema. For B2G lead generation. No API key.

- **URL**: https://apify.com/bachiembmt/government-tenders-contracts-scraper.md
- **Developed by:** [Ha Phan Thanh Hai](https://apify.com/bachiembmt) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 notice scrapeds

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

## Government Tenders & Contracts Scraper: EU TED, USAspending, UK

Search **public procurement notices** (open tenders and contract awards) from EU TED, USAspending and UK Contracts Finder in one unified schema. No login, no API key.

### What does Government Tenders & Contracts Scraper do?

- Open tenders and awards from EU TED (all EU buyers).
- US federal contract awards from USAspending.gov, by NAICS code and agency.
- UK Contracts Finder notices, filtered locally by keyword and CPV prefix.
- Filter by keyword, buyer country, CPV code, notice type, date window and minimum value.
- Get buyer, notice type, procedure, CPV/NAICS, value and currency, deadline, awarded-to organisation names and notice URL.

### Why use it

- **Three official open-data sources, one schema.**
- **Official APIs**, not scraped HTML.
- **Low price**: $4 per 1,000 notices.
- **No API key, login or proxy.**

### Use cases

- B2G lead generation: open calls matching your product by CPV and country.
- Competitor intelligence: who won which contract and for how much.
- Daily pipeline monitoring with `publishedFrom`.
- Market sizing by CPV/NAICS code, agency or country.
- Supplier discovery for procurement teams.

### How to use

1. Open the Actor on Apify and click **Try for free** (or call it through the API).
2. Pick **sources**, add **keywords** and optional country/CPV/NAICS filters.
3. Click **Start**, then download the dataset as JSON, CSV, Excel or HTML, or read it through the API.

#### Input example

```json
{
  "sources": ["ted", "usaspending", "uk"],
  "keywords": ["solar", "photovoltaic"],
  "countries": ["DEU", "FRA"],
  "cpvCodes": [],
  "naicsCodes": ["2371"],
  "noticeTypes": ["tender", "award"],
  "publishedFrom": "2026-09-01",
  "publishedTo": "2026-10-21",
  "minValue": 100000,
  "maxResults": 50
}
```

`maxResults` applies **per source**. Default input (one keyword, 10 per source, TED + USAspending) finishes in about 10 seconds.

| Field | TED | USAspending | UK |
|---|---|---|---|
| keywords | full-text (OR) | keyword search (OR) | local match on title/description |
| countries | buyer country (ISO-3) | - | - |
| cpvCodes | exact | - | prefix |
| naicsCodes / agencies | - | yes | - |
| noticeTypes | tender + award | award only | tender + award |

### Output example

```json
{
  "source": "ted",
  "noticeId": "674243-2026",
  "title": "Fourniture et livraison de ...",
  "buyer": "Département des Hautes Pyrénées",
  "buyerCountry": "FRA",
  "noticeType": "can-standard",
  "procedure": "open",
  "cpv": ["34927100"],
  "naics": null,
  "valueAmount": 1600000,
  "currency": "EUR",
  "publishedAt": "2026-10-01",
  "deadlineAt": null,
  "awardedTo": ["Quadrimex Sels"],
  "url": "https://ted.europa.eu/en/notice/-/detail/674243-2026",
  "description": "Accord cadre à bons de commande ..."
}
```

`awardedTo` holds supplier **organisation names only** (no personal contact data). For TED award notices these are the tenderers named in the notice.

### Pricing

Pay per event, no subscription. You pay only for what is returned:

| Event | Price per 1,000 | 1,000 | 10,000 | 100,000 |
|---|---|---|---|---|
| notice | $4.00 | $4.00 | $40.00 | $400.00 |

Example: 1,000 notices cost $4.00; 10,000 cost $40.00.

Platform usage (compute) is included in the event price; there is nothing else to pay for.

### Integrations & API

Run it from code with the Apify API. Replace `<APIFY_TOKEN>` with your API token.

**Python** (`pip install apify-client`)

```python
from apify_client import ApifyClient

client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("bachiembmt/government-tenders-contracts-scraper").call(run_input={"sources": ["ted", "usaspending"], "keywords": ["solar"], "noticeTypes": ["tender", "award"], "maxResults": 10})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

**cURL** (run synchronously and get dataset items)

```bash
curl -X POST "https://api.apify.com/v2/acts/bachiembmt~government-tenders-contracts-scraper/run-sync-get-dataset-items?token=<APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"sources": ["ted", "usaspending"], "keywords": ["solar"], "noticeTypes": ["tender", "award"], "maxResults": 10}'
```

Works with:

- **Make** and **Zapier**: use the Apify app/module to run this Actor and pass the dataset on.
- **n8n**: use the Apify node or an HTTP Request node with the API call above.
- **Google Sheets**: export the dataset as CSV, or use the Apify integration to append rows automatically.
- **Webhooks**: trigger your own endpoint when a run finishes; combine with Apify schedules for recurring jobs.
- **AI agents**: expose the Actor as a tool through the [Apify MCP server](https://mcp.apify.com).

### FAQ

**Is SAM.gov included?**
No. SAM.gov open opportunities need an API key; USAspending covers US federal awards only. Find a Tender (UK) is also not included.

**Are values converted to one currency?**
No. Values stay in the notice currency (EUR, GBP, USD...).

**Why fewer results than `maxResults`?**
Your filters matched fewer notices; the log states the reason when a source returns 0.

**Do I need an account or API key for the source?**
No. The Actor needs no login or source API key. You only need an Apify account to run it.

**Is it legal to scrape this data?**
All sources are official open-data APIs. Supplier names are organisations only; no personal contact data is returned. This is general information, not legal advice.

### Limitations

- **SAM.gov** (US open opportunities) needs an API key and is not included; USAspending covers US federal *awards* only.
- TED text and titles are in the notice's original language (English used when available). TED value is the notice total or estimated lot value, when published.
- UK Contracts Finder has no keyword/CPV search parameter: the actor scans the newest ~2,000 notices in the date window and filters locally. Narrow `publishedFrom/To` for broader coverage.
- Find a Tender (UK) is not included.
- Requests are throttled to about 1 per second per host.

# Actor input Schema

## `sources` (type: `array`):

ted = EU Tenders Electronic Daily (tenders + awards), usaspending = US federal contract awards, uk = UK Contracts Finder (tenders + awards).

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

Any of these words/phrases (OR). Empty = no keyword filter.

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

ISO 3-letter codes of the buying country, e.g. DEU, FRA, ITA. Empty = all EU. Applies to TED only.

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

Common Procurement Vocabulary codes, e.g. 09331200 (solar panels). TED matches exactly; UK matches by prefix.

## `naicsCodes` (type: `array`):

NAICS codes or prefixes, e.g. 2371. Applies to USAspending only.

## `agencies` (type: `array`):

Top-tier agency names, e.g. Department of Energy. Applies to USAspending only.

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

tender = open calls / contract notices, award = contract award notices. USAspending only has awards.

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

YYYY-MM-DD. Default: 90 days ago.

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

YYYY-MM-DD. Default: today.

## `minValue` (type: `integer`):

Drop notices whose value is known and below this amount (in the notice's own currency). Notices without a value are kept.

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

Maximum notices returned from each source.

## Actor input object example

```json
{
  "sources": [
    "ted",
    "usaspending"
  ],
  "keywords": [
    "solar"
  ],
  "noticeTypes": [
    "tender",
    "award"
  ],
  "maxResults": 10
}
```

# Actor output Schema

## `notices` (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 = {
    "sources": [
        "ted",
        "usaspending"
    ],
    "keywords": [
        "solar"
    ],
    "noticeTypes": [
        "tender",
        "award"
    ],
    "maxResults": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("bachiembmt/government-tenders-contracts-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 = {
    "sources": [
        "ted",
        "usaspending",
    ],
    "keywords": ["solar"],
    "noticeTypes": [
        "tender",
        "award",
    ],
    "maxResults": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("bachiembmt/government-tenders-contracts-scraper").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 '{
  "sources": [
    "ted",
    "usaspending"
  ],
  "keywords": [
    "solar"
  ],
  "noticeTypes": [
    "tender",
    "award"
  ],
  "maxResults": 10
}' |
apify call bachiembmt/government-tenders-contracts-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bachiembmt/government-tenders-contracts-scraper"
        }
    }
}
```

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/YULltNxUTTlQhQ00B/builds/kkis8gqUblMNpyQNf/openapi.json
