# SAM.gov Contract Opportunities Scraper (No API Key) (`gov-data-tools/sam-gov-contract-opportunities`) Actor

Search SAM.gov federal contract opportunities by keyword, NAICS, set-aside, notice type, agency, state and dates. Clean flat records with POC email/phone and full description text, built on SAM.gov's official public daily extract. No API key.

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

## Pricing

$2.50 / 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 Scraper — Federal RFPs, Solicitations & Sources Sought (No API Key)

Search **SAM.gov contract opportunities** (formerly FedBizOpps / beta.SAM) and export clean, flat records to JSON, CSV, Excel or your CRM — **no SAM.gov API key, no login, no 10-requests-a-day limit**.

Data comes from **SAM.gov's own official public daily extract** of all active contract opportunities (published by GSA under SAM.gov Data Services) — not from scraping the website — so runs are fast (≈10 seconds for a filtered search) and don't break when the site changes.

Filter by **keyword, NAICS code, set-aside (Small Business, 8(a), HUBZone, SDVOSB, WOSB…), notice type, agency, posted date, response deadline and place-of-performance state**, and get each notice's **contracting officer name, email and phone and full description text**.

### Who is this for?

- **Small businesses and GovCon BD teams** who want a daily feed of new RFPs, RFQs and Sources Sought in their NAICS codes.
- **Proposal consultants and capture managers** tracking opportunities for several clients.
- **Lead-gen and market-intelligence teams** building datasets of agencies, contracting offices and buying contacts.
- **AI agents and automations** (Make, Zapier, n8n, Claude/ChatGPT via MCP) that need structured federal contracting data.

### Why this Actor?

| | This Actor | Official SAM.gov API (personal key) |
|---|---|---|
| API key needed | **No** | Yes, renewed every 90 days |
| Daily request limit | None (one official file download per run) | ~10 requests/day for most personal keys |
| Description text | **Included as plain text** | Separate keyed request per notice |
| POC email / phone | **Flat columns** | Nested JSON |
| Amendments | **One row per solicitation (latest version)** | One row per notice |
| NAICS prefix search (e.g. `5415`) | **Yes** | No |
| Only-new-since-last-run alerts | **Built in (monitor mode)** | Build it yourself |

### Input

| Field | Example | Notes |
|---|---|---|
| `dataSource` | `officialExtract` | Default. `officialApi` uses your own SAM.gov key (archived notices + attachment links) |
| `keywords` | `cybersecurity` | Title, description, solicitation number |
| `keywordMode` | `ALL` / `ANY` / `EXACT` | Exact phrase matching supported |
| `sortBy` | `relevance` / `newest` | |
| `naicsCodes` | `["541512","5415"]` | Codes or prefixes |
| `setAsideTypes` | `["SBA","8A","SDVOSBC"]` | All SAM.gov set-aside codes |
| `noticeTypes` | `["o","k","r"]` | Solicitation, Combined Synopsis/Solicitation, Sources Sought, Presolicitation, Award, Special Notice, J\&A… |
| `agency` | `Veterans Affairs` | Matches department, sub-tier or office name |
| `postedFrom` / `postedTo` | `2026-11-01` or `7 days` | |
| `responseDeadlineFrom` / `responseDeadlineTo` | `+30 days` | e.g. "due in the next 30 days" |
| `placeOfPerformanceStates` | `["VA","MD"]` | |
| `activeOnly` | `true` | The daily extract holds active notices; archived ones need `officialApi` |
| `latestVersionOnly` | `true` | One row per solicitation (latest amendment) |
| `maxResults` | `100` | 0 = everything that matches |
| `includeDescription` / `includeAttachments` | `true` | Extract gives the additional-info link; `officialApi` gives attachment link lists |
| `onlyNewSinceLastRun` + `monitorName` | `true`, `"it-services"` | Schedule daily and receive (and pay for) only new notices |
| `samApiKey` | *(optional)* | Only for `dataSource: officialApi` |

#### Example input

```json
{
  "naicsCodes": ["541512", "541511"],
  "setAsideTypes": ["SBA", "SDVOSBC", "8A"],
  "noticeTypes": ["o", "k", "r"],
  "responseDeadlineFrom": "+1 day",
  "maxResults": 200
}
```

### Output

One flat row per opportunity:

`noticeId, title, solicitationNumber, department, subTier, office, officeCode, agencyPath, noticeType, noticeTypeCode, setAside, setAsideCode, naicsCode, naicsCodes, pscCode, postedDate, modifiedDate, responseDeadline, responseTimeZone, archiveDate, isActive, isCanceled, placeOfPerformanceCity, placeOfPerformanceState, placeOfPerformanceZip, placeOfPerformanceCountry, pocName, pocEmail, pocPhone, secondaryPocName, secondaryPocEmail, secondaryPocPhone, officeAddress, awardNumber, awardAmount, awardDate, awardeeName, awardeeUei, description, attachments[], attachmentCount, parentNoticeId, url, dataAsOf, scrapedAt`

#### Example record (real run, shortened; contact redacted)

