# Federal Contract Opportunity Monitor (`george.the.developer/federal-contract-opportunity-monitor`) Actor

Monitor normalized SAM.gov opportunities and USAspending award data for GovCon advisors, federal sales teams, and lead services.

- **URL**: https://apify.com/george.the.developer/federal-contract-opportunity-monitor.md
- **Developed by:** [George Kioko](https://apify.com/george.the.developer) (community)
- **Categories:** Business, Lead generation
- **Stats:** 1 total users, 1 monthly users, 0.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## 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.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.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/platform/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

## Federal Contract Opportunity Monitor

Federal contract opportunities post hourly on SAM.gov. Pulling them by hand stopped scaling at the 50th RFI.

This actor turns public SAM.gov opportunity search results and USAspending award records into a normalized feed for GovCon advisors, federal sales teams, MSPs, and lead generation services. It is built for teams that need an API first contract signal, not another browser tab.

The actor runs in Standby mode for low latency API calls and also supports batch runs through Apify input. It uses the public SAM.gov internal opportunity search endpoint and the public USAspending awards API. No SAM.gov API key is required.

### Quick start

Fetch recent consulting opportunities:

```bash
curl "https://api.apify.com/v2/acts/USERNAME~federal-contract-opportunity-monitor/run-sync-get-dataset-items?token=APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mode":"opportunities","keyword":"consulting","days":90,"limit":3}'
````

Fetch partnership leads from recent awarded contracts:

```bash
curl "https://api.apify.com/v2/acts/USERNAME~federal-contract-opportunity-monitor/run-sync-get-dataset-items?token=APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mode":"leads","keyword":"consulting","awarded_amount_min":100000,"limit":3}'
```

Standby endpoints:

| Endpoint | Purpose |
|---|---|
| `GET /` | Service metadata and pricing |
| `GET /health` | Service metadata and readiness |
| `GET /opportunities?keyword=&psc=&days=&limit=&topic=` | Recent SAM.gov opportunities |
| `GET /opportunity?id=` | One SAM.gov opportunity detail |
| `GET /awards?recipient=&fiscal_year=&limit=` | USAspending awarded contracts |
| `GET /leads?keyword=&awarded_amount_min=&days=&limit=` | Prime and subcontractor partnership leads |
| `POST /opportunities/bulk` | Up to 20 keyword searches in one request |

### Flow

```mermaid
flowchart LR
  A[Input keyword, PSC, topic, recipient, or fiscal year] --> B[SAM.gov opportunity search]
  A --> C[USAspending award search]
  B --> D[Normalize opportunity fields]
  C --> E[Normalize award rows]
  D --> F[Deterministic topic tagging]
  E --> G[Optional lead aggregation]
  F --> H[Dataset and JSON response]
  G --> H
```

### Opportunity schema

| Field | Type | Notes |
|---|---|---|
| `opportunity_id` | string | SAM solicitation number or fallback ID |
| `title` | string | Opportunity title |
| `type` | string | Solicitation, Sources Sought, Presolicitation, or source value |
| `is_active` | boolean | SAM.gov active flag |
| `is_canceled` | boolean | SAM.gov canceled flag |
| `posted_date` | ISO date | Publish date |
| `response_deadline` | ISO date or null | Response date when present |
| `agency` | string or null | Buying agency from SAM hierarchy |
| `office` | string or null | Contracting office from SAM hierarchy |
| `naics_codes` | string array | NAICS codes |
| `psc_codes` | object array | PSC code and label pairs |
| `set_aside` | string or null | Set aside value when available |
| `place_of_performance` | string or null | Place text when available |
| `ceiling_amount_usd` | number or null | Amount when present in source |
| `description` | string | First 1000 characters |
| `topic_tags` | string array | Deterministic keyword tags |
| `matched_keywords` | string array | User keyword matches |
| `sam_url` | string | SAM.gov opportunity URL or search URL |
| `fetched_at` | ISO date | Fetch timestamp |

### Lead schema

| Field | Type | Notes |
|---|---|---|
| `lead_id` | string | Stable generated lead key |
| `recipient_name` | string | USAspending recipient |
| `duns_uei` | string or null | UEI when provided by source |
| `primary_naics` | string or null | Reserved for future recipient enrichment |
| `recent_award_count_2y` | number | Recent matching awards in the lookup window |
| `recent_award_amount_total_usd` | number | Total matching award amount |
| `top_buying_agency` | string or null | Most frequent agency among sample awards |
| `matched_keyword` | string | Keyword used for the lead search |
| `topic_tags` | string array | Deterministic topic tags |
| `lead_band` | string | `warm`, `qualified`, or `priority` |
| `lead_rationale` | string | Short deterministic rationale |
| `sample_awards` | object array | Up to 3 normalized award rows |
| `fetched_at` | ISO date | Fetch timestamp |

Lead bands are deterministic. `warm` means one recent award and less than $500K total. `qualified` means 2 to 4 awards or $500K to $5M total. `priority` means 5 or more awards or more than $5M total.

### Topic tagging

Default categories are keyword based and deterministic: `it-services`, `professional-services`, `construction`, `medical`, `r-and-d`, `logistics`, `compliance-services`, and `training`. Pass `topic=` to filter by one of those categories, or pass `keyword=` to search for a custom term.

### Pricing

| Event | Price | When charged |
|---|---:|---|
| Actor start | $1.00 | Once per paid Standby request or batch run |
| Opportunity | $0.10 | Per opportunity or award row returned |
| Prime sub lead | $0.50 | Per partnership lead returned |

Health check payloads such as `test`, `ping`, and `https://example.com` return mock data and do not call upstream sources.

