# GovCon Monitor - SAM.gov + Expiring Contract Recompetes (`splendorous_astrolabe_xs9/govcon-monitor`) Actor

SAM.gov opportunities joined with USAspending award history. Recompete radar finds expiring incumbent contracts before they hit the street.

- **URL**: https://apify.com/splendorous\_astrolabe\_xs9/govcon-monitor.md
- **Developed by:** [Mike](https://apify.com/splendorous_astrolabe_xs9) (community)
- **Categories:** Lead generation, Automation
- **Stats:** 2 total users, 1 monthly users, 33.3% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00 / 1,000 contract records

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## GovCon Monitor — SAM.gov Opportunities + Expiring-Contract Recompete Radar

Federal contracting is a $700B/year market where the winners are decided long before the RFP drops. This actor is a standing monitor with three modes:

1. **opportunities** — new SAM.gov notices matching your NAICS / agency / set-aside / keyword filters (official free SAM.gov API).
2. **awards** — recently signed contract awards from USAspending (official free API, no key).
3. **recompete** — *the money mode*: contracts whose **period of performance ends within your horizon**, pulled from USAspending award history and (when you provide a SAM.gov key) joined against live SAM.gov notices to show which expirations already have a recompete posted — and which are still open field. Nobody else does this join.

### Why recompete mode matters

Every expiring contract is a future RFP. If you find it 12 months out you can shape the requirement, meet the program office, and team up. If you find it on SAM.gov, you're 6 months behind the incumbent. Recompete mode gives you, per contract: incumbent, agency, NAICS, value, end date, `days_until_expiry`, an `expiry_bucket` (0-3 / 3-6 / 6-12 / 12+ months) and `recompete_posted` with any matching live notices.

### Output sample (recompete mode)

```json
{
  "record_type": "recompete",
  "award_id": "70US0921F1DHS0015",
  "recipient": "AVER LLC",
  "awarding_agency": "Department of Homeland Security",
  "awarding_sub_agency": "Cybersecurity and Infrastructure Security Agency",
  "naics": "541512",
  "naics_description": "COMPUTER SYSTEMS DESIGN SERVICES",
  "amount": 4689264.0,
  "start_date": "2021-09-13",
  "end_date": "2027-08-03",
  "days_until_expiry": 364,
  "expiry_bucket": "6-12 months",
  "description": "CDM DEFEND TASK ORDER...",
  "usaspending_url": "https://www.usaspending.gov/award/CONT_AWD_...",
  "recompete_posted": false,
  "possible_recompete_notices": []
}
```

When a SAM.gov key is provided, `possible_recompete_notices` lists live notices whose NAICS matches and whose title overlaps the award description/incumbent (heuristic join, matched terms included so you can judge each hit).

### Input

```json
{
  "mode": "recompete",
  "samApiKey": "YOUR-FREE-SAM-GOV-KEY",
  "naicsCodes": ["541512", "541511"],
  "agencies": ["Department of Defense"],
  "setAsides": ["SBA", "SDVOSBC"],
  "keywords": ["cybersecurity"],
  "monthsAhead": 12,
  "minAwardAmount": 1000000
}
```

#### Getting your free SAM.gov API key (2 minutes, standard practice)

1. Sign in (or register, free) at [sam.gov](https://sam.gov).
2. Click your name → **Account Details**.
3. In the **API Key** section, enter your password and click **Request/Generate API Key**. Copy it into the `samApiKey` input.
4. Keys expire after 90 days — regenerate in the same place when the actor reports an auth error.

`awards` mode needs no key at all; `recompete` works without one (the live-notice join is simply skipped and `recompete_posted` is `null`).

### Use cases

- **BD pipeline for contractors** — a scheduled recompete run per NAICS is your 12-month capture list.
- **Small-business set-aside hunting** — filter opportunities by `SDVOSBC`, `8A`, `WOSB`...
- **Competitive intel** — track every award your competitors win (awards mode, keyword = their name).
- **Teaming radar** — expiring contracts where the incumbent is out of your size standard = prime/sub openings.

### Using from Claude / MCP

```json
{
  "tool": "your-username/govcon-monitor",
  "input": { "mode": "recompete", "samApiKey": "…", "naicsCodes": ["541512"], "monthsAhead": 12 }
}
```

*"Which DHS IT contracts over $1M expire in the next year and don't have a recompete posted yet?"* — one call.

### Pricing

Monthly rental: **$15/month** flat after a 7-day free trial. It's a monitoring product — schedule it daily/weekly and every run is included. (One shaped opportunity pays for a decade of subscriptions.)

### Data & fair use

Both upstream APIs are official U.S. government open-data services (SAM.gov Get Opportunities Public API, USAspending API). The SAM.gov key is **your own** and is used only against api.sam.gov; it is stored as a secret input. Requests are paced and retried with exponential backoff to stay well inside published rate limits.

# Actor input Schema

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

<b>opportunities</b>: fresh SAM.gov notices (requires your free SAM.gov API key). <b>awards</b>: recently signed awards from USAspending (no key needed). <b>recompete</b>: contracts whose period of performance ends within your horizon — incumbents to displace and RFPs to expect; enriched with matching live SAM.gov notices when a key is provided.

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

Your own free SAM.gov Public API key — takes 2 minutes to get (sam.gov → sign in → Account Details → API Key; see README). Required for <b>opportunities</b> mode; optional for <b>recompete</b> (enables the live-notice join); unused in <b>awards</b> mode.

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

NAICS codes to match, e.g. <code>541512</code> (computer systems design), <code>541511</code>, <code>236220</code>. Leave empty for all — not recommended, the firehose is large.

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

Awarding agency names (top-tier), e.g. <code>Department of Defense</code>, <code>Department of Veterans Affairs</code>, <code>General Services Administration</code>. Leave empty for all agencies.

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

Limit to these set-aside programs (SAM.gov codes). Leave empty for all.

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

Free-text keywords matched against notice titles / award descriptions (any match).

## `daysBack` (type: `integer`):

opportunities: how far back to scan posted notices. awards: window of recently signed awards.

## `monthsAhead` (type: `integer`):

recompete mode: include contracts whose period of performance ends within this many months. 12-18 months is the sweet spot — agencies typically start recompete planning about a year out.

## `minAwardAmount` (type: `integer`):

awards / recompete: ignore contracts below this obligated amount.

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

Cap on records pushed per run.

## Actor input object example

```json
{
  "mode": "recompete",
  "naicsCodes": [
    "541512"
  ],
  "agencies": [],
  "setAsides": [],
  "keywords": [],
  "daysBack": 7,
  "monthsAhead": 12,
  "minAwardAmount": 100000,
  "maxResults": 2000
}
```

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

// Run the Actor and wait for it to finish
const run = await client.actor("splendorous_astrolabe_xs9/govcon-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 = { "naicsCodes": ["541512"] }

# Run the Actor and wait for it to finish
run = client.actor("splendorous_astrolabe_xs9/govcon-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 '{
  "naicsCodes": [
    "541512"
  ]
}' |
apify call splendorous_astrolabe_xs9/govcon-monitor --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/TIOFdltAmZYxXWc8f/builds/Qa9MArtq7vk7aSih7/openapi.json
