# Government Contract & Tender Monitor: SAM.gov, UK, EU TED (`datacrate/gov-contract-opportunities`) Actor

Government bid monitor: SAM.gov (bring your own free key), UK Contracts Finder and EU TED, with keyword/NAICS/CPV filters and a daily delta. Official APIs, no personal data.

- **URL**: https://apify.com/datacrate/gov-contract-opportunities.md
- **Developed by:** [Data Crate](https://apify.com/datacrate) (community)
- **Categories:** Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.60 / 1,000 contract notices

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/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 Contract & Tender Monitor – SAM.gov, UK Contracts Finder, EU TED

One feed of new public-sector bids from the US, UK and EU. Each row has the notice title, buying agency, notice type, posted date, response deadline, estimated value and currency (when published), CPV or NAICS codes and a link to the official notice. Built for small businesses, bid writers, procurement consultants and sales teams selling to government.

**First run (no key needed):** press Start. The prefill searches UK Contracts Finder and EU TED for "software" and "cybersecurity" notices posted in the last 7 days: up to 50 notices, about $0.10 at $0.002 each.

**Add US federal bids:** paste your own free SAM.gov API key and select `SAM_GOV`. SAM.gov rate-limits free keys, so use specific keywords or NAICS codes and a daily schedule.

Official APIs only. Organisation-level data; contact persons are not returned.

### Who uses it

Small businesses and agencies hunting for contracts, bid writers, procurement consultants, market analysts and sales teams selling to government.

### Input

| Field | Description | Default |
|---|---|---|
| `sources` | `UK_CONTRACTS_FINDER`, `TED_EU`, `SAM_GOV` | UK + TED |
| `samApiKey` | **Your own** free SAM.gov public API key (secret field). Only needed for `SAM_GOV` | – |
| `keywords` | Match any of these words (searched at the source) | none |
| `naics` | NAICS codes, SAM.gov only (e.g. `541511`) | none |
| `cpvCodes` | CPV codes/prefixes for UK/EU (e.g. `72`, `72200000`) | none |
| `postedSince` | `YYYY-MM-DD`, `yesterday`, `today`, `N days ago` | `yesterday` |
| `activeOnly` | Skip closed / awarded notices | `true` |
| `maxItems` | Max notices, sources interleaved | 500 |

```json
{ "sources": ["UK_CONTRACTS_FINDER", "TED_EU"], "keywords": ["cybersecurity"], "cpvCodes": ["72"], "postedSince": "7 days ago", "maxItems": 100 }
```

#### Getting a SAM.gov key (free, 2 minutes)

Sign in at sam.gov → *Account Details* → *Request Public API Key*. Paste it into **SAM.gov API key**. The field is encrypted by Apify and never written to the dataset or logs. Free keys are rate limited by SAM.gov (a handful of requests per day for non-federal accounts), so use specific keywords/NAICS and a daily schedule.

### Output

```json
{
  "source": "TED_EU",
  "noticeId": "775149-2026",
  "noticeTitle": "Luxembourg – Computer-related services – Call for Tenders for the selection of Artificial Intelligence Gigafactory Consortia ...",
  "agency": "European High-Performance Computing Joint Undertaking",
  "noticeType": "Contract notice (cn-standard)",
  "naics": null,
  "cpv": "72500000, 72211000, 72310000",
  "psc": null,
  "setAside": null,
  "postedDate": "2026-11-09",
  "deadline": "2026-12-03",
  "valueIfAny": 10000000000,
  "currency": "EUR",
  "url": "https://ted.europa.eu/en/notice/-/detail/775149-2026",
  "scrapedAt": "2026-11-14T18:30:00.000Z"
}
```

SAM.gov rows additionally carry `naics`, `psc`, `setAside` (e.g. "Total Small Business Set-Aside"), `solicitationNumber` and a `sam.gov` link. UK rows carry CPV codes, SME/VCSE suitability and a short description.

A run summary (counts per source and per-source errors) is stored in the key-value store under `SUMMARY`. If one source fails (for example an invalid SAM.gov key), the others still return data.

### FAQ

**Do I need a SAM.gov account?**
Only if you want US federal notices. The UK and EU sources work with no key, and the actor runs fine without one.

**Is it allowed?**
Yes. The actor calls the official public APIs (SAM.gov Opportunities API v2, UK Contracts Finder API, TED API v3). Your SAM.gov key is used only for your own runs, in line with SAM.gov's API terms.

**Does it include contact people?**
No. SAM.gov points of contact (names, emails, phones) are deliberately dropped; only organisation-level data is returned. **No personal data.**

**Why is `valueIfAny` often empty?**
Many notices do not publish a value. UK values use the highest published value or the awarded value; TED sums the estimated lot values; SAM.gov uses the award amount when present.

**Why does the UK show few open notices for my keyword?**
Contracts Finder includes many award notices; with `activeOnly` on you get only open opportunities. Switch it off to see awards too.

**How do I get a daily alert?**
Schedule the actor with `postedSince: "yesterday"` and connect an Apify integration (email, Slack, Google Sheets, webhook).

**Do values use one currency?**
No. Each row has its own `currency` (GBP, EUR, USD, …); no conversion is applied.

### Pricing

Pay-per-event: a small fixed price per notice returned (see the pricing box on this page) plus Apify platform usage. Use *Maximum cost per run* to cap spend. The SAM.gov key is yours and free.

### Data sources & attribution

- SAM.gov Opportunities API (GSA) – US federal public domain data.
- Contracts Finder (UK Cabinet Office) – published under the Open Government Licence v3.0.
- TED – Tenders Electronic Daily, © European Union, reuse under the TED open-data terms.

This actor is not affiliated with or endorsed by any of these agencies. Verify deadlines and requirements in the official notice before bidding.

# Actor input Schema

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

Which official sources to query. UK Contracts Finder and TED (EU) need no key. SAM.gov (US federal) requires your own free API key in the field below.

## `samApiKey` (type: `string`):

Your own free public API key from SAM.gov (sign in > Account Details > Request Public API Key). Only needed when SAM.gov is selected. It is stored encrypted and never written to the dataset or logs.

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

Return notices matching any of these keywords (title/description search at the source). Leave empty for all notices.

## `naics` (type: `array`):

US NAICS codes to filter SAM.gov notices, e.g. 541511 (custom software), 541512, 238220. Ignored for UK and EU sources.

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

Common Procurement Vocabulary codes or prefixes for UK Contracts Finder and TED, e.g. 72 (IT services), 72200000 (software programming), 45 (construction).

## `postedSince` (type: `string`):

Only notices published on or after this date. YYYY-MM-DD, 'yesterday', 'today' or 'N days ago'. Default 'yesterday' suits a daily scheduled run.

## `activeOnly` (type: `boolean`):

Skip notices that are already closed or awarded (UK 'Open' status, TED active notices, SAM.gov active). Turn off to also get award notices.

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

Maximum total notices returned (sources are interleaved so each is represented).

## Actor input object example

```json
{
  "sources": [
    "UK_CONTRACTS_FINDER",
    "TED_EU"
  ],
  "keywords": [
    "software",
    "cybersecurity"
  ],
  "naics": [],
  "cpvCodes": [],
  "postedSince": "7 days ago",
  "activeOnly": true,
  "maxItems": 50
}
```

# Actor output Schema

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

All records returned by this run (default dataset items).

# 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": [
        "UK_CONTRACTS_FINDER",
        "TED_EU"
    ],
    "keywords": [
        "software",
        "cybersecurity"
    ],
    "postedSince": "7 days ago",
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("datacrate/gov-contract-opportunities").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": [
        "UK_CONTRACTS_FINDER",
        "TED_EU",
    ],
    "keywords": [
        "software",
        "cybersecurity",
    ],
    "postedSince": "7 days ago",
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("datacrate/gov-contract-opportunities").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": [
    "UK_CONTRACTS_FINDER",
    "TED_EU"
  ],
  "keywords": [
    "software",
    "cybersecurity"
  ],
  "postedSince": "7 days ago",
  "maxItems": 50
}' |
apify call datacrate/gov-contract-opportunities --silent --output-dataset

```

## MCP server setup

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

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/2LNIikm0bxFg58Mke/builds/ZFSggEnejpAeak9dv/openapi.json
