# SAM.gov Federal Contract Opportunity Alert (`fried_calamaries/samgov-opportunity-alert`) Actor

Get alerted to new US federal contract opportunities matching your NAICS, agency, keyword, and set-aside filters — from the official SAM.gov registry.

- **URL**: https://apify.com/fried\_calamaries/samgov-opportunity-alert.md
- **Developed by:** [ByteMe](https://apify.com/fried_calamaries) (community)
- **Categories:** Lead generation
- **Stats:** 2 total users, 1 monthly users, 66.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.01 / new opportunity

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 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

## SAM.gov Federal Contract Opportunity Alert

### Pain points

- SAM.gov isn't built for monitoring — you re-run the same search by hand to spot what's new.
- Generic SAM scrapers dump every notice; you re-filter and re-dedup every time.
- Missing a solicitation's response deadline means missing the bid entirely.

### What we solve

- Alerts you to only the NEW opportunities matching your NAICS, agency, keyword, and set-aside.
- Dedupes across runs, so a scheduled run only ever surfaces what you haven't seen.
- Returns deadline, set-aside, agency, and the SAM.gov link — pay per new match, empty polls free.

### Summary

Monitor SAM.gov for new federal contract opportunities that fit your business. Set your NAICS codes, agency, title keyword, and set-aside, schedule the actor, and each run returns only the opportunities you haven't seen before — with response deadline, set-aside, agency, and a direct SAM.gov link. Built for recurring runs with Apify's native email/Slack/webhook integrations.

### Who it's for

- Government contractors and BD teams tracking new solicitations
- Small businesses bidding set-aside opportunities (8(a), WOSB, SDVOSB)
- Capture managers monitoring specific agencies or NAICS codes
- GovCon consultants and proposal shops

### How to use

Set the input, run the actor, and collect results from the run's dataset (export to JSON/CSV/Excel, or pull via the Apify API). Example input:

```json
{
  "naicsCodes": [
    "541512"
  ],
  "setAside": "SBA",
  "lookbackDays": 1,
  "maxResults": 100
}
````

See **Inputs** below for every available field.

### What you get

One row per record:

| Field | Description |
|---|---|
| `notice_id` | SAM.gov notice ID |
| `title` | Opportunity title |
| `solicitation_number` | Solicitation number |
| `agency` | Buying agency / department hierarchy |
| `notice_type` | Notice type (Solicitation, Combined Synopsis, etc.) |
| `naics_code` | NAICS industry code |
| `set_aside` | Set-aside type (e.g. Total Small Business) |
| `posted_date` | Date the notice was posted |
| `response_deadline` | Offer/response due date |
| `archive_date` | Date the notice archives |
| `place_of_performance_state` | State where work is performed |
| `contact_name` | Primary point of contact |
| `contact_email` | Primary contact email |
| `is_new` | True if first seen this run (charged); false on the baseline run |
| `ui_link` | Direct link to the opportunity on SAM.gov |

Sample:

```json
{
  "notice_id": "abc123def456",
  "title": "IT Support Services",
  "solicitation_number": "W912-26-R-0001",
  "agency": "DEPT OF DEFENSE.DEPT OF THE ARMY.ACC",
  "notice_type": "Solicitation",
  "naics_code": "541512",
  "set_aside": "Total Small Business Set-Aside (FAR 19.5)",
  "posted_date": "2026-06-20",
  "response_deadline": "2026-07-05T17:00:00-04:00",
  "archive_date": "2026-07-20",
  "place_of_performance_state": "VA",
  "contact_name": "Jane Doe",
  "contact_email": "jane.doe@army.mil",
  "is_new": true,
  "ui_link": "https://sam.gov/workspace/contract/opp/abc123def456/view",
  "source_url": "https://sam.gov/workspace/contract/opp/abc123def456/view"
}
```

### Inputs

| Field | Required | Type | Default | Description |
|---|---|---|---|---|
| `naicsCodes` | no | array | `["541512"]` | Industry codes to match (e.g. '541512'). Leave empty to match any industry. |
| `keyword` | no | string | — | Free-text match on the opportunity title (e.g. 'cybersecurity'). |
| `agency` | no | string | — | Buying department name (e.g. 'GENERAL SERVICES ADMINISTRATION'). |
| `setAside` | no | string | — | Set-aside code, e.g. SBA (small business), 8A, WOSB, SDVOSBC. Leave empty for all. |
| `lookbackDays` | no | integer | `1` | Fetch opportunities posted within this many days. Dedup ensures each is returned once across runs; a small window suits frequent schedules. |
| `maxResults` | no | integer | `100` | Cap on opportunities fetched per run. |

### Pricing (Pay Per Event)

You pay per result (`dataset-item`) — **no charge for empty runs**. Example: **50 new opportunities** at *$0.01/result* ≈ **$0.50**.

Illustrative — final per-result price set at publish time. Baseline run and empty polls are free. Apify platform usage billed separately.

### Use cases

- Daily alert — schedule a run per NAICS/agency and get only the new opportunities each morning.
- Set-aside monitoring — track small-business or 8(a) solicitations the moment they post.
- Agency watch — follow a target agency's new contract notices.
- Pipeline feed — pipe new matches into a CRM or Slack via Apify integrations.

### Why this actor

- New-only: dedupes across runs, so you act on what you haven't seen — not the whole haystack.
- Official source: the GSA Get Opportunities API, not a stale third-party copy.
- Pay per new match; baseline and empty polls are free.

### Limitations & updates

Covers the SAM.gov 'Contract Opportunities' dataset via the official GSA API. Results reflect the live registry. Contract-value filtering isn't supported (SAM.gov only publishes amounts on awarded notices). The first run for a given filter set is a free baseline; subsequent runs alert on new opportunities.

### FAQ

**Where does the data come from?**

The official GSA Get Opportunities (SAM.gov) public API.

**How is 'new' determined?**

The actor remembers opportunities it has seen for your filter set; each run emits only ones not seen before. The first run is a free baseline.

**Can I get email or Slack alerts?**

Yes — schedule the actor and connect Apify's native email/Slack/webhook integrations to new dataset items.

**Can I filter by contract value?**

Not reliably — SAM.gov only publishes a dollar amount on awarded notices, not open solicitations, so value filtering isn't offered.

**How am I charged?**

Per new opportunity returned. The baseline run and runs with no new matches are free.

### Which actor to choose

Part of the public-data lead-gen suite — pick the one that fits your goal:

- **Multi-State Contractor License Lookup** — You need to verify contractor/trade licenses across US states.
- **California Contractor Directory** — You want CSLB contractor lead lists by class and county.

# Actor input Schema

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

Industry codes to match (e.g. '541512'). Leave empty to match any industry.

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

Free-text match on the opportunity title (e.g. 'cybersecurity').

## `agency` (type: `string`):

Buying department name (e.g. 'GENERAL SERVICES ADMINISTRATION').

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

Set-aside code, e.g. SBA (small business), 8A, WOSB, SDVOSBC. Leave empty for all.

## `lookbackDays` (type: `integer`):

Fetch opportunities posted within this many days. Dedup ensures each is returned once across runs; a small window suits frequent schedules.

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

Cap on opportunities fetched per run.

## Actor input object example

```json
{
  "naicsCodes": [
    "541512"
  ],
  "lookbackDays": 1,
  "maxResults": 100
}
```

# Actor output Schema

## `opportunities` (type: `string`):

Matching opportunities — title, agency, NAICS, set-aside, deadline, and link.

# 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("fried_calamaries/samgov-opportunity-alert").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("fried_calamaries/samgov-opportunity-alert").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 fried_calamaries/samgov-opportunity-alert --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "SAM.gov Federal Contract Opportunity Alert",
        "description": "Get alerted to new US federal contract opportunities matching your NAICS, agency, keyword, and set-aside filters — from the official SAM.gov registry.",
        "version": "0.1",
        "x-build-id": "YubnUpBfUNilwcPhd"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/fried_calamaries~samgov-opportunity-alert/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-fried_calamaries-samgov-opportunity-alert",
                "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/fried_calamaries~samgov-opportunity-alert/runs": {
            "post": {
                "operationId": "runs-sync-fried_calamaries-samgov-opportunity-alert",
                "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/fried_calamaries~samgov-opportunity-alert/run-sync": {
            "post": {
                "operationId": "run-sync-fried_calamaries-samgov-opportunity-alert",
                "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": {
                    "naicsCodes": {
                        "title": "NAICS codes",
                        "type": "array",
                        "description": "Industry codes to match (e.g. '541512'). Leave empty to match any industry.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "keyword": {
                        "title": "Title keyword",
                        "type": "string",
                        "description": "Free-text match on the opportunity title (e.g. 'cybersecurity')."
                    },
                    "agency": {
                        "title": "Agency / department",
                        "type": "string",
                        "description": "Buying department name (e.g. 'GENERAL SERVICES ADMINISTRATION')."
                    },
                    "setAside": {
                        "title": "Set-aside type",
                        "type": "string",
                        "description": "Set-aside code, e.g. SBA (small business), 8A, WOSB, SDVOSBC. Leave empty for all."
                    },
                    "lookbackDays": {
                        "title": "Look-back window (days)",
                        "minimum": 1,
                        "maximum": 365,
                        "type": "integer",
                        "description": "Fetch opportunities posted within this many days. Dedup ensures each is returned once across runs; a small window suits frequent schedules.",
                        "default": 1
                    },
                    "maxResults": {
                        "title": "Maximum results",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Cap on opportunities fetched per run.",
                        "default": 100
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
