# SAM.gov Contract Opportunities & Amendment Monitor (`blaidlink/sam-opportunity-fit-amendment-monitor`) Actor

Find SAM.gov government contract opportunities, score business fit, and monitor solicitations, RFP deadlines, attachments, cancellations, and amendments.

- **URL**: https://apify.com/blaidlink/sam-opportunity-fit-amendment-monitor.md
- **Developed by:** [Blaidlink Labs](https://apify.com/blaidlink) (community)
- **Categories:** Automation, Lead generation
- **Stats:** 2 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 qualified 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## SAM.gov Opportunity Fit & Amendment Monitor

> **Unofficial tool:** This Actor is built by Blaidlink and is not affiliated with, sponsored by, or endorsed by SAM.gov, the U.S. General Services Administration, or the U.S. government. Verify eligibility, deadlines, amendments, and source documents in the linked official record.

Use this SAM.gov opportunity monitor to turn official public notices into government contract opportunity alerts. Score opportunities against capabilities, NAICS, PSC, and set-asides, then receive structured alerts when a qualifying solicitation is new, amended, cancelled, or has a changed deadline or attachment.

### Try the SAM.gov opportunity monitor

Run the [credential-free synthetic example](https://apify.com/blaidlink/sam-opportunity-fit-amendment-monitor/examples/find-cloud-security-small-business-rfps-demo) first. It emits one clearly labeled demo record and incurs no Blaidlink event charge.

```json
{"demoMode": true}
````

For live government contract opportunity alerts, add your own SAM.gov key only in the secret input, set `demoMode` to `false`, add at least one capability, keyword, or code filter, and save the input as a daily Apify Task.

### Buyer outcome

Government contractors, capture teams, proposal consultants, and specialist vendors can stop rereading broad search results. Each output explains why an opportunity matches and whether it is new, amended, cancelled, or unchanged.

### Official source

The Actor uses the official SAM.gov Get Opportunities Public API. Customers provide their own SAM.gov personal API key. The key is sent only to `api.sam.gov` and is never written to logs, datasets, or persistent state.

### One-click demo and live mode

Run the default input without credentials to receive one unmistakably synthetic example (`dataMode: "demo"`, a `DEMO-` notice ID, and a disclaimer). This lets buyers inspect the output schema before creating a SAM.gov key and keeps Store health checks non-secret and deterministic. Add a personal SAM.gov API key to retrieve live public notices; any supplied key automatically switches output to `dataMode: "live"`.

### Fit signals

- title and returned metadata keywords
- company capability terms
- NAICS codes
- PSC/classification codes
- set-aside codes

The output includes an explicit `fitScore` and `fitReasons`; it does not claim that a score guarantees eligibility or an award.

### Persistent amendment detection

The Actor stores a material snapshot per notice in a caller-isolated key-value store. Later runs emit only new or amended opportunities by default. Each amendment includes `changedFields`, before/after values, and deadline, attachment, and status flags. The SAM API's `description` value is retained honestly as `descriptionUrl`; it is not misrepresented as downloaded solicitation text.

### Output example

```json
{
  "dataMode": "live",
  "demoDisclaimer": "",
  "noticeId": "abc-123",
  "title": "Cloud security support services",
  "changeType": "amended",
  "changeSummary": "Changed: response deadline, attachments",
  "changedFields": ["responseDeadline", "resourceLinks"],
  "deadlineChanged": true,
  "attachmentsChanged": true,
  "fitScore": 65,
  "fitReasons": [
    { "type": "naics", "points": 25, "matches": ["541512"] }
  ],
  "responseDeadline": "2026-08-15",
  "sourceUrl": "https://sam.gov/opp/..."
}
```

### Recommended schedule

Save a task with stable fit criteria and schedule it daily. SAM.gov says active opportunity data is updated daily.

### Output views

- **Qualified opportunities** prioritizes fit, change type, buyer, deadline, codes, set-aside, and the SAM.gov source link.
- **Amendment review** prioritizes the material change summary and deadline, attachment, and status flags.

### Monetization events

- `qualified-opportunity` — a new opportunity at or above the buyer's fit threshold
- `qualified-amendment` — a previously seen qualifying opportunity with a material change or cancellation

Current Blaidlink event prices are **$0.02 per qualified new opportunity** and **$0.03 per qualified amendment**. Apify platform usage is billed separately to the customer. These prices describe the live Store configuration; they do not imply a guaranteed result count, savings amount, eligibility decision, or award probability.

### Responsible use

This Actor retrieves public procurement notices. Buyers remain responsible for checking eligibility, solicitation documents, amendments, deadlines, controlled attachments, and SAM.gov terms before acting.

# Actor input Schema

## `demoMode` (type: `boolean`):

Emits one clearly labeled synthetic opportunity for a zero-credential first run and Store health checks. A supplied API key always runs live data.

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

Your SAM.gov public API key. It is sent only to api.sam.gov and is never written to output or logs.

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

MM/DD/YYYY. Defaults to seven days ago.

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

MM/DD/YYYY. Defaults to today.

## `procurementStatus` (type: `string`):

SAM.gov procurement status to request. Use all to include any status returned for the date range.

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

Terms that indicate a relevant title or notice.

## `capabilityTerms` (type: `array`):

Products, services, certifications, technologies, or buyer language your company matches.

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

Exact NAICS codes that match the company's target work.

## `pscCodes` (type: `array`):

Exact Product Service Codes or classification codes to prioritize.

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

Exact set-aside labels or codes the company is eligible to pursue.

## `minFitScore` (type: `integer`):

Only opportunities meeting this deterministic 0–100 score are eligible for output.

## `onlyNewOrChanged` (type: `boolean`):

Suppress unchanged qualifying notices on later scheduled runs.

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

Maximum records requested from SAM.gov before local fit filtering.

## `resetBaseline` (type: `boolean`):

Treat all qualifying records as new and replace stored hashes.

## Actor input object example

```json
{
  "demoMode": true,
  "procurementStatus": "all",
  "keywords": [],
  "capabilityTerms": [],
  "naicsCodes": [],
  "pscCodes": [],
  "setAsideCodes": [],
  "minFitScore": 25,
  "onlyNewOrChanged": true,
  "maxResults": 200,
  "resetBaseline": false
}
```

# Actor output Schema

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

// Run the Actor and wait for it to finish
const run = await client.actor("blaidlink/sam-opportunity-fit-amendment-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("blaidlink/sam-opportunity-fit-amendment-monitor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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 blaidlink/sam-opportunity-fit-amendment-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=blaidlink/sam-opportunity-fit-amendment-monitor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "SAM.gov Contract Opportunities & Amendment Monitor",
        "description": "Find SAM.gov government contract opportunities, score business fit, and monitor solicitations, RFP deadlines, attachments, cancellations, and amendments.",
        "version": "0.2",
        "x-build-id": "uK4MI3JvsEPyI4bs1"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/blaidlink~sam-opportunity-fit-amendment-monitor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-blaidlink-sam-opportunity-fit-amendment-monitor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/blaidlink~sam-opportunity-fit-amendment-monitor/runs": {
            "post": {
                "operationId": "runs-sync-blaidlink-sam-opportunity-fit-amendment-monitor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/blaidlink~sam-opportunity-fit-amendment-monitor/run-sync": {
            "post": {
                "operationId": "run-sync-blaidlink-sam-opportunity-fit-amendment-monitor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "demoMode": {
                        "title": "Run a synthetic demo when no API key is provided",
                        "type": "boolean",
                        "description": "Emits one clearly labeled synthetic opportunity for a zero-credential first run and Store health checks. A supplied API key always runs live data.",
                        "default": true
                    },
                    "apiKey": {
                        "title": "SAM.gov personal API key",
                        "type": "string",
                        "description": "Your SAM.gov public API key. It is sent only to api.sam.gov and is never written to output or logs."
                    },
                    "postedFrom": {
                        "title": "Posted from",
                        "type": "string",
                        "description": "MM/DD/YYYY. Defaults to seven days ago."
                    },
                    "postedTo": {
                        "title": "Posted to",
                        "type": "string",
                        "description": "MM/DD/YYYY. Defaults to today."
                    },
                    "procurementStatus": {
                        "title": "Opportunity status",
                        "enum": [
                            "all",
                            "active",
                            "inactive",
                            "archived",
                            "cancelled",
                            "deleted"
                        ],
                        "type": "string",
                        "description": "SAM.gov procurement status to request. Use all to include any status returned for the date range.",
                        "default": "all"
                    },
                    "keywords": {
                        "title": "Opportunity keywords",
                        "type": "array",
                        "description": "Terms that indicate a relevant title or notice.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "capabilityTerms": {
                        "title": "Company capability terms",
                        "type": "array",
                        "description": "Products, services, certifications, technologies, or buyer language your company matches.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "naicsCodes": {
                        "title": "NAICS codes",
                        "type": "array",
                        "description": "Exact NAICS codes that match the company's target work.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "pscCodes": {
                        "title": "PSC/classification codes",
                        "type": "array",
                        "description": "Exact Product Service Codes or classification codes to prioritize.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "setAsideCodes": {
                        "title": "Set-aside codes",
                        "type": "array",
                        "description": "Exact set-aside labels or codes the company is eligible to pursue.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "minFitScore": {
                        "title": "Minimum fit score",
                        "minimum": 0,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Only opportunities meeting this deterministic 0–100 score are eligible for output.",
                        "default": 25
                    },
                    "onlyNewOrChanged": {
                        "title": "Only emit new or amended opportunities",
                        "type": "boolean",
                        "description": "Suppress unchanged qualifying notices on later scheduled runs.",
                        "default": true
                    },
                    "maxResults": {
                        "title": "Maximum API records",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum records requested from SAM.gov before local fit filtering.",
                        "default": 200
                    },
                    "resetBaseline": {
                        "title": "Reset persistent baseline",
                        "type": "boolean",
                        "description": "Treat all qualifying records as new and replace stored hashes.",
                        "default": false
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
