# SAM.gov Contract Opportunities Scraper (RFPs & Bids) (`lindenbyte/sam-gov-contract-opportunities`) Actor

Search US federal contract opportunities on SAM.gov by keyword, NAICS, PSC, set-aside, agency and notice type. Schedule for daily new-RFP alerts.

- **URL**: https://apify.com/lindenbyte/sam-gov-contract-opportunities.md
- **Developed by:** [Lindenbyte Studio](https://apify.com/lindenbyte) (community)
- **Categories:** Lead generation, Business
- **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 Scraper (RFPs & Bids)

Find US federal contract opportunities (RFPs, RFQs, solicitations, sources sought, pre-solicitations, awards) on **SAM.gov**. No API key and no SAM.gov account needed. Filter by keyword, NAICS, PSC, small-business set-aside, agency, state and notice type, and get clean JSON, CSV or Excel output.

Schedule it to run daily with `postedWithinDays = 1` and you have a **new-RFP alert** feed for your capture or business-development team.

### What can you do with it?

- **Daily RFP alerts:** schedule a daily run and send new opportunities to Slack, email, Google Sheets, Zapier, Make or n8n.
- **Pipeline building:** pull every open solicitation for your NAICS codes in one go and load it into your CRM.
- **Market research:** see which agencies buy what (by NAICS or PSC code), how often, and where.
- **Set-aside tracking:** watch 8(a), HUBZone, SDVOSB, WOSB and other small-business set-asides.
- **Award tracking:** include award notices to see who won and for how much.

### Input

| Field | Example | Notes |
|---|---|---|
| `keywords` | `cybersecurity`, `janitorial` | Each keyword is searched separately and duplicates are removed. Leave empty to list the newest notices. |
| `sortBy` | `newest` / `relevance` | `newest` for daily alerts, `relevance` for one-off research. |
| `strictKeywordMatch` | `true` (default) | Keep only notices whose title or description contains every word of the keyword (or the "quoted phrase"). Removes attachment/boilerplate-only matches. Set `false` for raw SAM.gov results. |
| `noticeTypes` | Solicitation, Sources Sought | Empty = all types. |
| `naicsCodes` | `541511`, `541512` | Matches any. |
| `pscCodes` | `DA01`, `R425` | Exact 4-character codes. |
| `setAside` | SBA, 8(a), HUBZone, SDVOSB, WOSB | Default: any. |
| `agency` | `DEPT OF DEFENSE` | Case-insensitive match on the agency/office hierarchy. |
| `state` | `VA` | Two-letter place-of-performance state. |
| `activeOnly` | `true` | Only opportunities still open for response. |
| `postedWithinDays` | `1` | 0 = no limit. |
| `maxResults` | `100` | Total cap across all keywords. |
| `includeDetails` | `true` | Adds description, place of performance and award data (about 2x slower). |

### Output example

One dataset item per opportunity:

```json
{
  "noticeId": "aa24db01da394428a78cf36bfa231546",
  "title": "RFI - CYBERSPACE OPERATIONS FORCES AND SUPPORT (COF) II",
  "solicitationNumber": "TRANSCOM26D001",
  "noticeType": "Sources Sought",
  "agency": "DEPT OF DEFENSE",
  "office": "USTRANSCOM-AQ",
  "agencyHierarchy": ["DEPT OF DEFENSE", "USTRANSCOM", "USTRANSCOM-AQ"],
  "postedDate": "2026-10-19T18:25:23+00:00",
  "responseDeadline": "2025-12-22T10:00:00-06:00",
  "naics": ["541513"],
  "psc": "DA01",
  "setAside": null,
  "placeOfPerformance": "Scott Air Force Base, IL, 62225, USA",
  "isActive": true,
  "description": "Cyberspace Operations Forces and Support ...",
  "url": "https://sam.gov/opp/aa24db01da394428a78cf36bfa231546/view",
  "awardAmount": null,
  "awardDate": null,
  "keyword": "cybersecurity",
  "scrapedAt": "2026-11-10T19:13:49.993Z"
}
```

Download the results as JSON, CSV, Excel or HTML from the Output tab, or fetch them with the Apify API.

### How to set up daily RFP alerts

1. Fill in your keywords / NAICS codes and set `postedWithinDays` to `1`.
2. Click **Save**, then **Schedule** and choose "Daily".
3. Under **Integrations**, add Slack, email, Google Sheets or a webhook (Zapier / Make / n8n) that fires when the run succeeds.
4. You get only the notices posted in the last 24 hours, every morning.

### Pricing

Pay per result: you are charged a small fee per opportunity returned plus a tiny fee per run. Set a maximum charge per run in the run options and the Actor stops cleanly when it reaches it. A daily alert run returning 20 opportunities costs a few cents.

### FAQ

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

**How fresh is the data?** Each run reads SAM.gov live, so results are as current as SAM.gov itself.

**Can I get attachments?** The output links to the notice page on SAM.gov, where the attachments are listed.

**Why did a keyword return off-topic notices?** SAM.gov full-text search also matches attachments and clauses. `strictKeywordMatch` (on by default) filters those out. If you turned it off, turn it back on, or add NAICS/PSC filters.

**Is personal data collected?** No. Point-of-contact names, emails and phone numbers are deliberately not collected.

### Notes

- Data is public US federal information from SAM.gov.
- Not affiliated with GSA or SAM.gov. Independent tool by Lindenbyte.
- Found a bug or need a field? Open an issue on the Actor's Issues tab.

# Actor input Schema

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

Search terms (each run separately, results de-duplicated). Leave empty to list the newest opportunities.

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

SAM.gov full-text search also matches attachments/clauses, so 'relevance' gives tighter keyword matches; 'newest' is best with a daily schedule.

## `strictKeywordMatch` (type: `boolean`):

SAM.gov full-text search also matches attachments and boilerplate clauses, so many hits never mention your keyword. When on, a result is kept only if every word of the keyword (or "quoted phrase") appears in its title or description. Turn off to get the raw SAM.gov results.

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

Filter by notice type. Empty = all.

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

e.g. 541511. Matches any.

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

Exact 4-character Product/Service codes, e.g. DA01, 1440, R425. Matches any.

## `setAside` (type: `string`):

Restrict to a small-business set-aside type.

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

Case-insensitive text matched against the agency/office hierarchy, e.g. 'DEPT OF DEFENSE'.

## `state` (type: `string`):

Two-letter US state, e.g. VA.

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

Only opportunities still open for response.

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

0 = no limit. Use 1 with a daily schedule for fresh RFP alerts.

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

Total cap across all keywords.

## `includeDetails` (type: `boolean`):

Fetches each notice's detail record (slower, about 2x requests). Turn off for fastest title-level lists.

## Actor input object example

```json
{
  "keywords": [
    "cybersecurity"
  ],
  "sortBy": "newest",
  "strictKeywordMatch": true,
  "setAside": "any",
  "activeOnly": true,
  "postedWithinDays": 0,
  "maxResults": 100,
  "includeDetails": true
}
```

# Actor output Schema

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

No description

# 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": [
        "cybersecurity"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("lindenbyte/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": ["cybersecurity"] }

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

```

## MCP server setup

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