# SAM.gov Contract Opportunities Feed (no API key) (`moment-data/sam-gov-opportunities-feed`) Actor

New U.S. federal contract opportunities from SAM.gov's official public data extract - no API key or login. Solicitations, RFQs, sources sought, presolicitations and award notices with NAICS, PSC, set-aside, agency, state and keyword filters plus a new-since-last-run mode.

- **URL**: https://apify.com/moment-data/sam-gov-opportunities-feed.md
- **Developed by:** [Luke Miller](https://apify.com/moment-data) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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 Feed (no API key)

Get **new U.S. federal contract opportunities from SAM.gov every day - without a SAM.gov API key, login or rate-limit headaches.** The Actor reads the official **SAM.gov Contract Opportunities public data extract** (published nightly by the U.S. General Services Administration) and returns clean JSON for solicitations (RFP/IFB), combined synopsis/solicitations (RFQs), presolicitations, sources sought / RFIs, special notices and **award notices with the winning company and award amount**.

Filter by **NAICS, PSC, set-aside (8(a), HUBZone, SDVOSB, WOSB, small business), agency or office, place-of-performance state, keywords, open deadlines or minimum award amount**, and schedule it in **"new since last run"** mode for a daily bid alert.

### Who it's for

- **GovCon small businesses and bid teams** - a daily list of new RFQs/RFPs in your NAICS codes and set-asides, straight into Sheets, Slack, a CRM or email.
- **Capture managers and BD consultants** - track sources sought and presolicitations before the RFP drops.
- **Competitive intelligence** - who just won which award, from which agency, for how much.
- **GovTech products, data teams and AI agents** - stable notice IDs, official links, one clean schema.

### Why this Actor

- **No API key.** The official SAM.gov API needs a personal key with a daily request cap. This Actor uses the public bulk extract that SAM.gov publishes for download.
- **Fast and cheap.** The extract is ordered newest-first, so a daily run reads only the first few MB (about 2-3 seconds).
- **Built for schedules.** `sinceLastRun` mode remembers what it already delivered (per saved search) and returns only new notices - and new versions of amended notices.
- **Privacy-first.** Contracting-officer names, emails and phone numbers are **never** output; emails and phone numbers inside descriptions are masked; awardees are organisation names only (likely individuals are withheld).

### Quick start

Run with the default input `{}` to get the 30 newest notices (6 each of solicitations, RFQs, presolicitations, sources sought and awards from the last 3 posting days).

Daily alert for small-business IT work in Colorado and Virginia:

```json
{
  "mode": "sinceLastRun",
  "stateKey": "it-co-va",
  "noticeKinds": ["solicitation", "combined", "sourcesSought"],
  "naicsCodes": ["5415", "518210"],
  "states": ["CO", "VA"],
  "smallBusinessOnly": true,
  "onlyOpen": true,
  "maxItems": 100
}
```

Big awards in the last two weeks:

```json
{ "noticeKinds": ["award"], "minAwardAmount": 1000000, "lookbackDays": 14, "maxItems": 200 }
```

Event and conference work across federal agencies:

```json
{ "keywords": ["event planning", "conference", "exhibit", "trade show"], "lookbackDays": 30, "onlyOpen": true }
```

### Input

| Field | What it does |
|---|---|
| `mode` | `window` (default, stateless) or `sinceLastRun` (only notices not delivered before for this `stateKey`) |
| `noticeKinds` | `solicitation`, `combined`, `presolicitation`, `sourcesSought`, `specialNotice`, `award`, `justification`, `surplusSale`, `bundling`, `other` |
| `lookbackDays` | Posting-day window (default 3, max 90), counted from the newest posting day in today's extract |
| `naicsCodes`, `pscCodes` | Prefix match, e.g. `5415`, `236220`, `R4`, `D3` |
| `setAsides` / `smallBusinessOnly` | Exact codes (`SBA`, `SBP`, `8A`, `8AN`, `HZC`, `SDVOSBC`, `WOSB`, `EDWOSB`, `VSA`, `ISBEE` ...) or any set-aside |
| `agencies` | Text match on department, sub-tier, office or office code (`veterans affairs`, `army`, `W912`) |
| `states` | Place-of-performance state (2-letter) |
| `keywords` / `excludeKeywords` | Word-start match in title + description |
| `onlyOpen` | Response deadline in the future |
| `minAwardAmount` | Minimum award amount (award notices) |
| `maxItems` | Max notices delivered and charged (default 30), split fairly between kinds |
| `descriptionChars` | Length of the plain-text description (default 600; 0 = none) |
| `stateKey` | Name of the saved search for `sinceLastRun` |

### Output

One record per notice (newest first). Example (shortened):

```json
{
  "noticeId": "d3cbb9c998cf4559a06eb56672c4c8d3",
  "noticeKind": "sourcesSought",
  "noticeType": "Sources Sought",
  "title": "Dehumidifier Large Buy, NSN 4440-01-509-2722",
  "solicitationNumber": "SPE8EG-DEHUMIDIFIER",
  "postedAt": "2026-11-01 23:26:34",
  "responseDeadline": "2026-12-03T15:00:00-05:00",
  "department": "DEPT OF DEFENSE",
  "subTier": "DEFENSE LOGISTICS AGENCY",
  "office": "DLA TROOP SUPPORT",
  "officeCode": "SPE8EG",
  "naicsCode": "3334",
  "pscCode": "4440",
  "setAsideCode": null,
  "placeOfPerformanceState": "PA",
  "awardNumber": null,
  "awardAmount": null,
  "awardee": null,
  "description": "SOURCES SOUGHT NOTICE FOR NSN 4440-01-509-2722 ...",
  "noticeUrl": "https://sam.gov/opp/d3cbb9c998cf4559a06eb56672c4c8d3/view",
  "firstSeenAt": "2026-11-02T08:02:42.893Z"
}
```

Other fields: `baseType`, `postedDate`, `responseDeadlineDate`, `archiveDate`, `active`, `cgac`, `fpdsCode`, office city/state/ZIP/country, `setAside` (label), place-of-performance city/ZIP/country, `awardDate`, `awardeeWithheld`, `additionalInfoUrl`, `source`.

The run summary (key-value store record `OUTPUT`) shows the extract's last-modified time, posting window, rows scanned, matches, rows dropped per filter, awardees withheld and MB read.

### Pricing

Pay per event: **$0.005 per run start + $0.003 per notice delivered**. The default run (30 notices) costs about $0.095. Set a max charge per run in Apify to cap spend; the Actor stops delivering when the cap is reached.

### Data source, licence and notes

- Source: [SAM.gov Contract Opportunities data extract](https://sam.gov/data-services/Contract%20Opportunities/datagov?privacy=Public) (also listed on data.gov), published by the U.S. General Services Administration. U.S. Government works are in the public domain.
- This Actor is **not affiliated with or endorsed by GSA or SAM.gov**. Always confirm details, attachments and amendments on the official notice before bidding.
- The extract is rebuilt nightly (usually around 11:30 PM U.S. Eastern), so notices posted today appear in tomorrow's run. Each notice appears with its latest version; `postedAt` is the date of that version, and an amended notice is delivered again in `sinceLastRun` mode.
- Attachments, full descriptions and points of contact are available on the official notice page (`noticeUrl`).
- Awardee strings in the extract combine name and address; the Actor keeps the organisation name only and withholds names that look like individuals.

### FAQ

**Do I need a SAM.gov account or API key?** No.

**How fresh is it?** As fresh as SAM.gov's nightly public extract (the run summary shows its last-modified time).

**Can I get every open opportunity?** Yes: set `onlyOpen: true`, `lookbackDays: 90` and a high `maxItems`. Longer windows read more of the file (about 4 MB per business day).

**Why are contact names missing?** On purpose: points of contact are individuals. Use the official notice link to reach the contracting office.

# Actor input Schema

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

window (default): notices posted in the lookback window, no saved state. sinceLastRun: only notices (or new versions of notices) not delivered before for this State key; use this for daily schedules.

## `noticeKinds` (type: `array`):

Which SAM.gov notice types to return. The run splits Max notices fairly between the selected kinds.

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

Posting-date window, counted back from the newest posting day in today's SAM.gov extract (rebuilt nightly). Longer windows read more of the file (about 4 MB per business day).

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

NAICS prefixes, e.g. 541511, 5415, 236220, 2382. Empty = all.

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

Product Service Code prefixes, e.g. R4 (professional support), D3 (IT), Z2 (repair of buildings), 59 (electrical components). Empty = all.

## `setAsides` (type: `array`):

Exact SAM.gov set-aside codes, e.g. SBA, SBP, 8A, 8AN, HZC, SDVOSBC, WOSB, EDWOSB, VSA, ISBEE. Empty = all (including unrestricted).

## `smallBusinessOnly` (type: `boolean`):

Keep only notices with some set-aside (any code other than none).

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

Case-insensitive text matched against department, sub-tier, office and office code, e.g. 'veterans affairs', 'army', 'nasa', 'W912'.

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

2-letter USPS codes, e.g. CO, TX, VA, DC. Empty = all (including overseas and unspecified).

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

Keep notices whose title or description contains any of these words or phrases (word-start match, case-insensitive), e.g. 'janitorial', 'event', 'cybersecurity'.

## `excludeKeywords` (type: `array`):

Drop notices whose title or description contains any of these words.

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

Keep only notices with a response deadline in the future (drops awards, justifications and notices without a deadline).

## `minAwardAmount` (type: `integer`):

For award notices: keep awards of at least this amount. Notices without an amount are dropped when set (so combine with noticeKinds = award).

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

Maximum notices delivered (and charged) per run, newest first.

## `descriptionChars` (type: `integer`):

Characters of plain-text description kept (emails and phone numbers masked). 0 = no description.

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

Only for sinceLastRun: separate saved state per saved search, e.g. 'va-janitorial'.

## `maxDownloadMb` (type: `integer`):

Safety cap on how much of the ~210 MB extract a run may read. Default runs read under 5 MB.

## Actor input object example

```json
{
  "mode": "window",
  "noticeKinds": [
    "solicitation",
    "combined",
    "presolicitation",
    "sourcesSought",
    "award"
  ],
  "lookbackDays": 3,
  "naicsCodes": [],
  "pscCodes": [],
  "setAsides": [],
  "smallBusinessOnly": false,
  "agencies": [],
  "states": [],
  "keywords": [],
  "excludeKeywords": [],
  "onlyOpen": false,
  "maxItems": 30,
  "descriptionChars": 600,
  "stateKey": "default",
  "maxDownloadMb": 230
}
```

# Actor output Schema

## `notices` (type: `string`):

One record per SAM.gov contract opportunity notice.

## `summary` (type: `string`):

Window, rows scanned, filters dropped, awardees withheld.

# 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 = {
    "naicsCodes": [],
    "keywords": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("moment-data/sam-gov-opportunities-feed").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 = {
    "naicsCodes": [],
    "keywords": [],
}

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

```

## MCP server setup

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

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/p4tNODfHFr3NCOnYm/builds/rEtZa288AXsaIuvXD/openapi.json