### Comparison

| Option | Fit | Tradeoff |
|---|---|---|
| SAM.gov directly | Raw opportunity search | No normalized schema, no topic tagging, no lead generation |
| GovCon enterprise SaaS such as Govini or Bloomberg Government | Enterprise research teams | High contract value, broad platform, not a simple builder API |
| This actor | Builders, advisors, and federal sales teams | API first feed with normalized records and deterministic lead aggregation |

### Use cases

1. GovCon advisor lead enrichment for firms that need new contract signals.
2. Federal sales team opportunity feed by topic, PSC, keyword, or NAICS.
3. Subcontract introduction outreach from recent award recipient data.
4. Recipient watch lists for consulting firms and MSPs tracking prime activity.
5. NAICS specific opportunity digests for newsletters and internal alerts.

### FAQ

**How fresh is coverage?** SAM.gov opportunities are fetched live at request time. USAspending award data depends on agency reporting cadence.

**Can I customize topics?** Yes. Use `keyword=` for custom matching or `topic=` for the shipped deterministic topic set.

**Does USAspending lag?** Yes. Award reporting can lag behind contract activity, so leads are best treated as sales signals, not real time award alerts.

**Are there rate limits?** The actor keeps requests bounded with `limit` and upstream timeouts. For large monitoring jobs, run smaller scheduled batches.

**Do health checks cost money?** Mock health check payloads short circuit and return sample shaped data.

**Who do I contact for support?** Use the Apify actor issue tab or contact the actor owner through the Apify Store profile.

# Actor input Schema

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

Batch mode to run outside Standby.

## `keyword` (type: `string`):

Keyword for SAM.gov opportunities or USAspending leads.

## `topic` (type: `string`):

Optional deterministic topic category.

## `psc` (type: `string`):

Optional PSC prefix filter, such as R or 7G.

## `days` (type: `integer`):

Lookback window in days.

## `limit` (type: `integer`):

Maximum rows to return.

## `id` (type: `string`):

Solicitation ID for opportunity detail mode.

## `recipient` (type: `string`):

Recipient name for awarded contract lookup.

## `fiscal_year` (type: `integer`):

Federal fiscal year for awarded contract lookup.

## `awarded_amount_min` (type: `integer`):

Minimum USAspending award amount for lead generation.

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

Bulk keyword list, maximum 20.

## Actor input object example

```json
{
  "mode": "opportunities",
  "keyword": "consulting",
  "days": 90,
  "limit": 25,
  "awarded_amount_min": 100000
}
```

# 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("george.the.developer/federal-contract-opportunity-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("george.the.developer/federal-contract-opportunity-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 george.the.developer/federal-contract-opportunity-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=george.the.developer/federal-contract-opportunity-monitor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Federal Contract Opportunity Monitor",
        "description": "Monitor normalized SAM.gov opportunities and USAspending award data for GovCon advisors, federal sales teams, and lead services.",
        "version": "1.0",
        "x-build-id": "Pb3JOgoaw8b7ZtTOa"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/george.the.developer~federal-contract-opportunity-monitor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-george.the.developer-federal-contract-opportunity-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/george.the.developer~federal-contract-opportunity-monitor/runs": {
            "post": {
                "operationId": "runs-sync-george.the.developer-federal-contract-opportunity-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/george.the.developer~federal-contract-opportunity-monitor/run-sync": {
            "post": {
                "operationId": "run-sync-george.the.developer-federal-contract-opportunity-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": {
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "opportunities",
                            "opportunity",
                            "awards",
                            "leads",
                            "bulk"
                        ],
                        "type": "string",
                        "description": "Batch mode to run outside Standby.",
                        "default": "opportunities"
                    },
                    "keyword": {
                        "title": "Keyword",
                        "type": "string",
                        "description": "Keyword for SAM.gov opportunities or USAspending leads.",
                        "default": "consulting"
                    },
                    "topic": {
                        "title": "Topic",
                        "enum": [
                            "it-services",
                            "professional-services",
                            "construction",
                            "medical",
                            "r-and-d",
                            "logistics",
                            "compliance-services",
                            "training"
                        ],
                        "type": "string",
                        "description": "Optional deterministic topic category."
                    },
                    "psc": {
                        "title": "PSC",
                        "type": "string",
                        "description": "Optional PSC prefix filter, such as R or 7G."
                    },
                    "days": {
                        "title": "Days",
                        "minimum": 1,
                        "maximum": 3650,
                        "type": "integer",
                        "description": "Lookback window in days.",
                        "default": 90
                    },
                    "limit": {
                        "title": "Limit",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum rows to return.",
                        "default": 25
                    },
                    "id": {
                        "title": "SAM solicitation ID",
                        "type": "string",
                        "description": "Solicitation ID for opportunity detail mode."
                    },
                    "recipient": {
                        "title": "Recipient",
                        "type": "string",
                        "description": "Recipient name for awarded contract lookup."
                    },
                    "fiscal_year": {
                        "title": "Fiscal year",
                        "type": "integer",
                        "description": "Federal fiscal year for awarded contract lookup."
                    },
                    "awarded_amount_min": {
                        "title": "Minimum awarded amount",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Minimum USAspending award amount for lead generation.",
                        "default": 100000
                    },
                    "keywords": {
                        "title": "Keywords",
                        "type": "array",
                        "description": "Bulk keyword list, maximum 20.",
                        "items": {
                            "type": "string"
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
