# SAM.gov Opportunities Monitor (own API key + AI summary) (`jwaiworks/samgov-opportunities-monitor`) Actor

Bring your own SAM.gov API key: federal contract opportunities from the official API. Filter by keyword, NAICS, set-aside, type, state and date; monitor mode returns only new or updated notices; optional summaries. Not affiliated with the U.S. GSA or SAM.gov.

- **URL**: https://apify.com/jwaiworks/samgov-opportunities-monitor.md
- **Developed by:** [JW AI Works](https://apify.com/jwaiworks) (community)
- **Categories:** Lead generation, Business
- **Security:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 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

**Bring your own SAM.gov API key.** You enter your own key for your own run; it is never stored, logged or shown.

**SAM.gov Opportunities Monitor** pulls U.S. federal contract opportunities (solicitations, RFQs, combined synopses, sources sought, presolicitations, special notices and award notices) from the **official SAM.gov Get Opportunities Public API**, using **your own free SAM.gov API key**. Filter by keyword, NAICS code, set-aside, notice type, state, agency and dates. In **monitor mode** it outputs only **new or updated** notices, so a daily schedule becomes a clean bid-alert feed. An optional **AI summary** explains each notice in plain English: what's needed, who is eligible, when it's due and where the work happens.

*Not affiliated with or endorsed by the U.S. GSA or SAM.gov.*

### What does this SAM.gov opportunities monitor do?

- Calls `api.sam.gov/opportunities/v2/search` with your key. It never scrapes the SAM.gov website (its terms forbid that) and never touches FOUO or sensitive APIs.
- Pages through results 1,000 at a time and runs one search per NAICS × set-aside × state combination, because SAM.gov accepts one value per filter.
- Outputs clean records with these fields:
  - notice ID, title, solicitation number, notice type, posted date and response deadline
  - set-aside, NAICS and PSC codes
  - department, sub-tier and office
  - place of performance
  - award amount and date (for award notices)
  - attachment links and a link back to the notice on SAM.gov
- **Monitor mode** remembers each notice's content. Amendments that change the deadline, title, set-aside, award or attachments come back as `updated`, with the list of changed fields.
- **Summaries** use the built-in summarizer by default ($0.005 each, nothing to buy). If you add your own OpenAI-compatible AI key, summaries are written by your AI provider ($0.02 each). Turn on **Fetch full descriptions** for richer summaries; each description uses one of your API requests.

### How to monitor SAM.gov contract opportunities

1. Get your own key on SAM.gov: sign in, open **Account Details**, then **Public API Key**. Paste it into **SAM.gov public API key**.
2. Pick filters, e.g. NAICS `541511`, set-aside `SBA`, notice types *Solicitation* and *Combined Synopsis/Solicitation*.
3. Turn on **Monitor mode** and schedule the Actor daily with **Posted in the last N days** = 7.

```json
{"apiKey": "<your key>", "naicsCodes": ["541511", "541512"], "setAsideCodes": ["SBA"], "noticeTypes": ["o", "k", "r"],
 "monitorMode": true, "monitorStateName": "it-small-business", "postedWithinDays": 7, "aiSummary": true}
```

### Output example (synthetic test data)

Monitor rerun from our local test, with 3 planted new notices and 2 amended ones:

| changeType | title | type | set-aside | NAICS | deadline | changed fields |
|---|---|---|---|---|---|---|
| new | Janitorial Services - Multiple Sites | Special Notice | SDVOSBC | 561720 | 2026-12-01 | – |
| new | Program Management Support - Recompete | Solicitation | – | 541611 | 2026-11-13 | – |
| new | Engineering Design Services - Bridge | Special Notice | – | 541330 | 2026-12-08 | – |
| updated | IT Systems Integration Support - Region 5 | Solicitation | HZC | 541512 | 2026-12-31 | responseDeadline |
| updated | Radar Equipment Repair Parts - BPA (Amendment 1) | Solicitation | SBA | 334511 | 2026-11-10 | setAsideCode, title |

Example `aiSummary` (local summarizer, synthetic notice):

> Dept Of The Army posted a Solicitation for “IT Systems Integration Support - Region 5”. It is set aside: Historically Underutilized Business (HUBZone) Set-Aside (FAR 19.13). Responses are due in 59 days. The Dept Of The Army requires a contractor to provide it systems integration support at Arlington, VA.

Bullets: Stage: Open request for bids or proposals. / Eligibility: Historically Underutilized Business (HUBZone) Set-Aside (FAR 19.13). / NAICS 541512 (Professional, scientific & technical services). / Response deadline: 2026-12-31 17:00 (59 days from today). / Place of performance: Arlington, VA.

### Your SAM.gov API key: used only for your run

You bring your own SAM.gov key, and it is **used only for your run**. The Actor sends it only to api.sam.gov (other addresses are refused) and **never stores, logs or shows it**: it is masked in every log line and error message and is never written to the dataset or any key-value store. The same applies to your own AI key, if you add one. Apify keeps your run input encrypted, as it does for every secret input field. SAM.gov asks you to renew keys every 90 days.

### Rate limits: how many requests does my SAM.gov key allow?

SAM.gov caps each key per day. Keys for non-federal users with no role allow **10 requests a day**; with a role in SAM.gov, **1,000 a day**. One request returns up to 1,000 notices, so 10 requests can cover up to 10,000 notices. **Max SAM.gov API requests per run** defaults to 10 to protect your quota. If SAM.gov says the quota is used up, the run delivers what it already has; if it had nothing yet, nothing is charged. Dates: SAM.gov requires a posted-date range of **at most 1 year**. Keys must be renewed every 90 days.

### Pricing: how much does SAM.gov monitoring cost?

- **$0.002 per opportunity** delivered (in monitor mode, only new or updated ones; unchanged notices are free)
- **$0.005 per summary** from the built-in summarizer (only when **Add AI summary** is on)
- **$0.02 per summary** only when you supply your own AI key and your AI provider writes it. If your AI call fails, the built-in summary is used and you pay $0.005. Your AI provider may also bill you separately for its usage.

Example: a first run that finds 400 matching notices costs **$0.80**. Then a daily monitor that finds 25 new or updated notices costs **$0.05 a day** without summaries, **$0.175 a day** with built-in summaries (25 × $0.002 + 25 × $0.005), or **$0.55 a day** with summaries from your own AI key (25 × $0.002 + 25 × $0.02). Users on the free Apify plan get up to 100 opportunities per run.

### Is it legal?

This Actor doesn't scrape. SAM.gov's Terms of Use name the APIs at open.gsa.gov and the Data Services extracts as the way to get data, and prohibit automated scraping of the site. This Actor only uses the official public API with your own key. Most SAM.gov material is U.S. government work in the public domain; GSA asks for citation and a link back, so every record includes `samUrl`.

The Actor also follows these rules from the terms:

- **Dun & Bradstreet data:** award notices dated before 2022-04-04 may contain D\&B data that can't be shared in bulk, so their awardee details are left out unless you opt in.
- **Contacts:** contracting officers' names, emails and phones are personal data. They are **off by default**, with an opt-in for responding to a notice. Please don't use them for bulk marketing.
- **Your key:** SAM.gov's terms say not to share it with others. You use your own key in your own run.

See `SOURCE_CHECKS.md` for quotes and details. This isn't legal advice.

### FAQ

**Do I need a paid SAM.gov account?** No. SAM.gov accounts and public API keys are free. You must create the account yourself; this Actor never signs up for anything.

**Why did I get fewer results than SAM.gov's website shows?** The API returns the latest active version of each notice. Archived notices are filtered out unless you turn off **Active notices only**. Your request budget may also have stopped the search early (see the run log).

**What counts as "updated"?** A change to the title, solicitation number, type, deadline, set-aside, NAICS/PSC, agency, place of performance, award, attachments or links. Contact-only edits don't count.

**Does the summary send data anywhere?** Not by default; the built-in summarizer runs inside the Actor. If you add your own LLM key, only the notice's business fields and description are sent, never contacts.

**My key was rejected.** Keys expire every 90 days; generate a new one on SAM.gov > Account Details.

### Example input / example output

**Example input**

```json
{
  "apiKey": "YOUR_SAMGOV_API_KEY",
  "keywords": "cybersecurity",
  "postedFrom": "11/01/2026",
  "postedTo": "11/05/2026",
  "maxApiRequests": 1,
  "monitorMode": false,
  "aiSummary": false
}
```

**Example output** (one opportunity)

```json
{
  "noticeId": "abc123",
  "title": "Cybersecurity support services",
  "noticeType": "Solicitation",
  "postedDate": "2026-11-04",
  "responseDeadline": "2026-12-01",
  "naicsCodes": ["541512"],
  "changeType": "new"
}
```

### Use it with Make, Zapier, n8n, or AI agents (Apify MCP)

- **Make:** In Make, add the Apify module, connect your Apify account, then run this Actor (or an Actor task) and map dataset items into your scenario. See [Make integration](https://docs.apify.com/integrations/make).
- **Zapier:** In Zapier, use Apify as a trigger (finished Actor/task run) or action (Run Actor / Run Task / Fetch dataset items). See [Zapier integration](https://docs.apify.com/integrations/zapier).
- **n8n:** Install the Apify node, authenticate, then use **Run an Actor** or **Run an Actor and get dataset**. See [n8n integration](https://docs.apify.com/integrations/n8n).
- **AI agents (Apify MCP):** Connect your MCP client to `https://mcp.apify.com`, then use `search-actors`, `fetch-actor-details`, and `call-actor`. Pull results with `get-dataset-items`. See [Apify MCP server](https://docs.apify.com/mcp).

**Related actors:** [Email Auth Checker](https://apify.com/jwaiworks/email-auth-checker) · [ATS Jobs Feed](https://apify.com/jwaiworks/ats-jobs-feed) · [SEC Form D Funding Monitor](https://apify.com/jwaiworks/sec-form-d-funding-monitor) · [Texas New Business Entities Feed](https://apify.com/jwaiworks/texas-new-business-entities) · [Copycat Store & Lookalike Domain Suspect Checker](https://apify.com/jwaiworks/copycat-store-checker)

### Disclaimer

Not affiliated with or endorsed by the U.S. GSA or SAM.gov. Data comes from the public SAM.gov API and may be delayed or changed by the government; always confirm details on the official notice before you bid. Summaries are automated and can be wrong.

# Actor input Schema

## `apiKey` (type: `string`):

Your own key from SAM.gov > Account Details > Public API Key. It is used only for this run: sent only to api.sam.gov, and never stored, logged or shown by the Actor (Apify keeps run input encrypted as a secret field). Keys allow 10 requests/day without a SAM.gov role, 1,000/day with one, and must be renewed every 90 days.

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

Keep only notices whose title, solicitation number or agency contains one of these words (case-insensitive, whole word). Applied after the search.

## `titleSearch` (type: `string`):

SAM.gov's own title search (the API 'title' parameter).

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

e.g. 541511. One search per code.

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

e.g. SBA (Total Small Business), 8A, HZC, SDVOSBC, WOSB. One search per code.

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

Leave empty for all types.

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

2-letter codes, e.g. VA, TX. One search per state.

## `classificationCodes` (type: `array`):

PSC codes, e.g. D or R425. One search per code.

## `organizationName` (type: `string`):

e.g. GENERAL SERVICES ADMINISTRATION.

## `organizationCode` (type: `string`):

Federal Hierarchy code.

## `solicitationNumber` (type: `string`):

Exact solicitation number.

## `zip` (type: `string`):

5-digit ZIP.

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

Skip archived notices.

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

Used when no posted dates are given.

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

YYYY-MM-DD. At most 1 year before Posted to (SAM.gov rule).

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

YYYY-MM-DD. Defaults to today.

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

YYYY-MM-DD. Use with Response deadline to (max 1 year apart).

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

YYYY-MM-DD.

## `monitorMode` (type: `boolean`):

Remember what was seen and output only new or updated notices. Schedule daily.

## `monitorStateName` (type: `string`):

Separate monitors keep separate memory.

## `aiSummary` (type: `boolean`):

Plain-English summary per delivered opportunity. Built-in summarizer: $0.005 each. With your own AI key below: $0.02 each.

## `fetchDescriptions` (type: `boolean`):

Download each notice's description text for better summaries. Each description costs one of your SAM.gov API requests.

## `maxDescriptionFetches` (type: `integer`):

Limits how many of your daily API requests go to descriptions.

## `llmApiKey` (type: `string`):

Optional: your own OpenAI-compatible AI key. Used only for this run, never stored, logged or shown. Summaries made with it cost $0.02 each (built-in ones $0.005). Only notice business fields and description are sent, never contact details. If your AI call fails, the built-in summary is used and charged at $0.005.

## `llmBaseUrl` (type: `string`):

OpenAI-compatible endpoint.

## `llmModel` (type: `string`):

Model name for your endpoint.

## `includePointOfContact` (type: `boolean`):

Off by default: these are personal data of government staff, published for questions about a notice. Turn on only if you need them for that purpose.

## `includePre2022AwardeeData` (type: `boolean`):

Award notices dated before 2022-04-04 may contain Dun & Bradstreet data that SAM.gov's terms say may not be shared in bulk. Turn on only if your use is allowed.

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

Optional cap on opportunities per run.

## `maxApiRequests` (type: `integer`):

Protects your daily quota: 10 fits a key with no SAM.gov role; raise it if your key allows 1,000/day.

## `pageSize` (type: `integer`):

SAM.gov maximum is 1000.

## `minDelaySeconds` (type: `integer`):

Polite pacing.

## `apiBaseUrl` (type: `string`):

https://api.sam.gov (production) or https://api-alpha.sam.gov (test). Other hosts are refused so your key only goes to SAM.gov.

## Actor input object example

```json
{
  "activeOnly": true,
  "postedWithinDays": 7,
  "monitorMode": false,
  "monitorStateName": "default",
  "aiSummary": false,
  "fetchDescriptions": false,
  "maxDescriptionFetches": 20,
  "llmBaseUrl": "https://api.openai.com/v1",
  "llmModel": "gpt-4o-mini",
  "includePointOfContact": false,
  "includePre2022AwardeeData": false,
  "maxApiRequests": 10,
  "pageSize": 1000,
  "minDelaySeconds": 1,
  "apiBaseUrl": "https://api.sam.gov"
}
```

# Actor output Schema

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

Default dataset items in the overview view.

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

Default dataset items with every field.

## `runSummary` (type: `string`):

RUN_SUMMARY record in the default key-value store (counts, warnings, free-plan cap).

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("jwaiworks/samgov-opportunities-monitor").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("jwaiworks/samgov-opportunities-monitor").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 '{}' |
apify call jwaiworks/samgov-opportunities-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,jwaiworks/samgov-opportunities-monitor"
        }
    }
}
```

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/Bron2MbzR2RFmYrKh/builds/7X1s2fEUcs4gEOWuf/openapi.json