```json
{
  "noticeId": "73d918da3ba340a28a2d7e5d23c270b1",
  "title": "30 RS Mission Planning Software Tool (MPST)",
  "solicitationNumber": "F3G1EB6257AG01",
  "department": "DEPT OF DEFENSE",
  "subTier": "DEPT OF THE AIR FORCE",
  "office": "FA4861  99 CONS LGC",
  "noticeType": "Combined Synopsis/Solicitation",
  "setAside": "Small Business Set Aside - Total",
  "naicsCode": "541511",
  "pscCode": "DA10",
  "postedDate": "2026-11-09T11:40:13",
  "responseDeadline": "2026-11-20T10:00:00-08:00",
  "placeOfPerformanceState": "NV",
  "pocName": "(name redacted)",
  "pocEmail": "redacted@agency.gov",
  "pocPhone": "xxxxxxxxxx",
  "description": "This requirement is for procurement of services including providing personnel, services, and management support for the Mission Planning Software Tool (MPST) so\u2026",
  "url": "https://sam.gov/opp/73d918da3ba340a28a2d7e5d23c270b1/view",
  "dataAsOf": "Tue, 10 Nov 2026 04:30:19 GMT"
}
```

Dataset views: **Opportunities** (overview table), **Contacts** (POC list), **Full records**.

### Pricing

Pay per result: **$2.50 per 1,000 opportunities** ($0.0025 each), including full description text and contacts. Amendments are collapsed into one row per solicitation, so you don't pay for duplicates, and monitor mode never charges for notices you've already received. You can cap spend with the run's *Max total charge* setting.

### Tips

- **Daily alerts:** set `onlyNewSinceLastRun: true`, give each saved search its own `monitorName`, and schedule the Actor daily. Connect a Slack/email integration or webhook.
- **Full export:** set `maxResults: 0` with no filters to get every active opportunity (≈35,000 solicitations after amendment dedupe in Nov 2026).
- **Freshness:** GSA refreshes the extract nightly (around 04:30 UTC), so a notice posted today appears in tomorrow's runs. Each record carries `dataAsOf`.
- **Awards & sole-source notices:** use `noticeTypes: ["a","u"]`.

### FAQ

**Where does the data come from?** From the public *Contract Opportunities* file that GSA publishes on SAM.gov Data Services for download (`sam.gov/data-services`), or — if you choose — from the official SAM.gov Opportunities API with your own key. The Actor does not crawl SAM.gov web pages, log in, or touch non-public data. U.S. government works are generally public domain; use the contact details responsibly (no spam).

**Is it affiliated with GSA or SAM.gov?** No. This is an independent tool.

**Does it cover state and local bids?** No — SAM.gov is federal only.

# Actor input Schema

## `dataSource` (type: `string`):

officialExtract (default, no key): SAM.gov's official public daily extract of all active opportunities, refreshed nightly. officialApi: the official SAM.gov Opportunities API with your own key (includes archived notices and attachment links; personal keys allow ~10 requests/day).

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

Free-text search over title, description and solicitation number, e.g. "cybersecurity" or "janitorial services". Leave empty to match everything.

## `keywordMode` (type: `string`):

ALL = every word must appear, ANY = at least one word, EXACT = exact phrase.

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

Relevance (best keyword matches first) or newest (most recently updated first). Relevance only applies when keywords are given.

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

One or more NAICS codes or prefixes, e.g. 541512 or 5415 (matches all 5415xx).

## `setAsideTypes` (type: `array`):

Filter by set-aside.

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

Filter by notice type. Leave empty for all.

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

Department, agency or office name (case-insensitive word match), e.g. "Veterans Affairs", "Dept of the Navy", "Army Corps of Engineers".

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

Earliest posted date (YYYY-MM-DD) or relative like "7 days".

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

Latest posted date (YYYY-MM-DD).

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

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

## `responseDeadlineFrom` (type: `string`):

Only notices whose response deadline is on/after this date (YYYY-MM-DD or relative).

## `responseDeadlineTo` (type: `string`):

Only notices whose response deadline is on/before this date (YYYY-MM-DD or relative, e.g. "30 days" = due within 30 days).

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

The official daily extract contains active notices only. For archived notices and past awards, use the officialApi source.

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

SAM.gov posts a new notice for each amendment. When on, only the most recent notice per solicitation number is returned (you pay once per opportunity, not per amendment).

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

Maximum number of opportunities to return. 0 = no limit.

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

Full notice description as plain text.

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

Include available links. The daily extract provides the notice's additional-info link; the officialApi source provides full attachment link lists.

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

Remembers notice IDs per monitor name and only returns (and charges for) notices you haven't received before. Great for scheduled daily alerts.

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

Separate memory for each saved search when monitor mode is on.

## `samApiKey` (type: `string`):

Only needed for the officialApi source. Get a free key on SAM.gov > Account Details. Personal keys allow ~10 requests/day.

## Actor input object example

```json
{
  "dataSource": "officialExtract",
  "keywords": "cybersecurity",
  "keywordMode": "ALL",
  "sortBy": "relevance",
  "activeOnly": true,
  "latestVersionOnly": true,
  "maxResults": 50,
  "includeDescription": true,
  "includeAttachments": true,
  "onlyNewSinceLastRun": false,
  "monitorName": "default"
}
```

# Actor output Schema

## `overview` (type: `string`):

All matching opportunities: notice ID, title, solicitation number, agency, notice type, set-aside, NAICS/PSC, dates, place of performance, contacts, description and SAM.gov URL.

## `contacts` (type: `string`):

Same opportunities, shown with the contracting officer / POC name, email and phone columns.

# 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",
    "maxResults": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("gov-data-tools/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",
    "maxResults": 50,
}

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

```

## MCP server setup

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