# SAM.gov Federal Contracts & RFPs Scraper (No API Key) (`flowery_bluebird_jay/sam-gov-contracts-scraper`) Actor

Extract live US federal contract opportunities, RFPs, NAICS/set-aside filters, Contracting Officer emails & phones, awardees, and RFP attachment download links from SAM.gov with ZERO API key required. Pay-Per-Event & AI Agent (MCP) ready.

- **URL**: https://apify.com/flowery_bluebird_jay/sam-gov-contracts-scraper.md
- **Developed by:** [方圆 方](https://apify.com/flowery_bluebird_jay) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 federal contract opportunity extracteds

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, RFPs & Contracting Officers (No API Key)

Extract live **US federal government contract opportunities, RFPs, solicitations, Contracting Officer emails & phone numbers, NAICS/PSC classifications, small-business set-asides, awardees, and direct RFP PDF attachment links** straight from **SAM.gov** — with **ZERO SAM.gov API key, zero cookies, and zero browser overhead**.

Built for **GovCon BD teams**, **federal capture managers**, **defense & IT contractors**, **sales intelligence pipelines (Clay / HubSpot / n8n / Make)**, and **AI Agents (Apify MCP ready)**.

***

### Why Use This Actor Instead of Official SAM.gov API Key Scrapers?

- **Zero API Key Required**: No waiting for SAM.gov account registration or rotating 90-day API keys. Click **Run** immediately with default inputs and get live federal RFPs in seconds.
- **Direct Contracting Officer Emails & Phones**: Enriches every opportunity with `primary_contact_name`, `primary_contact_email`, `primary_contact_phone`, and full `contacts[]` list ready for CRM import.
- **Direct RFP PDF & External Portal Links**: Captures every attached solicitation PDF/DOCX/XLSX (`attachments[]`) with direct SAM.gov download links and external Navy/DoD/agency bid links.
- **Multi-Value NAICS, Set-Aside & Notice Filters**: Properly supports comma-joined OR filters across multiple NAICS codes (`541511`, `541512`, `541519`), set-asides (`SBA`, `8A`, `SDVOSBC`, `WOSB`, `HZC`), and notice types (`o`, `k`, `p`, `r`, `s`, `a`).
- **Built-In Bid Urgency Scoring**: Computes `days_until_deadline` and `deadline_urgency` (`critical_lt_3d`, `urgent_lt_7d`, `soon_lt_14d`, `normal`, `expired`) for automated Slack/email alerts.

***

### Common Filter Reference

| Filter | Example Values |
|---|---|
| `naicsCodes` | `541511` (Custom Programming), `541512` (IT Systems Design), `541519` (Other IT), `541330` (Engineering), `541611` (Management Consulting) |
| `setAsideCodes` | `SBA` (Total Small Business), `8A` (8(a)), `SDVOSBC` (Service-Disabled Veteran-Owned), `WOSB` (Women-Owned), `HZC` (HUBZone) |
| `noticeTypes` | `o` (Solicitation), `k` (Combined Synopsis/Solicitation), `p` (Presolicitation), `r` (Sources Sought), `s` (Special Notice), `a` (Award Notice) |

***

### Sample Input

```json
{
  "keywords": "cybersecurity",
  "naicsCodes": ["541511", "541512", "541519"],
  "setAsideCodes": ["SBA", "8A"],
  "noticeTypes": ["o", "k"],
  "activeOnly": true,
  "sortBy": "-modifiedDate",
  "maxResults": 50,
  "includeFullDetailsAndContacts": true
}
```

***

### Sample Output

```json
{
  "opportunity_id": "d5412593e1ab4581ab785532ed247932",
  "solicitation_number": "N0010427QNA58",
  "title": "Enterprise Cloud Security Monitoring",
  "sam_url": "https://sam.gov/opp/d5412593e1ab4581ab785532ed247932/view",
  "notice_type_code": "o",
  "notice_type": "Solicitation",
  "is_active": true,
  "publish_date": "2026-11-23T13:57:53+00:00",
  "response_deadline": "2026-12-11T16:30:00-05:00",
  "days_until_deadline": 18.3,
  "deadline_urgency": "normal",
  "department": "DEPT OF DEFENSE",
  "agency": "DEPT OF THE NAVY",
  "office": "NAVSUP WEAPON SYSTEMS SUPPORT",
  "naics_primary": "541512",
  "naics_codes": ["541512"],
  "psc_code": "D310",
  "set_aside": "SBA",
  "primary_contact_name": "Jane Doe",
  "primary_contact_email": "jane.doe@us.navy.mil",
  "primary_contact_phone": "717-555-0198",
  "attachment_count": 2,
  "attachments": [
    {
      "name": "RFP_Statement_of_Work.pdf",
      "type": "file",
      "mime_type": ".pdf",
      "download_or_link_url": "https://sam.gov/api/prod/opps/v3/opportunities/resources/files/.../download"
    }
  ],
  "description": "Full plain-text solicitation scope and requirements..."
}
```

***

### Transparent Pay-Per-Event (PPE) Pricing

| Event Name | What You Get | Rate (USD) |
|---|---|---:|
| `apify-actor-start` | Actor run start (platform built-in) | `$0.005` |
| `opportunity-extracted` | Per SAM.gov federal contract opportunity extracted | `$0.005` (`$5 / 1K`) |
| `opportunity-enriched` | Full v2/v3 enrichment (Contracting Officer email/phone, NAICS/PSC, RFP attachment links) | `$0.003` (`$3 / 1K`) |

Set `includeFullDetailsAndContacts: false` if you only need ultra-fast search summaries at `$0.005 / opportunity`.

***

### Use with AI Agents & MCP

Connect this Actor to **Apify MCP Server** (`https://mcp.apify.com`) to let Claude, Cursor, ChatGPT, or n8n scan daily US federal RFPs by NAICS code, score bid fit against your capability statement, and extract Contracting Officer emails automatically.

# Actor input Schema

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

Keywords to search in SAM.gov opportunity titles and descriptions (leave empty to pull newest opportunities matching your NAICS/set-aside filters).

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

Filter by one or more 6-digit NAICS codes (e.g., 541511 Custom Programming, 541512 Computer Systems Design, 541519 Other IT, 541330 Engineering).

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

Filter by small business set-aside codes: SBA (Total Small Business), 8A (8(a)), SDVOSBC (SDVOSB), WOSB, EDWOSB, HZC (HUBZone).

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

SAM.gov notice type codes: o (Solicitation), k (Combined Synopsis/Solicitation), p (Presolicitation), r (Sources Sought), s (Special Notice), a (Award Notice).

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

When true, only returns currently active opportunities (is_active=true).

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

How SAM.gov sorts returned opportunities.

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

Maximum number of contract opportunities to return per run (up to 1,000).

## `includeFullDetailsAndContacts` (type: `boolean`):

Fetches full SAM.gov v2 detail + v3 resources for each opportunity to extract Contracting Officer emails, phone numbers, place of performance, NAICS/PSC, and direct RFP PDF attachment links.

## `requestDelayMs` (type: `integer`):

Polite delay between SAM.gov API calls.

## `proxyConfiguration` (type: `object`):

Optional Apify Proxy settings (not required for normal SAM.gov queries).

## Actor input object example

```json
{
  "keywords": "software",
  "naicsCodes": [],
  "setAsideCodes": [],
  "noticeTypes": [
    "o",
    "k"
  ],
  "activeOnly": true,
  "sortBy": "-modifiedDate",
  "maxResults": 10,
  "includeFullDetailsAndContacts": true,
  "requestDelayMs": 250,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

All extracted US federal contract opportunities in JSON, CSV, or Excel format.

# 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",
    "noticeTypes": [
        "o",
        "k"
    ]
};

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

# Run the Actor and wait for it to finish
run = client.actor("flowery_bluebird_jay/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",
  "noticeTypes": [
    "o",
    "k"
  ]
}' |
apify call flowery_bluebird_jay/sam-gov-contracts-scraper --silent --output-dataset

```

## MCP server setup

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