# Government Contracts & Tenders Scraper: US, EU, UK (`rar_888/gov-procurement-tenders`) Actor

Search public tenders and contract awards from USAspending, TED and UK Contracts Finder. Filter by keyword, publication date and contract value. Each record includes its source and attribution.

- **URL**: https://apify.com/rar_888/gov-procurement-tenders.md
- **Developed by:** [Rardiel Andrés Ceballo Salas](https://apify.com/rar_888) (community)
- **Categories:** Lead generation, Business, AI
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 government tender or contract award 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

## Government Contracts & Tenders: US, EU TED & UK OCDS

Extract normalized public procurement tenders and government contract awards across the **United States** (`USAspending.gov`), **European Union** (`TED API v3`), and **United Kingdom** (`UK Contracts Finder OCDS`) from a single keyword query.

> **Open-Data Attribution & Privacy Notice:** Every item emitted by this Actor includes `sourceUrl` and `attribution` acknowledging the official public data source and license (`U.S. Public Domain (USAspending.gov / DATA Act)`, `European Union, TED (Commission Decision 2011/833/EU)`, and `Contains public sector information licensed under the Open Government Licence v3.0`). The Actor queries only anonymous read-only search endpoints, strips personal contact details (`contactPoint` emails/phones), and is not endorsed by or affiliated with any government agency.

***

### Why Use This Actor?

Monitoring B2G (business-to-government) contract opportunities across jurisdictions typically requires integrating three completely different data standards:

1. **USAspending API v2 (`us`):** Federal contract award rows (`A`, `B`, `C`, `D`) with obligated `USD` values and corporate recipients.
2. **EU TED Search API v3 (`eu`):** Expert Query syntax (`FT ~ "..." AND PD >= YYYYMMDD`) with ISO-639-2 multilingual dictionaries (`eng`, `deu`, `fra`, `spa`, etc.) and `xs:date` timezone offsets.
3. **UK Contracts Finder OCDS (`uk`):** Open Contracting Data Standard release packages (`tender` and `award` stages) classified by CPV codes.

This Actor unifies all three official sources into a clean **16-field JSON dataset**, deduplicated by `(source, noticeId)` and sorted newest-first (`publishedAt` descending) for B2G sales teams, market intelligence pipelines, and AI agents.

***

### Key Features

- **Three Official Procurement Portals (`us`, `eu`, `uk`):** Query all three jurisdictions together or select any subset via `jurisdictions`.
- **Automatic EU Multilingual Resolution:** Prioritizes English (`eng`) titles and HTML links on TED v3 notices and falls back cleanly to the buyer's native EU language when an English translation is not provided.
- **Local OCDS Keyword Matching for UK Notices:** Filters UK Contracts Finder OCDS releases case-insensitively across `tender.title`, `tender.description`, `buyer.name`, and CPV `tender.classification.description`.
- **Incremental `publishedSince` Filtering:** Uses a fast 90-day lookback window by default (`""`), or accepts `"YYYY-MM-DD"`, ISO-8601 UTC timestamps, and relative windows (`"1d"`, `"7d"`, `"30d"`, `"24h"`) with strict local cutoff enforcement.
- **Value Threshold (`minValueUsd`):** Filters out awards and tenders with a known `awardAmount` below `minValueUsd` while retaining unpriced open tenders (`awardAmount: null`).
- **Polite Fair Use & Apify Proxy Support:** Enforces a `1.0 s` per-host `Crawl-delay`, opens a safety circuit (`circuit_open`) after 3 consecutive failures, never retries permanent `HTTP 4xx` errors (`400`/`404`), and supports Apify Proxy (`DATACENTER` and `RESIDENTIAL`) with automatic direct-connection fallback when running locally.

***

### Input Parameters

| Field | Type | Default | Description |
|---|---|---|---|
| `keywords` | `array<string>` | `["cloud software"]` | *(Required)* Business, technology, or sector search terms (at least 1 non-empty string). |
| `jurisdictions` | `array<string>` | `["us", "eu", "uk"]` | Jurisdictions to query: `"us"`, `"eu"`, and/or `"uk"`. |
| `publishedSince` | `string` | `""` | Optional cutoff (`"YYYY-MM-DD"`, ISO-8601 UTC timestamp, or `"1d"`, `"7d"`, `"30d"`, `"24h"`). Empty (`""`) queries the last 90 days. |
| `minValueUsd` | `integer` | `0` | Minimum contract value threshold (`0` = disabled). Excludes records with a known `awardAmount < minValueUsd`. |
| `maxItems` | `integer` | `15` | Global maximum items emitted across the entire run (`1–1000`). |
| `maxItemsPerJurisdiction` | `integer` | `5` | Maximum items emitted per jurisdiction (`1–500`). |
| `proxyGroup` | `string` | `"DATACENTER"` | Apify Proxy group: `"DATACENTER"` or `"RESIDENTIAL"`. |
| `proxyConfiguration` | `object` | `{"useApifyProxy": true}` | Apify Proxy configuration object. |

#### Example Input (`INPUT.example.json`)

```json
{
  "keywords": [
    "cloud software"
  ],
  "jurisdictions": [
    "us",
    "eu",
    "uk"
  ],
  "publishedSince": "",
  "minValueUsd": 0,
  "maxItems": 15,
  "maxItemsPerJurisdiction": 5,
  "proxyGroup": "DATACENTER",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

> **Tip on Quotas:** `maxItems` caps the total dataset across the run, while `maxItemsPerJurisdiction` caps each portal before global date sorting. Setting `maxItems: 15` and `maxItemsPerJurisdiction: 5` ensures a balanced mix across `us`, `eu`, and `uk`.

***

### Output Schema

Each dataset item contains 16 normalized fields:

```json
{
  "jurisdiction": "uk",
  "source": "uk_contracts_finder",
  "noticeId": "CF-3763100D0O000000rwimUAA",
  "title": "xWave systems deployment",
  "buyerName": "Epsom and St Helier University Hospitals NHS Trust",
  "country": "UK",
  "publishedAt": "2026-11-10T16:03:38Z",
  "deadlineAt": "2026-09-09T11:00:00Z",
  "awardAmount": 695000.0,
  "currency": "GBP",
  "recipientName": "KEYSTREAM GROUP LIMITED",
  "noticeType": "award",
  "description": "Delivery of a programme of work to oversee the deployment of xWave Order Comms systems to replace the existing legacy DART system, within the trust, community sites and all GP practices\n\nAdditional information:\nDirect award under GCloud14 RM1557",
  "url": "https://www.contractsfinder.service.gov.uk/Notice/CF-3763100D0O000000rwimUAA",
  "sourceUrl": "https://www.contractsfinder.service.gov.uk",
  "attribution": "Contains public sector information licensed under the Open Government Licence v3.0"
}
```

***

### Pricing (Pay-Per-Event)

You pay only for **successfully extracted procurement notices and contract awards** (`apify-default-dataset-item`). Startup (`apify-actor-start`) and runs with `0` matching notices cost **`$0.00`**:

- **Price per notice (`apify-default-dataset-item`):** **`$0.002` USD per notice** (`$2.00` per `1,000` notices), all-inclusive of platform compute (`256 MB`) and proxy usage.

| Scenario | Notices (`maxItems`) | Total User Cost (`$0.002/notice`) |
|---|---:|---:|
| Single notice check | 1 | **$0.002** |
| Daily multi-portal brief | 15 | **$0.03** |
| Sector procurement audit | 100 | **$0.20** |
| Full cross-border feed | 1,000 | **$2.00** |

***

### Official Public Endpoints & Licenses

1. **United States — USAspending.gov (`us_usaspending`):**
   - Endpoint: `POST https://api.usaspending.gov/api/v2/search/spending_by_award/`
   - Attribution: `U.S. Public Domain (USAspending.gov / DATA Act)` (`17 U.S.C. § 105`)
2. **European Union — Tenders Electronic Daily (`eu_ted`):**
   - Endpoint: `POST https://api.ted.europa.eu/v3/notices/search`
   - Attribution: `European Union, TED (Commission Decision 2011/833/EU)`
3. **United Kingdom — Contracts Finder OCDS (`uk_contracts_finder`):**
   - Endpoint: `GET https://www.contractsfinder.service.gov.uk/Published/Notices/OCDS/Search`
   - Attribution: `Contains public sector information licensed under the Open Government Licence v3.0`

***

### Frequently Asked Questions (FAQ)

#### 1. What does this Actor cost to run?

It uses Apify's **Pay-Per-Event (PPE)** model at **`$0.002` USD per returned notice** (`$2.00` per `1,000` notices) with **`$0.00` startup fee**. Runs returning `0` matching notices cost `$0.00`.

#### 2. Do I need API keys for USAspending, EU TED, or UK Contracts Finder?

No. All three endpoints used by this Actor are official, unauthenticated public search APIs for published procurement data.

#### 3. Why are `awardAmount` and `recipientName` empty/null on some EU and UK items?

Open tender notices (`cn-standard` on EU TED or `tender` stage on UK Contracts Finder) solicit bids before a supplier is selected and often omit estimated contract values. Finalized contract awards (`us_usaspending` and `award`-stage UK OCDS releases) populate both `awardAmount` and `recipientName`.

#### 4. How does `publishedSince` behave when left empty vs set explicitly?

When `publishedSince` is `""` (default), the Actor queries the last 90 days on each upstream API for fast, bounded execution. When you pass an explicit date (`"2026-10-01"`) or relative window (`"1d"`, `"7d"`, `"30d"`, `"24h"`), the Actor also enforces a strict post-fetch cutoff so older items are never emitted.

#### 5. Does this Actor emit personal contact details of government buyers?

No. Personal officer contact fields (`contactPoint`, emails, phone numbers) are excluded by design; only institutional buyer names (`buyerName`), corporate supplier names (`recipientName`), and official portal URLs (`url`, `sourceUrl`) are emitted.

#### 6. Can I query only one jurisdiction (for example, EU TED only)?

Yes. Pass `"jurisdictions": ["eu"]` (or `["us"]`, `["uk"]`, or any combination) and increase `maxItemsPerJurisdiction` and `maxItems` up to `500` / `1000` as needed.

# Actor input Schema

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

List of business, technology, or sector keywords to search across public procurement portals (e.g. 'cloud software', 'cybersecurity', 'data analytics'). At least one non-empty keyword is required.

## `jurisdictions` (type: `array`):

Official procurement jurisdictions to query: 'us' (USAspending.gov federal contract awards), 'eu' (European Union TED API v3 notices), and/or 'uk' (UK Contracts Finder OCDS notices). Defaults to all three.

## `publishedSince` (type: `string`):

Optional publication/start date cutoff for incremental monitoring. Accepts 'YYYY-MM-DD', an ISO-8601 UTC timestamp, or a relative window such as '1d', '7d', '30d', or '24h'. When empty (''), queries the last 90 days by default; when explicitly provided, strictly filters out items older than the cutoff.

## `minValueUsd` (type: `integer`):

Optional minimum contract or tender value threshold (0 = no filter). When greater than 0, excludes notices and awards that report a known awardAmount below this threshold while keeping open tenders with undisclosed value (awardAmount: null).

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

Maximum total number of procurement notices or contract awards to emit across the entire run (1 to 1000).

## `maxItemsPerJurisdiction` (type: `integer`):

Maximum number of procurement notices or contract awards to emit per jurisdiction ('us', 'eu', 'uk') (1 to 500).

## `proxyGroup` (type: `string`):

Apify Proxy group to route requests through when proxy is enabled: 'DATACENTER' (default, fast and cost-effective) or 'RESIDENTIAL'.

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

Apify Proxy settings for reliable routing across requests (automatically falls back to direct connection when running locally without proxy credentials).

## Actor input object example

```json
{
  "keywords": [
    "cloud software"
  ],
  "jurisdictions": [
    "us",
    "eu",
    "uk"
  ],
  "publishedSince": "",
  "minValueUsd": 0,
  "maxItems": 15,
  "maxItemsPerJurisdiction": 5,
  "proxyGroup": "DATACENTER",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# 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 = {
    "keywords": [
        "cloud software"
    ],
    "jurisdictions": [
        "us",
        "eu",
        "uk"
    ],
    "publishedSince": "",
    "minValueUsd": 0,
    "maxItems": 15,
    "maxItemsPerJurisdiction": 5,
    "proxyGroup": "DATACENTER",
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("rar_888/gov-procurement-tenders").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 = {
    "keywords": ["cloud software"],
    "jurisdictions": [
        "us",
        "eu",
        "uk",
    ],
    "publishedSince": "",
    "minValueUsd": 0,
    "maxItems": 15,
    "maxItemsPerJurisdiction": 5,
    "proxyGroup": "DATACENTER",
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("rar_888/gov-procurement-tenders").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 '{
  "keywords": [
    "cloud software"
  ],
  "jurisdictions": [
    "us",
    "eu",
    "uk"
  ],
  "publishedSince": "",
  "minValueUsd": 0,
  "maxItems": 15,
  "maxItemsPerJurisdiction": 5,
  "proxyGroup": "DATACENTER",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call rar_888/gov-procurement-tenders --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rar_888/gov-procurement-tenders"
        }
    }
}
```

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/MbxklPXa57ajxIhDf/builds/b1p3wfTVdxBy8maqH/openapi.json
