# SAM.gov Contract Opportunities: Federal Bids & Awards (`plainfold/sam-gov-contract-opportunities`) Actor

Search U.S. federal contract opportunities from SAM.gov's official daily data extract: RFPs, solicitations, sources sought and award notices. Filter by keyword, NAICS, PSC, set-aside, agency, state and deadline, or monitor for new notices. No API key. $0.002/result + $0.002/run.

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

## Pricing

from $2.00 / 1,000 opportunity returneds

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: Federal Bids & Awards

### At a glance (for AI agents and developers)

- **What it does:** Returns U.S. federal contract opportunities (RFPs, solicitations, combined synopsis/solicitations, presolicitations, sources sought, special notices and award notices) as structured JSON, one row per opportunity. Data comes from SAM.gov's official nightly public extract, not from scraping the website.
- **When to use it:** Finding federal contracts to bid on, monitoring new SAM.gov notices on a schedule, filtering by NAICS/PSC code, set-aside (small business, 8(a), HUBZone, SDVOSB, WOSB), agency or state, or pulling award notices (who won what, for how much).
- **When not to use it:** State and local (SLED) bids, non-U.S. tenders, archived/inactive notices, attachment downloads, or historical spending data (use USAspending.gov for that).
- **Cost:** pay-per-event. **$0.002 per run** (at the default 1 GB memory) **+ $0.002 per opportunity returned**. 100 results is about $0.20; 500 results is about $1.00. Apify platform usage is included. Cap spend with `maxResults` (default 500) or a maximum cost per run.
- **Speed:** a typical run finishes in 20 to 60 seconds. Data refreshes nightly (about 03:30 UTC).
- **Auth:** no SAM.gov account or API key. AI agents can also run it without an Apify account through Apify's agentic payments (x402 or Skyfire).
- **No input is required.** Every filter is optional and filters combine with AND. An empty input returns the 500 most recently posted or updated active notices.
- **Keyword search is relevance-ranked and ignores boilerplate.** Keywords match the title, the official NAICS/PSC code descriptions, and the notice summary, not the FAR/DFARS clause text that every defense notice repeats. A search for `cybersecurity` won't return valve and circuit-card notices that only cite the CMMC clause. Each result says why it matched (`matchedIn`, `matchedKeywords`, `relevanceScore`), and results come back most relevant first by default.

**Example input** (open cybersecurity small-business set-asides, soonest deadline first):

```json
{
  "keywords": ["cybersecurity", "zero trust"],
  "naicsCodes": ["5415"],
  "setAsides": ["SBA", "SDVOSBC"],
  "onlyOpenForResponses": true,
  "sortBy": "deadlineAsc",
  "maxResults": 25
}
```

**Example output row** (shortened; full example below):

```json
{
  "title": "AN/BYG-1 Applications Re-Architecture",
  "solicitationNumber": "N0002426R6222",
  "noticeType": "Solicitation",
  "postedDate": "2026-10-07T21:48:11.000Z",
  "responseDeadline": "2026-11-05T21:00:00.000Z",
  "daysUntilDeadline": 28,
  "isOpenForResponses": true,
  "department": "DEPT OF DEFENSE",
  "subTier": "DEPT OF THE NAVY",
  "naicsCode": "334511",
  "naicsDescription": "Search, Detection, Navigation, Guidance, Aeronautical, and Nautical System and Instrument Manufacturing",
  "pscCode": "1260",
  "pscDescription": "FIRE CONTROL DESIGNATING AND INDICATING EQUIPMENT",
  "setAsideCode": "NONE",
  "award": null,
  "url": "https://sam.gov/opp/93fe497877d84b6eb061765bdb448793/view",
  "versionCount": 6,
  "relevanceScore": 2,
  "matchedIn": ["summary"],
  "matchedKeywords": ["software"]
}
```

### Overview

Find and monitor U.S. federal contract opportunities, including solicitations, sources sought, presolicitations, special notices, and award notices. Every run reads the **official SAM.gov Contract Opportunities public data extract**, so you don't need a SAM.gov account, an API key, or a scraper that breaks whenever the website changes.

