# SAM.gov Contract Opportunities Monitor - Notices for the US (`mmdincer/sam-gov-opportunities-monitor`) Actor

Extract US federal contract opportunities from the SAM.gov opportunities API. Includes the notice id, title and posted date. Saved NAICS and title filters, including a baseline and a newly delivered notice. Results as JSON, CSV or Excel. Access through API or MCP.

- **URL**: https://apify.com/mmdincer/sam-gov-opportunities-monitor.md
- **Developed by:** [Muhammet Mustafa Dincer](https://apify.com/mmdincer) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.40 / 1,000 opportunity delivereds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

### 🤖 What does the SAM.gov monitor do?

A SAM.gov monitor reads US federal contract opportunities from the SAM.gov opportunities API.
It can collect:

- **US federal contract opportunities** from the SAM.gov opportunities API
- **the notice id, title and posted date**
- **A saved baseline** when the source compares the next run
- **JSON, CSV or Excel** from the dataset
- **The same run through the Apify API or MCP**

### 💡 Why use the SAM.gov monitor?

People use a SAM.gov monitor when the same public page would otherwise be checked by hand.

- **Watch a change.** The Actor keeps a baseline and writes the next difference.
- **Feed a sheet.** The dataset opens as JSON, CSV or Excel.
- **Call it from code.** The Apify API runs the same input.
- **Hand it to an agent.** Apify MCP can call the Actor with that input.
- **Stay on the sample.** The prefilled input is the short, cheap run.

### 🚀 How do you run the SAM.gov monitor?

1. Open this Actor and click **Try for free**.
2. Keep the prefilled sample, or set SAM.gov API key.
3. Leave the other fields on their defaults unless you need a narrower run.
4. Click **Run**.
5. Open the **Dataset** tab and download JSON, CSV or Excel.

Sample input from the prefilled schema:

```json
{
  "mode": "changes",
  "naicsCodes": [
    "541512"
  ],
  "keywords": [],
  "setAsides": [],
  "agency": "",
  "noticeTypes": [],
  "activeOnly": false,
  "lookbackDays": 7,
  "postedFrom": "",
  "postedTo": "",
  "includeDescription": false,
  "maxOpportunities": 2000,
  "monitorName": "default"
}
```

### ⚠️ What limits does this Actor have?

The input schema is the limit. Defaults and prefills are unchanged by this copy update.

- `lookbackDays`: maximum 1825, minimum 1.
- `maxOpportunities`: maximum 10000, minimum 1.
- Actor Start is priced in the table. The other events are billed only when the source charges them and the charge is accepted.
- A spending limit that cannot pay for the next event stops that event. The source does not invent a result to replace it.

### 💳 How much does the SAM.gov monitor cost?

The table is the live pay-per-event price list (`pricingInfos`) for this Actor. It is not a guessed price.
| Event | What the price list calls it | Free | Bronze | Silver | Gold | Platinum | Diamond |
| --- | --- | --- | --- | --- | --- | --- | --- |
| `apify-actor-start` | Actor Start | $0.0005 | $0.0005 | $0.0005 | $0.0005 | $0.0005 | $0.0005 |
| `opportunity-delivered` | Opportunity delivered | $0.002 | $0.0018 | $0.0016 | $0.0014 | $0.0014 | $0.0014 |

One Free-plan run that bills one `opportunity-delivered` plus Actor Start is $0.0005 + $0.002 = $0.0025. 1,000 `opportunity-delivered` events on the Free plan are $2.00, before Actor Start. These figures use only the live prices in the table.

`apify-actor-start` is in the live price list. Charged when the Actor starts running. Number of events charged depends on Actor memory (one event per GB, minimum one event).
The source names `opportunity-delivered` and charges it with Actor.charge when that event happens. One SAM.gov contract opportunity written to the dataset. A changes-mode baseline stores notice IDs and charges none. Notices already stored, notices held back by the spending limit, and failed searches are not charged. A downloaded description is included and is not a second charge.

### 📝 What input does this Actor take?

Required fields are marked. Defaults and prefills are the quick run; this text does not change them.

| Field | Required | What it means |
| --- | --- | --- |
| `apiKey` (SAM.gov API key) | Yes | Your own free public API key from SAM.gov Account Details. The Actor sends it only to <code>api.s... |
| `mode` (Mode) | No | <b>Changes</b> compares notice IDs with the previous run of this watchlist. The first complete ru... |
| `naicsCodes` (NAICS codes) | No | Optional. 2 to 6 digit NAICS codes, one per line, for example <code>541512</code>. SAM.gov matche... |
| `keywords` (Title keywords) | No | Optional. Words or phrases to send as the official <code>title</code> parameter. SAM.gov does not... |
| `setAsides` (Set-aside) | No | Optional. Official set-aside codes. One code is sent per request; several codes are OR. Leave emp... |
| `agency` (Agency) | No | Optional. Department or sub-tier name, sent as the official <code>organizationName</code> paramet... |
| `noticeTypes` (Notice types) | No | Optional. Procurement types. Several types are OR. Leave empty for every type. The product of NAI... |
| `activeOnly` (Active notices only) | No | Keep only notices SAM.gov marks active. Off by default, so award notices and other rows the API s... |
| `lookbackDays` (Lookback days) | No | How many Eastern-time days to read, including today, when Posted from and Posted to are empty. A ... |
| `postedFrom` (Posted from) | No | Optional start date, <code>MM/dd/yyyy</code>, on the America/New_York calendar. Set both dates, o... |
| `postedTo` (Posted to) | No | Optional end date, <code>MM/dd/yyyy</code>. Must be on or after Posted from. The Actor splits any... |
| `includeDescription` (Download descriptions) | No | Also download each delivered notice's description from api.sam.gov. Off by default, because every... |
| `maxOpportunities` (Max opportunities) | No | Most new rows to return in one Changes run, or most rows in one Search run. Further new notices s... |
| `monitorName` (Watchlist name) | No | Name of the saved baseline. Runs with the same name and the same filters share a baseline. Changi... |

### 📊 What output does this Actor return?

The dataset schema names every stored field.

| Field | What the schema says |
| --- | --- |
| `noticeId` | SAM.gov notice ID. |
| `title` | Notice title. |
| `solicitationNumber` | Solicitation number. |
| `noticeType` | Current procurement type, such as Solicitation or Award Notice. |
| `baseType` | Original procurement type. |
| `postedDate` | Posted date, YYYY-MM-DD. |
| `responseDeadline` | Response deadline as returned by SAM.gov. |
| `naicsCode` | NAICS code, up to 6 digits. |
| `classificationCode` | Product or service classification code. |
| `setAsideCode` | Set-aside code, for example SBA or WOSB. Null when the notice has no ... |
| `setAside` | Set-aside description. |
| `agency` | Top-level organization, usually the department. |
| `organizationName` | Full organization path from department to office. |
| `active` | Yes when SAM.gov marks the notice active. |
| `descriptionUrl` | Official description URL on api.sam.gov, without an API key. |
| `description` | Plain-text description. Null unless Download descriptions is on. |
| `officialUrl` | Public SAM.gov opportunity page. |
| `resourceLinks` | HTTPS attachment links returned by the API, with any API key removed.... |
| `isNew` | True for a notice that was not in the saved baseline. Null in Search ... |
| `detectedAt` | UTC time when this run produced the row. |

Field examples declared in the dataset schema shipped with this Actor. They are not a newly invented row.

```json
{
  "noticeId": "ff826a59eac743c4a1a07ff5e0cf3e3a",
  "title": "Cloud hosting support",
  "solicitationNumber": "36C10B26R0001",
  "noticeType": "Solicitation",
  "baseType": "Solicitation",
  "postedDate": "2026-11-04",
  "responseDeadline": "2026-11-20T17:00:00-05:00",
  "naicsCode": "541512",
  "classificationCode": "D307",
  "setAsideCode": "SBA",
  "setAside": "Total Small Business Set-Aside (FAR 19.5)",
  "agency": "DEPARTMENT OF VETERANS AFFAIRS",
  "organizationName": "DEPARTMENT OF VETERANS AFFAIRS / VETERANS AFFAIRS, DEPARTMENT OF",
  "active": "Yes",
  "descriptionUrl": "https://api.sam.gov/prod/opportunities/v1/noticedesc?noticeid=ff826a59eac743c4a1a07ff5e0cf3e3a",
  "description": null,
  "officialUrl": "https://sam.gov/opp/ff826a59eac743c4a1a07ff5e0cf3e3a/view",
  "resourceLinks": [],
  "isNew": true,
  "detectedAt": "2026-11-05T12:00:00.000Z"
}
```

### 🔌 How do you call this Actor from the API?

Call `mmdincer/sam-gov-opportunities-monitor` with the Apify API. The body is the input schema. MCP clients on Apify use the same input.
Make and Zapier can start the Actor through Apify's integration. The input is the same JSON.

```python
from apify_client import ApifyClient
client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("mmdincer/sam-gov-opportunities-monitor").call(run_input={"mode": "changes", "naicsCodes": ["541512"], "keywords": [], "setAsides": [], "agency": "", "noticeTypes": [], "activeOnly": false, "lookbackDays": 7, "postedFrom": "", "postedTo": "", "includeDescription": false, "maxOpportunities": 2000, "monitorName": "default"})
items = client.dataset(run["defaultDatasetId"]).list_items().items
```

```javascript
import { ApifyClient } from "apify-client";
const client = new ApifyClient({ token: "<APIFY_TOKEN>" });
const run = await client.actor("mmdincer/sam-gov-opportunities-monitor").call({"mode": "changes", "naicsCodes": ["541512"], "keywords": [], "setAsides": [], "agency": "", "noticeTypes": [], "activeOnly": false, "lookbackDays": 7, "postedFrom": "", "postedTo": "", "includeDescription": false, "maxOpportunities": 2000, "monitorName": "default"});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

### ❓ What else should you know?

#### Does the SAM.gov monitor need a login?

The sample run uses the public source and the prefilled input. A field that asks for your own key is optional unless the input schema marks it required.

#### What does the SAM.gov monitor charge for?

The primary event in the live price list is `opportunity-delivered` (Opportunity delivered). Actor Start is separate. An event the source does not call is not billed by the source.

#### Can this Actor run on a schedule?

Yes. Save the input and schedule it. The next run compares against the baseline when the source stores one.

#### Where do the results go?

Results land in the run dataset. Download JSON, CSV or Excel, or read them with the API.

### ⚖️ Is it legal to use the SAM.gov monitor?

You are responsible for the source terms and for privacy law that applies to you, including the GDPR if you handle personal data. This Actor stores the public fields described above. This Actor is not affiliated with SAM.gov.

Not affiliated with SAM.gov.
Source license: Apache-2.0.
The live prices in the table are set on the platform.
The source calls api.sam.gov/opportunities/v2/search.

### 🔗 Which related actors sit beside this one?

Other public Actors from mmdincer in this group:

- [EPO Patent Monitor - New publications for queries](https://apify.com/mmdincer/epo-patent-publication-monitor)
- [ERIC Monitor - Education records for queries](https://apify.com/mmdincer/eric-education-document-monitor)
- [INSPIRE Monitor - HEP papers for literature queries](https://apify.com/mmdincer/inspire-hep-literature-monitor)
- [Company Registry Lookup - Filings for seven registers](https://apify.com/mmdincer/company-registry-lookup)
- [Research Paper RAG - Chunks for arXiv and PubMed](https://apify.com/mmdincer/research-paper-rag)

# Changelog

This Actor's version history is a separate document: https://apify.com/mmdincer/sam-gov-opportunities-monitor/changelog.md

# Actor input Schema

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

Your own free public API key from SAM.gov Account Details. The Actor sends it only to <code>api.sam.gov</code> and does not write it to the dataset, the run summary or the log. Leave it empty and the run stops before any request. Create a key after signing in at <a href="https://sam.gov/">sam.gov</a>.

## `mode` (type: `string`):

<b>Changes</b> compares notice IDs with the previous run of this watchlist. The first complete run saves a baseline and returns no opportunities. <b>Search</b> returns every match in the posted-date window and does not update the baseline.

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

Optional. 2 to 6 digit NAICS codes, one per line, for example <code>541512</code>. SAM.gov matches the code you send (usually the full 6-digit code). Several codes are combined with OR. Leave empty to skip this filter. Each code is a separate API call.

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

Optional. Words or phrases to send as the official <code>title</code> parameter. SAM.gov does not offer a separate full-text parameter, so this matches the notice title, not the description body. Several keywords are OR. Leave empty to skip this filter.

## `setAsides` (type: `array`):

Optional. Official set-aside codes. One code is sent per request; several codes are OR. Leave empty to include every set-aside, including notices with none.

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

Optional. Department or sub-tier name, sent as the official <code>organizationName</code> parameter (a general search). Example: <code>Department of Veterans Affairs</code>. The deprecated department and sub-tier parameters are not used.

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

Optional. Procurement types. Several types are OR. Leave empty for every type. The product of NAICS codes, keywords, set-asides and notice types cannot exceed 20 API searches.

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

Keep only notices SAM.gov marks active. Off by default, so award notices and other rows the API still returns are not hidden.

## `lookbackDays` (type: `integer`):

How many Eastern-time days to read, including today, when Posted from and Posted to are empty. A daily schedule can keep this at 7. Ranges longer than one year are split into one-year requests.

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

Optional start date, <code>MM/dd/yyyy</code>, on the America/New_York calendar. Set both dates, or leave both empty to use Lookback days.

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

Optional end date, <code>MM/dd/yyyy</code>. Must be on or after Posted from. The Actor splits anything longer than one year before calling SAM.gov.

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

Also download each delivered notice's description from api.sam.gov. Off by default, because every description is another request against your daily quota. The description URL is always included.

## `maxOpportunities` (type: `integer`):

Most new rows to return in one Changes run, or most rows in one Search run. Further new notices stay unseen, so a later run can report them. The default covers a filtered week.

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

Name of the saved baseline. Runs with the same name and the same filters share a baseline. Changing the filters starts a new baseline. Example: <code>va-it</code>.

## Actor input object example

```json
{
  "mode": "changes",
  "naicsCodes": [
    "541512"
  ],
  "keywords": [],
  "setAsides": [],
  "agency": "",
  "noticeTypes": [],
  "activeOnly": false,
  "lookbackDays": 7,
  "postedFrom": "",
  "postedTo": "",
  "includeDescription": false,
  "maxOpportunities": 2000,
  "monitorName": "default"
}
```

# Actor output Schema

## `opportunities` (type: `string`):

One row per opportunity. In Changes mode the first complete run saves a baseline and leaves this empty; later runs list only new notice IDs.

## `summary` (type: `string`):

Posted dates, filters, notices fetched and delivered, whether a baseline was saved, request count, warnings and the reason the run finished.

# 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 = {
    "mode": "changes",
    "naicsCodes": [
        "541512"
    ],
    "keywords": [],
    "setAsides": [],
    "agency": "",
    "noticeTypes": [],
    "activeOnly": false,
    "lookbackDays": 7,
    "postedFrom": "",
    "postedTo": "",
    "includeDescription": false,
    "maxOpportunities": 2000,
    "monitorName": "default"
};

// Run the Actor and wait for it to finish
const run = await client.actor("mmdincer/sam-gov-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 = {
    "mode": "changes",
    "naicsCodes": ["541512"],
    "keywords": [],
    "setAsides": [],
    "agency": "",
    "noticeTypes": [],
    "activeOnly": False,
    "lookbackDays": 7,
    "postedFrom": "",
    "postedTo": "",
    "includeDescription": False,
    "maxOpportunities": 2000,
    "monitorName": "default",
}

# Run the Actor and wait for it to finish
run = client.actor("mmdincer/sam-gov-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 '{
  "mode": "changes",
  "naicsCodes": [
    "541512"
  ],
  "keywords": [],
  "setAsides": [],
  "agency": "",
  "noticeTypes": [],
  "activeOnly": false,
  "lookbackDays": 7,
  "postedFrom": "",
  "postedTo": "",
  "includeDescription": false,
  "maxOpportunities": 2000,
  "monitorName": "default"
}' |
apify call mmdincer/sam-gov-opportunities-monitor --silent --output-dataset

```

## MCP server setup

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