# TenderFeed: SAM.gov Federal Contract Opportunities Scraper (`tenderfeed/sam-gov-opportunities`) Actor

US federal contract opportunities from SAM.gov by keyword, NAICS, PSC, set-aside, state, agency and date. No API key needed. JSON/CSV with officer contacts and deadlines. MCP-ready.

- **URL**: https://apify.com/tenderfeed/sam-gov-opportunities.md
- **Developed by:** [TenderFeed](https://apify.com/tenderfeed) (community)
- **Categories:** Lead generation, Open source, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.50 / 1,000 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 Contract Opportunities Scraper (No API Key Needed) by TenderFeed

Get **US federal government contract opportunities** from **SAM.gov**: solicitations, presolicitations, sources sought, combined synopsis/solicitations and award notices. Filter by **keyword, NAICS code, PSC code, set-aside (8(a), SDVOSB, WOSB, HUBZone, small business), state, agency, posted date and deadline**. Clean, normalized JSON, CSV or Excel with **contracting officer contacts, deadlines and award amounts**.

Built by **TenderFeed** ([tenderfeedhq.com](https://tenderfeedhq.com)). **Works without an API key**: by default it reads SAM.gov's official daily public *Contract Opportunities* extract (open data on data.gov). If you have a SAM.gov public API key, it can query the official Get Opportunities API v2 instead.

### What can you do with it?

- **Daily GovCon bid alerts**: new opportunities for your NAICS codes in your Slack, inbox, Google Sheet or CRM.
- **Small-business set-aside hunting**: SBA, 8(a), SDVOSB, WOSB, HUBZone opportunities in your states.
- **Capture management & BD**: contracting officer name, email and phone in every row.
- **Competitor tracking**: award notices with awardee and amount.
- **AI agents**: call it as an **MCP tool** so your agent can answer *"What cybersecurity solicitations close in the next 2 weeks in Virginia?"*

### Data source modes

| Mode | Needs key? | Speed | Notes |
|---|---|---|---|
| `bulkCsv` (default without key) | No | ~10 s per run | SAM.gov's official daily extract (~70,000 active notices, refreshed nightly). Includes description text. |
| `api` | Yes | Depends on your quota | Official Get Opportunities API v2. Titles only (descriptions are links). Non-federal keys have a small daily request quota. |
| `auto` | - | - | API if a key is given, otherwise the bulk extract |

#### How to get a free SAM.gov API key (optional)

1. Create a free account at [sam.gov](https://sam.gov) and sign in.
2. Open **Profile > Account Details**, enter your password and click **Request Public API Key**.
3. Paste the key into the `apiKey` input (stored as a secret). Note: SAM.gov returns `404 No Data found` both for empty searches and for an invalid key.

### Input example

```json
{
  "keywords": ["software", "cloud", "cybersecurity"],
  "naicsCodes": ["5415"],
  "noticeTypes": ["o", "k", "p", "r"],
  "setAsideCodes": ["SBA", "SDVOSBC"],
  "states": ["VA", "MD", "DC"],
  "postedFrom": "14 days",
  "onlyOpen": true,
  "maxResults": 200
}
```

Notice types: `o` Solicitation, `k` Combined Synopsis/Solicitation, `p` Presolicitation, `r` Sources Sought, `s` Special Notice, `a` Award Notice, `u` Justification, `g` Sale of Surplus Property, `i` Intent to Bundle.

### Output example

Real row from a live run (2026-10-29):

```json
{
  "source": "sam-gov",
  "sourceId": "035217e410d84f349d0dd70bc9872e99",
  "url": "https://sam.gov/workspace/contract/opp/035217e410d84f349d0dd70bc9872e99/view",
  "title": "6695--SURGERY GLOBUS INSTRUMENT SET",
  "noticeType": "Sources Sought",
  "status": "active",
  "buyerName": "VETERANS AFFAIRS, DEPARTMENT OF / NETWORK CONTRACT OFFICE 19 (36C259)",
  "buyerCountry": "US",
  "buyerContactName": "Charles Morton",
  "buyerContactEmail": "charles.morton@va.gov",
  "naicsCodes": ["339112"],
  "otherClassificationCodes": ["6695"],
  "publishedAt": "2026-10-28",
  "deadlineAt": "2026-11-06T10:00:00-07:00",
  "setAside": "Service-Disabled Veteran-Owned Small Business (SDVOSB) Set-Aside (FAR 19.14)",
  "solicitationNumber": "36C25927Q0043"
}
```

Same field set as the other TenderFeed Actors ([EU TED](../ted-eu-tenders), [UK](../uk-tenders)), plus `solicitationNumber` (and `descriptionUrl` in API mode). `otherClassificationCodes` holds the PSC code. SAM.gov does not publish estimated values; `awardedValue` and `awardees` are filled on Award Notices.

### Contracting officer contacts (`includeBuyerContacts`)

On by default: US federal points of contact are published by SAM.gov as public data. Set `includeBuyerContacts: false` to drop contact names, emails and phones (for example before sharing a dataset or storing it in a system that should not hold personal data); agency and office stay. Live test (40 notices, 2026-10-29): default returned a contact name on 36/40 rows, an email on 34/40 and a phone on 15/40; `false` returned 0 of each with `buyerName` on 40/40.

### Daily alerts ("only new" monitoring mode)

Turn on `onlyNew` and give the search a `monitoringId` (e.g. `"it-tenders-daily"`), then schedule the Actor daily. Each run returns, and charges for, only notices you have not received before. Pair it with an Apify integration (Slack, email, Google Sheets, Zapier, Make) to get a ready-made tender alert.

### Pricing

**Pay per result: $2.50 per 1,000 opportunities** ($0.0025 per row) plus Apify's small run-start fee. A daily NAICS alert returning 30 rows costs about **$2.25 a month**.

### FAQ

**Is this official data?** Yes. Both modes use official SAM.gov / GSA sources. SAM.gov data is US federal public data.

**Why are there fewer results with a key?** In API mode keywords only match titles; the bulk extract also searches description text.

**How fresh is the bulk extract?** SAM.gov regenerates it nightly (US Eastern time). Use API mode if you need same-hour freshness.

# Actor input Schema

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

Words to look for in the title (and description, see below). Example: \["cybersecurity", "cloud"].

## `keywordMode` (type: `string`):

Match ANY or ALL keywords.

## `searchInDescription` (type: `boolean`):

Bulk mode only has the description text; in API mode only titles are searched.

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

6-digit NAICS codes or prefixes, e.g. \["541512", "5415"].

## `pscCodes` (type: `array`):

Product Service Codes or prefixes, e.g. \["D3", "R4"].

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

Empty = all types.

## `setAsideCodes` (type: `array`):

Small-business set-asides, e.g. \["SBA", "8A", "SDVOSBC", "WOSB", "HZC"].

## `states` (type: `array`):

Two-letter US state codes, e.g. \["VA", "MD", "DC"].

## `agency` (type: `string`):

Filter by department/agency/office name, e.g. "VETERANS AFFAIRS".

## `postedFrom` (type: `string`):

YYYY-MM-DD or relative ("7 days"). Default: last 7 days. Max range 1 year.

## `postedTo` (type: `string`):

YYYY-MM-DD. Default: today.

## `onlyOpen` (type: `boolean`):

Active pre-award notices whose response deadline has not passed.

## `minAwardValue` (type: `integer`):

SAM.gov only publishes amounts on Award Notices; applies to awardedValue.

## `maxAwardValue` (type: `integer`):

Applies to awardedValue (Award Notices).

## `includeUnknownValue` (type: `boolean`):

Keep records that have no award amount when a value filter is set.

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

0 = no limit.

## `includeBuyerContacts` (type: `boolean`):

Include the contracting officer's name, email and phone (buyerContactName/Email/Phone). On by default: US federal points of contact are published as public data. Turn off to keep only organization-level info (agency, office, city).

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

Remember what earlier runs delivered and return (and charge for) only notices you have not received yet. Ideal for scheduled daily alerts.

## `monitoringId` (type: `string`):

Name of the watch-list memory used by 'Only new'. Use a different ID per saved search/schedule.

## `mode` (type: `string`):

The bulk extract is SAM.gov's official daily open-data file: no key needed, ~1-2 minutes per run.

## `apiKey` (type: `string`):

Free key from SAM.gov > Account Details > Public API Key. Optional: without it the Actor uses the daily public extract.

## Actor input object example

```json
{
  "keywords": [
    "software"
  ],
  "keywordMode": "any",
  "searchInDescription": true,
  "noticeTypes": [
    "o",
    "k",
    "p",
    "r"
  ],
  "onlyOpen": false,
  "includeUnknownValue": true,
  "maxResults": 20,
  "includeBuyerContacts": true,
  "onlyNew": false,
  "mode": "auto"
}
```

# Actor output Schema

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

All normalized records from the default dataset, opened in the Overview view.

# 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": [
        "software"
    ],
    "maxResults": 20
};

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

# Run the Actor and wait for it to finish
run = client.actor("tenderfeed/sam-gov-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 '{
  "keywords": [
    "software"
  ],
  "maxResults": 20
}' |
apify call tenderfeed/sam-gov-opportunities --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,tenderfeed/sam-gov-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/p1gMXZG2BnCWGOJhp/builds/uaVjxW7Q4trGKvmqS/openapi.json
