# SAM.gov Contract Opportunities Scraper (`dabooti/sam-gov-opportunities-scraper`) Actor

Export US federal contract opportunities from SAM.gov: solicitations, sources sought, presolicitations and awards with agency, office, NAICS, set-aside, PSC, response deadline and link. Filter by keyword, notice type, NAICS and set-aside.

- **URL**: https://apify.com/dabooti/sam-gov-opportunities-scraper.md
- **Developed by:** [Danial Maqbool](https://apify.com/dabooti) (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

from $2.00 / 1,000 opportunities

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

Export US federal contract opportunities from SAM.gov to JSON, CSV or Excel: solicitations, combined synopsis/solicitations, presolicitations, sources sought, special notices and award notices. Search by keyword and filter by notice type, NAICS code, small-business set-aside, posting date and active status. Each record has the title, notice type, solicitation number, department, sub-tier and contracting office, posted and modified dates, response deadline and time zone, NAICS, set-aside, product/service code, place of performance, awardee (award notices), description and a link to the notice.

It reads the same public search that the SAM.gov website uses. No login, API key or proxy needed.

### What you can use it for

- **Government sales and capture**: get a daily list of new solicitations in your NAICS codes.
- **Small-business bidding**: find opportunities set aside for SDVOSB, 8(a), HUBZone or WOSB firms.
- **Market research**: see which agencies and offices buy what, and when responses are due.
- **Alerts**: schedule the Actor and send new notices to Slack, email or a spreadsheet.

### What data you get

| Field | Description |
|---|---|
| `noticeId`, `url` | SAM.gov notice ID and link to the notice page |
| `title`, `noticeType`, `noticeTypeCode`, `solicitationNumber` | What is being bought and the notice type |
| `department`, `subTier`, `office`, `officeCode`, `officeCity`, `officeState` | Buying organization |
| `publishDate`, `modifiedDate`, `responseDeadline`, `responseTimeZone` | Key dates |
| `isActive`, `isCanceled` | Status |
| `naicsCode`, `setAside`, `classificationCode` | Primary NAICS, set-aside code and PSC (with details on) |
| `placeOfPerformanceCity`, `placeOfPerformanceState`, `placeOfPerformanceZip`, `placeOfPerformanceCountry`, `placeOfPerformanceText` | Where the work is done (with details on) |
| `awardeeName`, `awardeeUei`, `awardAmount`, `awardDate` | Award details on award notices |
| `description`, `descriptionIsSnippet` | Notice text (full with details on, otherwise a short snippet) |
| `parentNoticeId`, `keyword`, `scrapedAt` | Earlier related notice, matching keyword, scrape time |

Points of contact are left out, and e-mail addresses and phone numbers inside descriptions are replaced with `[email removed]` and `[phone removed]`. Open the notice link for contact details.

### How to use it

1. Enter **Keywords** (each one is a separate search), or leave them empty to list everything matching the filters.
2. Optionally choose **Notice types**, **NAICS codes**, a **Set-aside** and a **Posted from / to** range.
3. Keep **Include details** on for NAICS, set-aside, place of performance and the full description.
4. Set **Max results per keyword** and click **Start**.

#### Example input

```json
{
  "keywords": ["cybersecurity", "cloud migration"],
  "noticeTypes": ["o", "k", "r"],
  "naicsCodes": ["541512", "541519"],
  "setAside": "SBA",
  "postedFrom": "2026-11-01",
  "includeDetails": true,
  "maxResultsPerSearch": 200
}
```

#### Example output

```json
{
  "noticeId": "7e9eedb22d6841709dc019ba3f04e0aa",
  "title": "PCDMIS CAD++ Software Renewal and CMM Calibration",
  "noticeType": "Solicitation",
  "noticeTypeCode": "o",
  "solicitationNumber": "FA857127Q0012",
  "department": "DEPT OF DEFENSE",
  "subTier": "DEPT OF THE AIR FORCE",
  "office": "FA8571  MAINT CONTRACTING AFSC PZIM",
  "officeCode": "FA8571",
  "officeCity": "ROBINS AFB",
  "officeState": "GA",
  "publishDate": "2026-11-17T20:16:20+00:00",
  "modifiedDate": "2026-11-17T20:16:20+00:00",
  "responseDeadline": "2026-11-25T10:00:00-05:00",
  "responseTimeZone": "America/New_York",
  "isActive": true,
  "isCanceled": false,
  "naicsCode": "811210",
  "setAside": "NONE",
  "classificationCode": "J066",
  "placeOfPerformanceCity": "Warner Robins",
  "placeOfPerformanceState": "GA",
  "placeOfPerformanceZip": "31098",
  "placeOfPerformanceCountry": "USA",
  "placeOfPerformanceText": null,
  "awardeeName": null,
  "awardeeUei": null,
  "awardAmount": null,
  "awardDate": null,
  "description": "The Air Force Sustainment Center PZIMA, Robins AFB, GA has a requirement to purchase a PCDMIS CAD ++ Software Renewal and CMM Calibration. This solicitation is being issued as a Request for Quote (RFQ) in accordance with (IAW) RFO part 12, Acquisition of Commercial Products and Commercial Services. ...",
  "descriptionIsSnippet": false,
  "parentNoticeId": null,
  "url": "https://sam.gov/opp/7e9eedb22d6841709dc019ba3f04e0aa/view",
  "keyword": "cybersecurity",
  "scrapedAt": "2026-11-17T20:27:49.833Z"
}
```

### Pricing

Pay per event: **$2.00 per 1,000 opportunities** saved, plus a tiny standard start fee and Apify platform usage (usually a fraction of a cent per run). A notice found by several keywords is saved and charged once. Set **Max cost per run** to cap spending.

### Tips and limits

- SAM.gov search returns at most 10,000 records per query; narrow by date, NAICS or notice type for larger exports.
- With **Include details** on, the Actor makes one extra request per notice (about 3 notices per second).
- Some notices leave NAICS, set-aside or place of performance blank; those fields are then empty.
- Attachments are not downloaded; use the notice link to open them.
- A `RUN_SUMMARY` record shows the filters used, total matches and saved notices per keyword.

### FAQ

**Is this official data?** Yes. Contract opportunities are published on SAM.gov by US federal agencies.

**Do I need a SAM.gov API key?** No. The Actor does not use api.sam.gov, so no key or account is needed.

### Legal note

SAM.gov contract opportunity data is public US government information. Use it in line with your own legitimate purpose, applicable laws and SAM.gov's terms of use.

# Actor input Schema

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

Words to search in opportunity titles and descriptions, for example cybersecurity or janitorial. Each keyword is a separate search. Leave empty to list all opportunities that match the filters.

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

Optional. Keep only these notice types. Empty means all types.

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

Optional. 6-digit NAICS codes, for example 541512.

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

Optional. Keep only one small-business set-aside type. Leave empty for any.

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

Leave on to skip archived and inactive notices.

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

Optional. YYYY-MM-DD.

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

Optional. YYYY-MM-DD.

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

Order of results.

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

Load each notice's NAICS code, set-aside, PSC, place of performance, award details and full description. One extra request per notice.

## `maxResultsPerSearch` (type: `integer`):

Up to 10,000 per keyword (or per run when no keywords are given).

## Actor input object example

```json
{
  "keywords": [
    "cybersecurity"
  ],
  "activeOnly": true,
  "sortBy": "modified",
  "includeDetails": true,
  "maxResultsPerSearch": 20
}
```

# Actor output Schema

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

No description

## `resultsFull` (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": [
        "cybersecurity"
    ],
    "maxResultsPerSearch": 20
};

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

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

```

## MCP server setup

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