# SAM.gov Contract Opportunities + AI Bid Summaries (`mastercreator_ai/sam-gov-contract-opportunities-ai`) Actor

Find US federal contract opportunities on SAM.gov by keyword, notice type, deadline and agency — no API key needed. Optional AI bid briefs per notice: summary, ideal bidder, key requirements, red flags. Add a free SAM.gov key for NAICS, state and set-aside filters.

- **URL**: https://apify.com/mastercreator_ai/sam-gov-contract-opportunities-ai.md
- **Developed by:** [MasterCreator AI](https://apify.com/mastercreator_ai) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.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

## SAM.gov Contract Opportunities + AI Bid Summaries

Find **US federal contract opportunities** on SAM.gov in seconds — **no API key required** — and optionally get an **AI bid/no-bid brief** for every notice.

### Why this Actor

- **Works without a SAM.gov key.** Just type keywords. Add your free SAM.gov key later to unlock NAICS, state and set-aside filters plus points of contact.
- **AI bid summaries (optional).** For each notice: plain-English summary, what the agency wants, ideal bidder, key requirements, red flags and bid difficulty. Uses your own Anthropic key, so you control AI cost.
- **Deadline-aware.** Every row has daysLeft; filter out notices you can't realistically answer with minDaysLeft.
- **Clean, flat output** ready for Google Sheets, CRMs, Slack/email alerts, Make, n8n or Zapier.

### Output fields

noticeId, title, solicitationNumber, noticeType, postedDate, responseDeadline, daysLeft, agency, subAgency, office, officeCity, officeState, naicsCode\*, setAside\*, placeOfPerformanceState\*, pointOfContact\*, awardee, description, url, ai (when enabled).

\* available when you provide a SAM.gov API key.

Example ai block:

```json
{
  "summary": "DLA needs 10 replacement antennas delivered FOB destination within 60 days.",
  "whatTheyWant": "Antenna supply, specific part number",
  "idealBidder": "Electronics distributors with traceable OEM parts",
  "keyRequirements": [
    "Exact P/N or approved equivalent",
    "Traceability docs",
    "Delivery in 60 days"
  ],
  "redFlags": [
    "Short response window"
  ],
  "bidDifficulty": "low"
}
```

### Input example — daily alert

```json
{
  "keywords": [
    "cybersecurity",
    "zero trust"
  ],
  "noticeTypes": [
    "o",
    "k",
    "r"
  ],
  "postedWithinDays": 1,
  "minDaysLeft": 7,
  "aiSummary": true,
  "anthropicApiKey": "sk-ant-..."
}
```

Schedule it every morning and send the dataset to email or Slack — a GovCon bid desk for a few cents a day.

### Use cases

- Small businesses and 8(a)/WOSB/SDVOSB firms hunting for bids
- GovCon consultants and capture managers building pipelines
- Resellers and distributors monitoring DLA / supply notices
- AI agents answering "what federal opportunities for X are open?" via Apify MCP

### Pricing

Pay per result: a small fee per opportunity saved, plus a small fee per AI summary when enabled. Anthropic bills AI tokens directly to your own key.

### Notes

This Actor reads public data from SAM.gov. It is not affiliated with or endorsed by the US General Services Administration.

# Actor input Schema

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

Search terms, e.g. 'cybersecurity', 'janitorial services', 'drone'. One search per keyword; duplicates removed. Empty = latest notices.

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

Keep only these notice types. Empty = all.

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

Skip archived / inactive notices.

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

Only notices posted in this window. Use 1 for a daily alert.

## `minDaysLeft` (type: `integer`):

Skip notices whose response deadline is sooner than this (or missing).

## `agencyContains` (type: `array`):

Keep only notices whose agency / sub-agency / office contains any of these words, e.g. 'Army', 'Veterans', 'NASA'.

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

Maximum number of opportunities to save.

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

Optional. A free key from your SAM.gov account (Account Details > Public API Key) unlocks NAICS, state, set-aside filters and points of contact.

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

e.g. 541512, 561720.

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

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

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

e.g. SBA (Total Small Business), 8A, WOSB, SDVOSBC, HZC.

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

Add an AI analysis to each notice: plain-English summary, what they want, ideal bidder, key requirements, red flags and bid difficulty. Requires your Anthropic API key.

## `anthropicApiKey` (type: `string`):

Your own key from console.anthropic.com. Used only for the AI summaries; AI token costs are billed by Anthropic to your account.

## `aiModel` (type: `string`):

Claude model ID used for summaries.

## Actor input object example

```json
{
  "keywords": [
    "cybersecurity"
  ],
  "activeOnly": true,
  "postedWithinDays": 30,
  "maxResults": 100,
  "aiSummary": false,
  "aiModel": "claude-haiku-4-5"
}
```

# 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 = {
    "keywords": [
        "cybersecurity"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("mastercreator_ai/sam-gov-contract-opportunities-ai").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"] }

# Run the Actor and wait for it to finish
run = client.actor("mastercreator_ai/sam-gov-contract-opportunities-ai").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"
  ]
}' |
apify call mastercreator_ai/sam-gov-contract-opportunities-ai --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,mastercreator_ai/sam-gov-contract-opportunities-ai"
        }
    }
}
```

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/JsbbRUuTddvhg1H3F/builds/vsp9ghGQxQX8Nr6pL/openapi.json
