# SAM.gov Contract Opportunities + Similar Past Awards (`contented_catwalk/sam-gov-contract-opportunities`) Actor

Search open federal contract opportunities from SAM.gov's public daily extract by keyword, NAICS, set-aside, agency and deadline. Each notice lists similar past awards from USAspending.gov. Only-new mode for daily alerts. $1.50 per 1,000 notices; empty runs are free.

- **URL**: https://apify.com/contented_catwalk/sam-gov-contract-opportunities.md
- **Developed by:** [Orvix](https://apify.com/contented_catwalk) (community)
- **Categories:** Lead generation, Business
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.50 / 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 + Similar Past Awards

Search **open federal contract opportunities** from SAM.gov by keyword, NAICS code, set-aside, agency, posted date and response deadline. Turn on **only-new mode** and schedule it daily to get each new notice once. Each notice also lists **similar past awards**: the largest federal contracts in the same NAICS code from the same awarding agency over the last 3 years, taken from USAspending.gov, with a link to each award.

Similar past awards are context, not the incumbent. They show who has won this kind of work from this agency before. They do not say who holds this exact contract.

### Where the data comes from

- **Opportunities:** SAM.gov's public Contract Opportunities extract (`ContractOpportunitiesFullCSV.csv`, linked from sam.gov Data Services). It is refreshed once a day, so notices posted today usually appear the next day. Each run reports the extract date in `SUMMARY`. No SAM.gov account or API key is used.
- **Similar past awards:** the public USAspending.gov API (no key). We pause between calls and reuse results within a run.

### What you can use it for

- **Daily bid alerts:** your NAICS codes and set-asides, `onlyNew: true`, daily schedule, sent to email, Slack or Google Sheets.
- **Small-business pipelines:** `setAsideCodes: ["SBA", "8A", "SDVOSBC", "WOSB", "HZC"]`.
- **Competitive context:** see who has won similar work from that agency before you bid.
- **AI agents:** structured notices with deadlines and links instead of scraping sam.gov pages.

### Input example

```json
{
  "naicsCodes": ["484"],
  "setAsideCodes": ["SBA"],
  "keywords": ["moving", "freight"],
  "keywordsIn": "title",
  "agencies": ["AIR FORCE"],
  "responseDeadlineFrom": "2026-11-05",
  "onlyNew": true,
  "stateKey": "trucking",
  "maxResults": 200
}
```

- `naicsCodes` match by prefix, so `484` covers every trucking code.
- `keywords` match the title and description by default. Descriptions often carry boilerplate clauses (cybersecurity, for example), so `keywordsIn: "title"` gives fewer false matches.
- With `activeOnly` on (the default), notices whose response deadline has passed are skipped.
- SAM.gov posts each amendment as a new notice. `latestVersionOnly` (on by default) keeps only the newest notice per solicitation number.

### Output example

```json
{
  "noticeId": "c8bd181ec7cd4f0f9577817ff1050fc4",
  "title": "Cybersecurity Engineering and DoD Risk Management Framework (RMF) Support Services",
  "solicitationNumber": "W91CRB-27-B-A001",
  "type": "Solicitation",
  "department": "DEPT OF DEFENSE",
  "postedDate": "2026-10-29 14:50:11",
  "responseDeadline": "2026-11-12T17:00:00-05:00",
  "naicsCode": "541519",
  "setAsideCode": "8A",
  "url": "https://sam.gov/workspace/contract/opp/c8bd181ec7cd4f0f9577817ff1050fc4/view",
  "contacts": [{ "role": "Primary", "name": "...", "email": "...", "phone": "..." }],
  "similarPastAwards": {
    "note": "Similar past awards in the same NAICS and agency. Not the incumbent for this notice unless the notice itself names one.",
    "scope": "Top 3 contract awards by amount, NAICS 541519, awarding agency Department of Defense, action dates 2023-11-05 to 2026-11-04 (USAspending.gov)",
    "awards": [{ "awardId": "HC108421F0175", "recipient": "WORLD WIDE TECHNOLOGY LLC", "amountUsd": 627456697.85, "awardingSubAgency": "Defense Information Systems Agency", "url": "https://www.usaspending.gov/award/CONT_AWD_HC108421F0175_9700_NNG15SC55B_8000" }]
  }
}
```

- `postedDate` is shown as SAM.gov's extract gives it, in US Eastern time (EDT or EST, depending on the date), without an offset. `responseDeadline` keeps its own offset.
- `contacts` holds the government point-of-contact names, emails and phones exactly as SAM.gov publishes them. Set `includeContacts: false` to leave them out.
- The awarding agency for similar awards comes from the posting office's agency code. Notices that one agency posts for another (GSA for DOE, for example) use the posting agency. If that agency has no awards in the NAICS code, we fall back to all agencies and the `scope` line says so. If USAspending is down, `similarPastAwards.error` is set and the notice is still delivered.

### Pricing

Pay per opportunity delivered: **$0.0015** per notice, similar past awards included. There is no start fee. Empty runs, and runs that fail before delivering anything, are free. You pay only for notices delivered. `maxResults` caps the cost of every run.

### For AI agents

Agents can run this through the Apify MCP server or API and pay per run with x402 (USDC on Base) or Skyfire. Agent payments are not yet tested for this actor. See [docs.apify.com/agents/payments](https://docs.apify.com/agents/payments).

### Limits

- SAM.gov refreshes the extract once a day, so this is not real-time.
- Attachments and full award histories are not downloaded.
- Not legal or bid advice. Always confirm the details on the sam.gov notice before you bid.

# Actor input Schema

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

Match any word or phrase in the title or description (case-insensitive).

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

Prefix match, e.g. 484 matches all trucking, 541512 one code.

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

SAM.gov codes, e.g. SBA (Total Small Business), 8A, SDVOSBC, WOSB, HZC, NONE.

## `agencies` (type: `array`):

Match any text in department, sub-tier or office, e.g. VETERANS AFFAIRS, ARMY.

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

e.g. Solicitation, Combined Synopsis, Sources Sought, Presolicitation, Award Notice.

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

Default 30 days ago (7 in only-new mode).

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

Default today.

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

Default today when Active only is on.

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

Optional.

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

Only active notices.

## `onlyNew` (type: `boolean`):

Daily alert mode: skip notices already delivered under this state key.

## `includeSimilarAwards` (type: `boolean`):

USAspending.gov top contract awards in the same NAICS and agency (last 3 years).

## `includeContacts` (type: `boolean`):

Contracting officer name, email and phone as published by SAM.gov.

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

Long text.

## `stateKey` (type: `string`):

Separate only-new memory per alert.

## `similarAwardsPerRecord` (type: `integer`):

1-10.

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

Caps cost.

## `keywordsIn` (type: `string`):

Descriptions often include boilerplate clauses (e.g. cybersecurity), so Title only is stricter.

## `latestVersionOnly` (type: `boolean`):

SAM.gov posts each amendment as a new notice. On: keep only the newest notice per solicitation number.

## Actor input object example

```json
{
  "keywords": [
    "cybersecurity"
  ],
  "activeOnly": true,
  "onlyNew": false,
  "includeSimilarAwards": true,
  "includeContacts": true,
  "includeDescription": false,
  "stateKey": "default",
  "similarAwardsPerRecord": 3,
  "maxResults": 100,
  "keywordsIn": "titleAndDescription",
  "latestVersionOnly": true
}
```

# Actor output Schema

## `opportunities` (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"
    ]
};

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

```

## MCP server setup

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

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/I67CNaB0O72YHpkJL/builds/HwNNsZQRz9fDEDF0g/openapi.json
