# SAM.gov Federal Contract Opportunities & RFPs Scraper (`jaiveda/samgov-rfp-scraper`) Actor

Extract US federal government contract opportunities, solicitations, RFPs, and awards directly from SAM.gov without API keys. Filter by keywords, NAICS industry codes, notice types, and extract Contracting Officer contact info.

- **URL**: https://apify.com/jaiveda/samgov-rfp-scraper.md
- **Developed by:** [Bhavadharini](https://apify.com/jaiveda) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 Contract Opportunities & RFPs Scraper

Extract active US federal government contract opportunities, solicitations, requests for proposals (RFPs), pre-solicitations, and awards directly from [SAM.gov](https://sam.gov) — **without requiring official SAM.gov API keys or registration credentials**.

***

### 🎯 Key Features & Capabilities

- **Zero-Setup Federal Contract Intelligence:** Access over 5.6M federal procurement records directly without waiting for API keys or agency approval.
- **Granular Search Filters:** Filter by keyword (e.g. `cybersecurity`, `cloud migration`, `janitorial`), NAICS industry codes (e.g. `541512`), notice types, and active-only status.
- **Contracting Officer Contact Intel:** Extracts verified Contracting Officer and Contract Specialist names, emails, and direct phone numbers for outbound B2G outreach.
- **Set-Aside & Procurement Details:** Captures small business set-asides (`SBA`, `8(a)`, `HUBZone`, `SDVOSB`, `WOSB`), place of performance (city, state, zip), and response deadlines.
- **Complete Scope of Work:** Automatically cleans HTML descriptions into clear, readable procurement summaries ready for LLMs or CRM pipelines.

***

### 💼 Commercial Use Cases

- **GovCon Business Development:** Monitor upcoming RFPs and solicitations matching your company's core NAICS codes and capabilities before competitors.
- **Subcontractor & Supplier Teaming:** Identify prime contract opportunities early to reach out to prime contractors or agency buyers.
- **B2G Outbound Lead Generation:** Build targeted contact lists of federal contracting officers and agency program managers with verified `.gov` and `.mil` emails.
- **Competitive Bid Tracking:** Monitor award notices and contract modifications to track competitor win rates and agency spending patterns.

***

### 📥 Input Parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `searchQuery` | String | `""` | Search keyword(s) matching title or description (e.g., `cybersecurity`, `cloud`, `AI`, `construction`). |
| `noticeTypes` | Array | `["o", "k", "p"]` | Notice types: `o` (Solicitation), `k` (Combined Synopsis), `p` (Presolicitation), `r` (Sources Sought), `s` (Special Notice), `a` (Award Notice). |
| `naicsCode` | String | `""` | 6-digit NAICS industry classification code (e.g., `541512` for Computer Systems Design). |
| `activeOnly` | Boolean | `true` | Only retrieve active opportunities currently accepting bids or open for submissions. |
| `fetchDetails` | Boolean | `true` | Enriches each opportunity with Contracting Officer contacts, set-aside types, and place of performance. |
| `maxItems` | Integer | `20` | Maximum number of opportunities to extract (1 to 500). |

***

### 📤 Output Dataset Format

Each item pushed to the Apify dataset contains:

```json
{
  "noticeId": "6636e81454f44ba2a3b714f838a3177f",
  "title": "Level II-Armed Protective Security Officers Indiana",
  "solicitationNumber": "70FBR527Q00000001",
  "noticeType": "Solicitation",
  "noticeTypeCode": "o",
  "isActive": true,
  "url": "https://sam.gov/opp/6636e81454f44ba2a3b714f838a3177f/view",
  "postedDate": "2026-10-02T23:56:54+00:00",
  "lastModifiedDate": "2026-10-02T23:56:54+00:00",
  "responseDeadline": "2026-10-14T12:00:00-04:00",
  "responseDeadlineTimeZone": "America/New_York",
  "department": "HOMELAND SECURITY, DEPARTMENT OF",
  "agency": "FEDERAL EMERGENCY MANAGEMENT AGENCY",
  "office": "REGION 5",
  "description": "The Federal Emergency Management Agency (FEMA), Office of Chief Security Officer is seeking qualified security guard contractors...",
  "pointOfContacts": [
    {
      "name": "Marvin Jennings",
      "email": "marvin.r.jennings@fema.dhs.gov",
      "phone": "",
      "title": null,
      "type": "primary"
    }
  ],
  "placeOfPerformance": {
    "city": "Fishers",
    "state": "IN",
    "zip": "46037",
    "country": "UNITED STATES"
  },
  "setAside": "SBA",
  "naicsCodes": ["561612"],
  "classificationCode": "S206",
  "awardeeName": null,
  "awardeeUEI": null
}
```

***

### 🚀 How to Run Locally

```bash
cd samgov-rfp-scraper
python -m src.main
```

# Actor input Schema

## `searchQuery` (type: `string`):

Keywords to match in solicitation title or description (e.g. 'cybersecurity', 'cloud migration', 'janitorial', 'AI', 'construction'). Leave empty to pull all latest opportunities.

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

Select which notice types to retrieve.

## `naicsCode` (type: `string`):

Optional 6-digit NAICS code to target a specific industry (e.g. '541512' for Computer Systems Design, '561612' for Security Guards, '236220' for Commercial Building Construction).

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

If enabled, only fetches active bids currently accepting responses or open for submissions.

## `fetchDetails` (type: `boolean`):

If enabled, visits each opportunity record to extract Contracting Officer emails, phone numbers, set-aside categories, and place of performance.

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

Maximum number of opportunities to retrieve in this run.

## Actor input object example

```json
{
  "searchQuery": "cybersecurity",
  "noticeTypes": [
    "o",
    "k",
    "p"
  ],
  "naicsCode": "",
  "activeOnly": true,
  "fetchDetails": true,
  "maxItems": 20
}
```

# Actor output Schema

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

Federal contract opportunities, solicitations, RFPs, Contracting Officer emails, and small business set-asides.

# 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 = {
    "searchQuery": "cybersecurity",
    "naicsCode": ""
};

// Run the Actor and wait for it to finish
const run = await client.actor("jaiveda/samgov-rfp-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 = {
    "searchQuery": "cybersecurity",
    "naicsCode": "",
}

# Run the Actor and wait for it to finish
run = client.actor("jaiveda/samgov-rfp-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 '{
  "searchQuery": "cybersecurity",
  "naicsCode": ""
}' |
apify call jaiveda/samgov-rfp-scraper --silent --output-dataset

```

## MCP server setup

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