# SAM.gov & TED Tenders API – US + EU Government Contracts (`kobakotools/pubdata-sam-ted-tenders`) Actor

New public tenders from SAM.gov (US) and TED (EU) in one normalized feed: title, buyer, country, CPV/NAICS, deadline, value, URL. Keyword, country, code and date filters. Official APIs only, no personal data.

- **URL**: https://apify.com/kobakotools/pubdata-sam-ted-tenders.md
- **Developed by:** [Rin Washi](https://apify.com/kobakotools) (community)
- **Categories:** Business, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 tender results

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

## SAM.gov & TED Tenders API – US + EU Government Contract Opportunities

### What does SAM.gov & TED Tenders do?

It searches **new public tenders** from the two largest official procurement sources — **SAM.gov** (US federal
contract opportunities) and **TED – Tenders Electronic Daily** (EU public procurement notices) — and returns them in
**one normalized schema**: title, buyer, country, CPV / NAICS codes, deadline, estimated value, link and publication date.
Filter by keywords, countries, CPV or NAICS codes and date range, and schedule it to get only new tenders every day.

### Why use it?

- **One feed for US + EU tenders.** Same fields for SAM.gov and TED, so you can load both into one sheet, CRM or alert.
- **Normalized, English-first data.** TED multilingual titles and buyer names are resolved to English when available;
  countries are ISO alpha-2; values are numbers with a currency code; deadlines are the earliest lot deadline.
- **Monitoring mode.** `Only new tenders` remembers what you already received, so scheduled runs return (and charge for) new notices only.
- **Official APIs only.** TED Search API v3 and SAM.gov Get Opportunities API. No HTML scraping, no logins, no CAPTCHAs.
- **Low price.** $2 per 1,000 results (see Pricing). A default run costs about $0.04.
- **No personal data.** Contact names, e-mails and phone numbers are never requested or output.

### How to use

1. Choose sources (`ted`, `sam`). TED needs no key.
2. For SAM.gov, paste **your own free SAM.gov public API key** (sam.gov → sign in → Account Details → API Key).
3. Add keywords, countries (e.g. `DE`, `FR`, `US`), CPV codes (TED) or NAICS codes (SAM.gov), and a date range.
4. Run, or schedule daily with `Only new tenders` on and a `State key` per saved search.
5. Export as JSON, CSV, Excel, or connect via API / webhooks / MCP.

#### Why your own SAM.gov key?

SAM.gov's Terms of Use say an individual account API key must not be shared, and personal keys have a small daily
quota (as low as 10 requests/day for non-federal users). Using your key keeps you within SAM.gov's terms and gives you
your own quota. The key is stored encrypted as a secret input and is never logged. `samMaxRequests` (default 2) caps
calls per run; each call returns up to 1,000 notices. If no key is given, the Actor still returns TED results.

### Input example

```json
{
  "sources": ["ted", "sam"],
  "keywords": ["cloud", "cybersecurity"],
  "countries": ["DE", "FR", "US"],
  "cpvCodes": ["72000000"],
  "naicsCodes": ["5415"],
  "lookbackDays": 7,
  "maxItems": 200,
  "samApiKey": "YOUR_SAM_GOV_KEY",
  "onlyNew": true,
  "stateKey": "it-services-de-fr-us"
}
```

### Output example

```json
{
  "id": "TED:647141-2026",
  "source": "TED",
  "notice_id": "647141-2026",
  "title": "Germany – Software package and information systems – 31 101: 414",
  "buyer": "Universitätsklinikum Ulm Bereich IV 2 Vergabemanagement und Projekteinkauf Vergabestelle",
  "country": "DE",
  "cpv_codes": ["48000000", "48218000"],
  "naics_code": null,
  "classification_codes": ["CPV:48000000", "CPV:48218000"],
  "notice_type": "cn-standard",
  "contract_nature": "supplies",
  "deadline": "2026-10-09",
  "value": null,
  "currency": null,
  "url": "https://ted.europa.eu/en/notice/-/detail/647141-2026",
  "published_at": "2026-09-21",
  "set_aside": null,
  "solicitation_number": null,
  "fetched_at": "2026-09-21T06:00:00Z"
}
```

SAM.gov items use the same fields, with `naics_code`, `classification_codes` like `["NAICS:541512", "PSC:D302"]`,
`set_aside`, `solicitation_number`, and `deadline` as an ISO datetime.

### Pricing

Pay per event: **$0.002 per saved tender ($2.00 per 1,000)** plus Apify's tiny default start fee.
Set **Max cost per run** in the run options: the Actor stops cleanly when your limit is reached and keeps what it saved.

### Filters in detail

| Input | TED | SAM.gov |
|---|---|---|
| `keywords` | full-text (`FT~"..."`), any keyword | 1 keyword: API title search; several: title contains any keyword |
| `countries` | buyer country | included only when `US` is in the list |
| `cpvCodes` | exact 8-digit CPV codes | – |
| `naicsCodes` | – | code prefix match (one 6-digit code is sent to the API) |
| `includeAwards` | off: competition notices only | off: award notices removed |
| dates | publication date | posted date (max 1-year range) |

### Data sources and licenses

- **TED** – Publications Office of the European Union, TED Search API v3 (`api.ted.europa.eu`). TED data may be reused
  under the Commission's reuse policy (Decision 2011/833/EU); attribution: "Source: TED – Tenders Electronic Daily, © European Union".
- **SAM.gov** – U.S. General Services Administration, Get Opportunities Public API (`api.sam.gov`). US federal government data;
  access is subject to SAM.gov Terms of Use, including your own API key.
- Rate limits: TED ≤ 0.8 requests/second, SAM.gov ≤ 0.5 requests/second and `samMaxRequests` per run; automatic retries with backoff.

### Limitations

- Only notices published by the two APIs; national portals are not included.
- TED values are estimates when present; many notices have no value.
- SAM.gov description text requires your key and is not downloaded (to save your quota); open `url` for full details.
- A SAM.gov key expires every 90 days; renew it in SAM.gov and update the input.

### Your responsibility

You are responsible for using the data in line with the source terms (SAM.gov Terms of Use, EU reuse policy)
and applicable law. This Actor does not output personal data. It is not affiliated with GSA, SAM.gov, the EU Publications Office or TED.

### AI disclosure

This Actor's code and description were created with generative AI (Claude) and are verified by automated tests.

### Changelog

- 1.0 – First release: TED + SAM.gov, normalized schema, monitoring mode, PPE pricing.

# Actor input Schema

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

Which official APIs to search: 'ted' (EU Tenders Electronic Daily, no key needed) and/or 'sam' (US SAM.gov, needs your own free SAM.gov API key below).

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

Any of these words or phrases. TED: full-text search. SAM.gov: title search. Empty = no keyword filter.

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

Buyer country as ISO code (DE, FR, PL, US ...). Include US to search SAM.gov. Empty = all countries.

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

8-digit EU Common Procurement Vocabulary codes, e.g. 72000000 (IT services), 48000000 (software).

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

NAICS codes or prefixes, e.g. 541512 or 5415.

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

Used when 'Published from' is empty.

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

Optional start of the publication date range.

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

Optional end of the publication date range (default: today).

## `includeAwards` (type: `boolean`):

Off = only open calls for tenders. On = also contract award notices.

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

Maximum tenders to save across all sources. Each saved tender is one billable result.

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

Required only for SAM.gov. Free: sign in at sam.gov > Account Details > API Key. Stored encrypted. Keys expire after 90 days.

## `samMaxRequests` (type: `integer`):

Personal SAM.gov keys have a small daily quota (as low as 10 calls/day). Each call returns up to 1,000 notices.

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

Return only tenders not returned by earlier runs with the same state key. Use with a daily schedule.

## `stateKey` (type: `string`):

Name of the memory used by 'Only new tenders'. Use one key per saved search.

## Actor input object example

```json
{
  "sources": [
    "ted",
    "sam"
  ],
  "keywords": [
    "software"
  ],
  "countries": [],
  "cpvCodes": [],
  "naicsCodes": [],
  "lookbackDays": 7,
  "includeAwards": false,
  "maxItems": 20,
  "samMaxRequests": 2,
  "onlyNew": false,
  "stateKey": "default"
}
```

# Actor output Schema

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

All items saved by this run (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 = {
    "sources": [
        "ted",
        "sam"
    ],
    "keywords": [
        "software"
    ],
    "lookbackDays": 7,
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("kobakotools/pubdata-sam-ted-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 = {
    "sources": [
        "ted",
        "sam",
    ],
    "keywords": ["software"],
    "lookbackDays": 7,
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("kobakotools/pubdata-sam-ted-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 '{
  "sources": [
    "ted",
    "sam"
  ],
  "keywords": [
    "software"
  ],
  "lookbackDays": 7,
  "maxItems": 20
}' |
apify call kobakotools/pubdata-sam-ted-tenders --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kobakotools/pubdata-sam-ted-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/HGR2dZNPRetmoL75h/builds/583jbQM9Ipz7pijv6/openapi.json