Filter by keyword, NAICS, PSC, set-aside, agency, place of performance, posted date, and response deadline. Turn on **monitoring mode** to get only new or updated notices on a schedule. Export to JSON, CSV, Excel, or Google Sheets, or connect it to Slack, email, Zapier, Make, or your CRM.

### Why use this Actor?

- **Reliable by design.** It reads the daily file SAM.gov publishes for data sharing ([SAM.gov Data Services](https://sam.gov/data-services/Contract%20Opportunities/datagov?privacy=Public)). There are no browsers, cookies, or CAPTCHAs, and no undocumented endpoints that can change without notice.
- **No API key or rate limits.** A free personal SAM.gov API key allows only about **10 requests a day**. This Actor scans every active notice in each run, about 76,000 notice versions or 50,000 unique opportunities.
- **No duplicate amendments.** SAM.gov lists every amendment as a separate notice, so roughly 40% of the raw file is older versions. You get one row per opportunity, the latest version, with a `versionCount`.
- **Fast and cheap.** A filtered search usually finishes in **under 30 seconds**.
- **Built for bid and no-bid decisions.** Every result includes days until the deadline, a plain-language set-aside, NAICS and PSC codes with their official descriptions, place of performance, award amount and awardee, and a direct SAM.gov link.
- **Keyword results you can trust.** Boilerplate clause text is stripped before matching, and results are ranked by where the keyword appears (title first, then code descriptions, then summary).
- **Monitoring mode.** Schedule it daily and get only what's new or amended since the last run, so you only pay for new results.

### Who is it for?

- Government contractors and BD teams building a pipeline
- Proposal writers and capture managers watching specific agencies or NAICS codes
- Small businesses looking for SBA, 8(a), HUBZone, SDVOSB, or WOSB set-asides
- Market researchers and competitive intelligence analysts tracking awards and awardees
- GovCon newsletters, alert services, and AI agents that need clean federal opportunity data

### What data do you get?

| Field | Example |
|---|---|
| `title`, `solicitationNumber`, `noticeType` | "Excitation System Replacement, Beaver Dam", "W9127S27RA014", "Presolicitation" |
| `postedDate`, `responseDeadline`, `daysUntilDeadline`, `isOpenForResponses` | `2026-10-07T18:50:14.000Z`, `2026-10-21T18:00:00.000Z`, `13`, `true` |
| `department`, `subTier`, `office` | DEPT OF DEFENSE / DEPT OF THE ARMY / W076 ENDIST LITTLE ROCK |
| `naicsCode`, `pscCode` | `335312`, `Z2MD` |
| `naicsDescription`, `pscDescription` | "Motor and Generator Manufacturing", "REPAIR OR ALTERATION OF EPG FACILITIES - HYDRO" |
| `setAsideCode`, `setAside` | `SBA`, "Small Business Set Aside - Total" |
| `placeOfPerformance` | street, city, state, zip, country |
| `award` | award number, date, amount (USD), awardee (award notices) |
| `url`, `additionalInfoLink` | Direct link to the notice on SAM.gov |
| `description` | Plain-text notice description (optional, length configurable) |
| `contractingContacts` | Government point of contact (optional, off by default) |
| `versionCount` | How many versions (original + amendments) SAM.gov has published |
| `changeType` | `new` or `updated` (monitoring mode only) |
| `relevanceScore`, `matchedIn`, `matchedKeywords` | `10`, `["title"]`, `["cybersecurity"]` (keyword searches only) |

### How to use it

1. Click **Try for free**.
2. Enter keywords (for example `cybersecurity`, `janitorial`, `"cloud migration"`) and/or pick NAICS codes, set-asides, and notice types.
3. Optional: limit to notices **open for responses**, due within N days, or posted in the last N days.
4. Click **Start**. Results appear in the Output tab within seconds. Use the **Overview** or **Awards** view, or export the data.
5. To get alerts, turn on **Only new since last run**, give the monitor a name, and add a **Schedule** (daily is ideal, since SAM.gov refreshes the file every night). Connect a Slack, email, or webhook integration to receive new notices automatically.

#### Input example

```json
{
  "keywords": ["cybersecurity", "zero trust"],
  "naicsCodes": ["5415"],
  "setAsides": ["SBA", "SDVOSBC"],
  "onlyOpenForResponses": true,
  "postedWithinDays": 14,
  "sortBy": "deadlineAsc",
  "maxResults": 200
}
```

Tips:

- NAICS and PSC filters accept **prefixes**. `5415` covers every computer systems design code, and `Z2` covers all building repair and alteration codes.
- Keywords match **whole words and phrases**, so `AI` won't match "maintain".
- By default keywords are matched in the **title, NAICS/PSC code descriptions and summary** (the description with FAR/DFARS clauses and standard compliance text removed). Use **Title only** for the tightest results, or **Everything** (`"searchIn": "fullText"`) to also search the raw clause text.
- Results are sorted **most relevant first** by default: a keyword in the title scores 10, in a NAICS/PSC description 5, in the summary 2. Set `sortBy` to `postedDateDesc` or `deadlineAsc` to change the order.
- **Agencies** matches any part of the department, sub-tier, or office name, for example `VETERANS AFFAIRS`, `NAVFAC`, or `GENERAL SERVICES ADMINISTRATION`.
- For award intelligence, set **Notice types** to `Award Notice` and use **Minimum award amount**. Multiple-award contracts keep one row per awardee.
- Filters are checked against the **latest version** of each notice. To get every version as its own row, turn off **Only the latest version of each notice**.

#### Output example

This is a real result from a platform test run on Oct 7, 2026, with the description shortened:

```json
{
  "noticeId": "93fe497877d84b6eb061765bdb448793",
  "title": "AN/BYG-1 Applications Re-Architecture",
  "solicitationNumber": "N0002426R6222",
  "noticeType": "Solicitation",
  "baseNoticeType": "Solicitation",
  "postedDate": "2026-10-07T21:48:11.000Z",
  "responseDeadline": "2026-11-05T21:00:00.000Z",
  "responseDeadlineOriginal": "2026-11-05T16:00:00-05:00",
  "daysUntilDeadline": 28,
  "isOpenForResponses": true,
  "archiveDate": "2027-02-01",
  "department": "DEPT OF DEFENSE",
  "subTier": "DEPT OF THE NAVY",
  "office": "NAVSEA HQ",
  "officeCity": "WASHINGTON NAVY YARD",
  "officeState": "DC",
  "naicsCode": "334511",
  "pscCode": "1260",
  "setAsideCode": "NONE",
  "setAside": "No Set aside used",
  "placeOfPerformance": {
    "streetAddress": "Team Submarine 1333 Isaac Hull Avenue SEWashington Navy Yard, DC  20376",
    "city": null,
    "state": null,
    "zip": "20376",
    "country": "USA"
  },
  "award": null,
  "url": "https://sam.gov/opp/93fe497877d84b6eb061765bdb448793/view",
  "additionalInfoLink": null,
  "description": "NOTE: On 7 October 2026,Solicitation Amendment 003 was published in the E-TIC portal, including a revised solicitation and a revised Section L. NOTE: On 22 September 2026,Solicitation Amendment 002 wa…",
  "versionCount": 6
}
```

Each run also saves a `SUMMARY` record in the run's key-value store. It records when SAM.gov published the file, how many notices were scanned, matched, and delivered, and how many were new or updated in monitoring mode.

### Pricing

This Actor uses **pay-per-event** pricing, and Apify platform usage is included:

- **$0.002 per run**, which covers downloading and scanning the full SAM.gov file
- **$2.00 per 1,000 opportunities** delivered ($0.002 per result)

Some examples:

- A daily monitor that returns 20 new notices costs about **$0.04 per day**, or roughly $1.30 a month.
- A 500-result search costs about **$1.00**.
- A monitoring run that finds nothing new costs **$0.002**.

Set **Max results** or a maximum cost per run to stay on budget. The Actor stops cleanly when your budget is reached.

### FAQ

**How fresh is the data?**
SAM.gov regenerates the public extract every night, at about 03:30 UTC. Results reflect the latest file, so notices posted today appear in tomorrow morning's run. The `SUMMARY` record shows the exact publish time.

**Why are there fewer results than on the SAM.gov website?**
SAM.gov's own search shows every amendment as a separate notice. This Actor merges them and returns the latest version, unless you turn that off.

**Does it include inactive or archived notices?**
No. The extract covers notices that are currently **active** on SAM.gov, including award notices that haven't been archived yet.

**Does it download attachments?**
No. Each result links to the notice on SAM.gov, where attachments and amendments are listed.

**Why don't some notices match my state filter?**
Many notices don't list a place of performance. Those are excluded when you filter by state. Try agency or keyword filters instead.

**Is this legal? Does it scrape SAM.gov?**
It doesn't scrape SAM.gov. It downloads the public Contract Opportunities extract that SAM.gov publishes on its Data Services page "to promote data sharing". The data is public U.S. government information. You're still responsible for using it in line with SAM.gov's terms and applicable law. Contracting-officer contact details are off by default. If you turn them on, use them only to respond to the opportunity, not for unrelated marketing.

**Can I use it from my own code or an AI agent?**
Yes. Call it through the Apify API, the JavaScript or Python client, or Apify's MCP server, and read the results from the run's dataset. In an MCP client (Claude, Cursor, VS Code and others), connect `https://mcp.apify.com/?actors=plainfold/sam-gov-contract-opportunities` and the Actor appears as the tool `plainfold--sam-gov-contract-opportunities`. Agents without an Apify account can pay per run with x402 (USDC on Base) or Skyfire. For a synchronous call that returns the rows directly, use `POST https://api.apify.com/v2/acts/plainfold~sam-gov-contract-opportunities/run-sync-get-dataset-items`.

### Support

Found a bug or want a feature, like more fields, attachments, or other procurement portals? Open an issue on the Actor's **Issues** tab and we'll respond quickly.

# Actor input Schema

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

Words or phrases to search for, e.g. \["cybersecurity", "zero trust"] or \["office furniture"]. Case-insensitive whole-word match, so "AI" won't match "maintain". By default keywords are matched in the title, the official NAICS and PSC code descriptions, and the notice summary (description with boilerplate FAR/DFARS clause text removed), so a parts notice that only cites a cybersecurity clause is not returned. Each result gets relevanceScore, matchedIn and matchedKeywords. Default: \[] (no keyword filter, so every notice that passes the other filters is returned).

## `keywordMatch` (type: `string`):

"any" returns notices containing at least one keyword; "all" returns only notices containing every keyword. Default: "any".

## `searchIn` (type: `string`):

Where keywords are matched. "titleAndDescription" (recommended): title, official NAICS/PSC code descriptions, and the first ~2,000 characters of the description after removing boilerplate FAR/DFARS clauses and standard compliance text. "title": title only (fewest, most precise results). "fullText": also searches the complete raw description including clause text (broadest; expect unrelated notices that only cite a clause). Default: "titleAndDescription".

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

Skip notices that mention any of these words or phrases (matched in the same places as keywords, per searchIn), e.g. \["construction", "janitorial"]. Default: \[].

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

NAICS industry codes, full or prefix, e.g. \["541512"] or \["5415"] (prefix "5415" matches 541511, 541512, 541519 and so on). A notice matches if its NAICS code starts with any entry. Default: \[] (all industries).

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

Product Service Codes (PSC), full or prefix, e.g. \["D3"] for IT services, \["Z2"] for building repair, \["R4"] for professional support. A notice matches if its PSC starts with any entry. Default: \[] (all PSCs).

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

Only return notices with one of these set-aside codes, e.g. \["SBA"] for total small business, \["8A"], \["HZC"] for HUBZone, \["SDVOSBC"] for service-disabled veteran-owned, \["WOSB"]. Use \["NONE"] for full and open competition. Default: \[] (any set-aside).

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

Only return these notice types, e.g. \["Solicitation", "Combined Synopsis/Solicitation"] for biddable opportunities, \["Sources Sought", "Presolicitation"] for early pipeline, or \["Award Notice"] to see who won what. Default: \[] (all types).

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

Case-insensitive text matched anywhere in the department, sub-tier or office name, e.g. \["VETERANS AFFAIRS"], \["NAVFAC"], \["GENERAL SERVICES ADMINISTRATION"], \["ARMY"]. Default: \[] (all agencies).

## `placeOfPerformanceStates` (type: `array`):

Two-letter U.S. state codes for the place of performance, e.g. \["TX", "VA"]. Many notices don't list a place of performance, and those are excluded when this filter is used. Default: \[] (no state filter).

## `postedWithinDays` (type: `integer`):

Only notices posted or updated in the last N days, e.g. 7 for the past week or 1 for a daily check. 0 means no limit. Default: 0.

## `postedAfter` (type: `string`):

Only notices posted on or after this date, format YYYY-MM-DD, e.g. "2026-10-01". Default: no date limit.

## `onlyOpenForResponses` (type: `boolean`):

If true, only notices whose response deadline is still in the future (biddable now). Notices without a deadline, including most award notices, are excluded. Default: false.

## `deadlineWithinDays` (type: `integer`):

Only notices whose response deadline falls within the next N days, e.g. 14. 0 means no limit. Default: 0.

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

For award notices: only awards of at least this many U.S. dollars, e.g. 1000000 for $1M+. 0 means no limit. Notices without an award amount are excluded when this is set. Default: 0.

## `onlyNewSinceLastRun` (type: `boolean`):

Monitoring mode for scheduled runs: return only notices this monitor (see monitorName) hasn't delivered before, so you pay only for new results. The first run returns everything that matches. Default: false.

## `monitorName` (type: `string`):

Name of the monitoring memory used when onlyNewSinceLastRun is true, e.g. "va-cyber-daily". Use a different name for each saved search. Default: "default".

## `includeUpdatedNotices` (type: `boolean`):

In monitoring mode, also return notices that were amended or re-posted since this monitor last delivered them (marked changeType = "updated"). Default: true.

## `includeDescription` (type: `boolean`):

Include the notice description as plain text in each result. Set false for smaller, cheaper-to-process output. Default: true.

## `descriptionMaxLength` (type: `integer`):

Trim each description to this many characters, e.g. 500 for short summaries. 0 means the full text (SAM.gov caps it at about 32,000). Default: 2000.

## `includeContacts` (type: `boolean`):

Add the government point(s) of contact listed on each notice (name, work email, work phone). Default: false.

## `latestVersionOnly` (type: `boolean`):

SAM.gov lists every amendment as a separate notice (about 40% of raw rows are older versions). If true, you get one result per opportunity (the latest version) with a versionCount, and filters apply to that version. If false, every version is its own row. Default: true.

## `sortBy` (type: `string`):

Result order. "relevance" (default): best keyword matches first (keyword in title > NAICS/PSC description > summary), ties broken newest first; with no keywords this is the same as newest first. "postedDateDesc": newest first. "deadlineAsc": soonest response deadline first (notices without a deadline last). Default: "relevance".

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

Maximum number of results to return; each result costs $0.002, so 100 results is about $0.20. 0 means no limit (a full export is about 50,000 unique opportunities). Default: 500.

## Actor input object example

```json
{
  "keywords": [
    "software"
  ],
  "keywordMatch": "any",
  "searchIn": "titleAndDescription",
  "excludeKeywords": [],
  "naicsCodes": [],
  "pscCodes": [],
  "setAsides": [],
  "noticeTypes": [],
  "agencies": [],
  "placeOfPerformanceStates": [],
  "postedWithinDays": 7,
  "onlyOpenForResponses": false,
  "deadlineWithinDays": 0,
  "minAwardAmount": 0,
  "onlyNewSinceLastRun": false,
  "monitorName": "default",
  "includeUpdatedNotices": true,
  "includeDescription": true,
  "descriptionMaxLength": 2000,
  "includeContacts": false,
  "latestVersionOnly": true,
  "sortBy": "relevance",
  "maxResults": 100
}
```

# Actor output Schema

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

All matching SAM.gov opportunities in the default dataset (Overview view selected by default).

# 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"
    ],
    "postedWithinDays": 7,
    "maxResults": 100
};

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

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

```

## MCP server setup

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