# SAM.gov Federal Contracts Scraper: RFPs, Bids & Contacts (`mystique-lab/sam-gov-contracts-scraper`) Actor

Export US federal & government contract opportunities, RFPs, solicitations, sources sought and awards from SAM.gov: solicitation number, agency, NAICS, PSC, set-aside, deadline, Contracting Officer email/phone, description and attachments. No API key or proxy. $1.50 per 1,000 results.

- **URL**: https://apify.com/mystique-lab/sam-gov-contracts-scraper.md
- **Developed by:** [Mystique Lab](https://apify.com/mystique-lab) (community)
- **Categories:** Lead generation, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.50 / 1,000 contract opportunities

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 Federal Contracts Scraper: RFPs, Bids & Contacts

Export live US federal contract opportunities, solicitations, presolicitations, sources sought and award notices directly from SAM.gov. Every record includes the notice ID, solicitation number, federal department, agency/sub-tier, contracting office, NAICS code, PSC code, small business set-aside, response deadline, Contracting Officer name/email/phone, full plain-text description and direct attachment download links.

No SAM.gov API key, login or proxy needed.

**Price: $1.50 per 1,000 results. No start fee.** You only pay for contract opportunities saved.

### What you can use it for

- **GovCon BD & capture teams:** monitor new federal RFPs, RFQs, Sources Sought and Combined Synopsis/Solicitations across your exact NAICS and PSC codes every day.
- **Small business set-aside hunting:** filter specifically for Total Small Business (`SBA`), 8(a) (`8A`), Service-Disabled Veteran-Owned (`SDVOSBC`), Women-Owned (`WOSB`) or HUBZone (`HZC`) opportunities.
- **Subcontracting & B2B sales outreach:** extract Contracting Officer emails, phone numbers, and awardee names/UEIs from active solicitations and recent contract awards.
- **Construction, IT & R\&D bid alerts:** pipe daily federal bids into Slack, HubSpot, Salesforce, Airtable, Make or n8n.

### Input

| Field | What it does | Default |
|---|---|---|
| Search keywords or solicitation number | Optional keywords, phrase or solicitation number (e.g. `cloud cybersecurity`, `waterproofing`, `HVAC`). Leave empty for all. | empty |
| NAICS codes | Optional 6-digit NAICS codes, e.g. `["541511", "541512"]` (IT/software), `["236220", "238220"]` (construction/HVAC), `["541715"]` (R\&D). | `[]` |
| PSC / Federal classification codes | Optional Product Service Codes (PSC), e.g. `["D302", "R425", "J041"]`. | `[]` |
| Notice types | Filter by notice type: `o` (Solicitation), `k` (Combined Synopsis/Solicitation), `p` (Presolicitation), `r` (Sources Sought), `a` (Award Notice), `s` (Special Notice). | all |
| Small business set-aside codes | Filter by set-aside: `SBA`, `SBP`, `8A`, `8AN`, `SDVOSBC`, `SDVOSBS`, `WOSB`, `EDWOSB`, `HZC`, `HZS`. | all |
| Federal department or agency filter | Department shortcut (`DOD`, `VA`, `DHS`, `HHS`, `GSA`, `NASA`, `DOE`, `DOC`, `USDA`, `DOJ`, `TREASURY`, `DOI`, `STATE`), agency name, or SAM organization ID. | all |
| Place of performance states | Optional 2-letter US state codes, e.g. `["VA", "MD", "CA", "TX"]`. | `[]` |
| Active opportunities only | Keep only currently active opportunities (`true` by default). | `true` |
| Posted or modified within days | Keep only opportunities posted or updated in the last N days (e.g. `7`). `0` disables date filtering. | `0` |
| Posted / modified from & to date | Optional exact date range in `YYYY-MM-DD` format. | empty |
| Include attachment & resource download links | Fetch direct download URLs for solicitation PDFs, SOWs, RFPs and external PIEE links. | `true` |
| Max results | Stop after saving this many contract opportunities. | `25` |

### Output example

```json
{
  "type": "contract",
  "noticeId": "e00100333b8345f3a4afc5a6bb66cb75",
  "title": "HVAC Unit Replacement",
  "solicitationNumber": "1305M327Q0010",
  "department": "COMMERCE, DEPARTMENT OF",
  "subTier": "NATIONAL OCEANIC AND ATMOSPHERIC ADMINISTRATION",
  "office": "DEPT OF COMMERCE NOAA",
  "noticeType": "Combined Synopsis/Solicitation",
  "baseType": "k",
  "setAside": "Total Small Business Set-Aside (FAR 19.5)",
  "setAsideCode": "SBA",
  "naicsCode": "238220",
  "naicsCodes": ["238220"],
  "classificationCode": "J041",
  "postedDate": "2026-10-24T02:13:30.420+00:00",
  "modifiedDate": "2026-10-24T02:13:30.420+00:00",
  "responseDeadLine": "2026-11-20T14:00:00-08:00",
  "responseTimeZone": "America/Los_Angeles",
  "archiveDate": "2026-12-05",
  "active": true,
  "primaryContactName": "HUCKLEBY, JACK",
  "primaryContactEmail": "JACK.HUCKLEBY@NOAA.GOV",
  "primaryContactPhone": null,
  "pointOfContact": [
    {
      "type": "primary",
      "fullName": "HUCKLEBY, JACK",
      "title": null,
      "email": "JACK.HUCKLEBY@NOAA.GOV",
      "phone": null,
      "fax": null
    }
  ],
  "placeOfPerformance": {
    "streetAddress": null,
    "city": "Seattle",
    "state": "WA",
    "stateName": "Washington",
    "zip": "98115",
    "country": "USA"
  },
  "officeAddress": {
    "streetAddress": "WESTERN ACQUISITION DIVISION",
    "streetAddress2": "7600 SAND POINT WAY NE BLDG 1,",
    "city": "SEATTLE",
    "state": "WA",
    "zip": "98115",
    "country": "USA"
  },
  "award": null,
  "descriptionText": "HVAC Unit Replacement...",
  "resourceLinks": [
    "https://sam.gov/api/prod/opps/v3/opportunities/resources/files/2395e0fc39e7460fa15b2c9d7ffb728e/download?api_key=null&token="
  ],
  "uiLink": "https://sam.gov/opp/e00100333b8345f3a4afc5a6bb66cb75/view",
  "scrapedAt": "2026-10-24T02:20:00.000Z"
}
```

### FAQ

**Does it need a SAM.gov API key or login?** No. SAM.gov's official public API caps unauthenticated keys at 10 requests per day, whereas this scraper reads SAM.gov's public opportunity endpoints directly with no API key and no daily cap.

**How fast is it?** Usually about 25 opportunities in 6 to 10 seconds, and 1,000 opportunities in 3 to 5 minutes. Turn off `includeAttachments` if you only need notice details and contacts for even faster runs.

**How does the price compare?** Other SAM.gov scrapers on Apify charge $2.50 to $3.00 per 1,000 results (often with a per-run start fee) or fail on 85%+ of runs. This scraper costs **$1.50 per 1,000 results with $0 start fee** and runs on 256 MB memory.

***

### Copy-Paste Scheduled Automation (Python / n8n / cURL)

Automate daily or weekly data feeds into your CRM (HubSpot, Salesforce, Clay, Google Sheets, or Slack) in under 60 seconds:

#### 1. cURL (REST API — Instant JSON / CSV Export)

```bash
curl -X POST "https://api.apify.com/v2/acts/mystique-lab~sam-gov-contracts-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN&format=json" \
  -H "Content-Type: application/json" \
  -d '{"naicsCodes": ["541511", "541512"], "activeOnly": true, "includeAttachments": true, "maxResults": 100}'
```

*(Tip: Change `format=json` to `format=csv` or `format=xlsx` to download a spreadsheet directly.)*

#### 2. Python (`apify-client`)

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("mystique-lab/sam-gov-contracts-scraper").call(
    run_input={"naicsCodes": ["541511", "541512"], "activeOnly": true, "includeAttachments": true, "maxResults": 100}
)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

#### 3. n8n / Make.com / Zapier (Daily Cron Webhook)

1. Add a **Schedule Trigger** node (e.g., every morning at `07:00 AM`).
2. Add an **HTTP Request** node:
   - **Method:** `POST`
   - **URL:** `https://api.apify.com/v2/acts/mystique-lab~sam-gov-contracts-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN`
   - **Body (JSON):** `{"naicsCodes": ["541511", "541512"], "activeOnly": true, "includeAttachments": true, "maxResults": 100}`
3. Pipe the returned JSON array directly into **HubSpot**, **Clay**, **Instantly.ai**, **Smartlead**, **Airtable**, or **Google Sheets**.

***

> **Want a Done-For-You Excel/CSV Lead Export without coding?**
>
> - **[$14 Ready-to-Open 2026 YC Startups & SEC Form D Funded B2B Lead Pack (.XLSX + .CSV — 720 Verified Leads)](https://mystiquelabshop.gumroad.com/l/free-starter-pack)** *(360 active YC 2025–2026 startups & 795 founders with LinkedIn/X + 360 newly funded SEC Form D operating companies with executive contacts & phones)*
> - **[$39 Done-For-You Custom B2B Lead Export (24-Hour Delivery)](https://mystiquelabshop.gumroad.com/l/free-starter-pack)** — tell us your exact niche, state, industry, or filters and receive a clean, verified `.XLSX` + `.CSV` spreadsheet in 24 hours (also available via our [Client Proposal & Scope Kit](https://mystiquelabshop.gumroad.com/l/client-proposal-scope-kit) and [BFCM Promo & Margin Kit](https://mystiquelabshop.gumroad.com/l/bfcm-promo-margin-kit)).
> - **Promo Code:** Use code **`LAUNCH2`** at checkout for **$2 OFF** on **[MYSTIQUE LAB Gumroad](https://mystiquelabshop.gumroad.com/l/free-starter-pack)** ([storefront](https://mystiquelabshop.gumroad.com)).

# Actor input Schema

## `keywords` (type: `string`):

Optional keywords, phrase, or solicitation number to search inside SAM.gov opportunities (e.g. "cloud cybersecurity", "waterproofing", "AI"). Leave empty to match all.

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

Optional 6-digit NAICS industry codes to filter by (e.g. \["541511", "541512"] for custom software & systems design, \["236220"] for commercial building construction, \["541715"] for R\&D).

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

Optional Product Service Codes (PSC) to filter by (e.g. \["D302", "R425", "J041"]).

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

Optional SAM.gov notice types to include: o = Solicitation, k = Combined Synopsis/Solicitation, p = Presolicitation, r = Sources Sought, a = Award Notice, s = Special Notice, u = Justification. Leave empty for all notice types.

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

Optional set-aside codes to filter by: SBA (Total Small Business), SBP (Partial Small Business), 8A (8(a) Competed), 8AN (8(a) Sole Source), SDVOSBC (Service-Disabled Veteran-Owned SB), SDVOSBS (SDVOSB Sole Source), WOSB (Women-Owned SB), EDWOSB (Economically Disadvantaged WOSB), HZC (HUBZone), HZS (HUBZone Sole Source). Leave empty for all.

## `organization` (type: `string`):

Optional department name, agency abbreviation, or SAM organization ID (e.g. "DOD", "VA", "DHS", "HHS", "GSA", "NASA", "DOE", "COMMERCE", or "100000000").

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

Optional 2-letter US state codes for place of performance (e.g. \["CA", "VA", "MD", "TX"]). Leave empty for all locations.

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

When enabled (default), only returns currently active contract opportunities.

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

Optional filter to keep only opportunities posted or modified within the last N days (e.g. 7, 14, 30). Set to 0 to disable date filtering.

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

Optional start date in YYYY-MM-DD format.

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

Optional end date in YYYY-MM-DD format.

## `includeAttachments` (type: `boolean`):

When enabled (default), fetches the full list of solicitation PDFs, SOW documents, and external links for each opportunity.

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

Maximum number of matching contract opportunities to save.

## Actor input object example

```json
{
  "keywords": "software",
  "naicsCodes": [],
  "pscCodes": [],
  "noticeTypes": [],
  "setAsideCodes": [],
  "states": [],
  "activeOnly": true,
  "postedWithinDays": 0,
  "includeAttachments": true,
  "maxResults": 25
}
```

# Actor output Schema

## `opportunities` (type: `string`):

No description

## `summary` (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": "software",
    "maxResults": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("mystique-lab/sam-gov-contracts-scraper").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": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("mystique-lab/sam-gov-contracts-scraper").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": 25
}' |
apify call mystique-lab/sam-gov-contracts-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,mystique-lab/sam-gov-contracts-scraper"
        }
    }
}
```

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/OhytTXI7cdXTxElmw/builds/co7D3ASuneaKYyUKN/openapi.json
