# SAM.gov Contract Opportunities: Search & New-Notice Alerts (`frank0309/sam-gov-opportunities`) Actor

Search U.S. federal contract opportunities on SAM.gov by keyword, NAICS, set-aside, notice type and state. Each result includes the full description, contacts and attachment links. Schedule it with "only new" mode to get just the notices you haven't seen. No API key or login needed.

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

## Pricing

$2.00 / 1,000 notices

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: Search & New-Notice Alerts

Find U.S. federal contract opportunities on [SAM.gov](https://sam.gov) and get them as clean, structured data. Filter by keyword, NAICS code, set-aside, notice type and state. Each notice includes the full description, contracting contacts and direct attachment download links.

Switch on **alert mode** and schedule the Actor daily, and each run returns only the notices you haven't seen yet. That gives you a daily bid feed without paying for a GovCon subscription.

- **No API key, no login.** Works out of the box.
- **Full details.** Description, NAICS, PSC, set-aside, place of performance, points of contact, award info and attachments.
- **Alert mode.** Get only new notices on every scheduled run, tracked separately for each filter set.
- **Agent-ready output.** Flat, predictable JSON for AI proposal tools, CRMs, Slack and Google Sheets.

### Who uses it

- **Small businesses and 8(a), HUBZone, SDVOSB and WOSB firms** watching for set-aside opportunities in their NAICS codes.
- **Business-development and capture teams** feeding new solicitations into a CRM or spreadsheet.
- **Proposal writers and AI agents** that need the full description and attachments to qualify a bid.
- **Market researchers** tracking which agencies buy what.

### Input

| Field | What it does |
|---|---|
| `keywords` | Free-text search; all words must match. Leave empty to get everything that matches the filters. |
| `noticeTypes` | Solicitation, Combined Synopsis/Solicitation, Presolicitation, Sources Sought, Award Notice, and more. |
| `naicsCodes` | One or more 6-digit NAICS codes. |
| `setAsides` | Total Small Business, 8(a), HUBZone, SDVOSB, WOSB, EDWOSB, and more. |
| `placeOfPerformanceStates` | 2-letter state codes. |
| `modifiedWithinDays` | Only notices posted or updated in the last N days. |
| `openForResponsesOnly` | Skip notices whose response deadline has passed. |
| `includeDetails` | Add the full description, contacts and attachments (on by default). |
| `onlyNewSinceLastRun` | Alert mode: return only notices that earlier runs with the same filters have not returned. |
| `maxItems` | Up to 10,000 per run (SAM.gov's limit for one search). |

Example: new small-business IT solicitations in Virginia and Maryland:

```json
{
  "naicsCodes": ["541511", "541512"],
  "noticeTypes": ["o", "k"],
  "setAsides": ["SBA"],
  "placeOfPerformanceStates": ["VA", "MD"],
  "openForResponsesOnly": true,
  "onlyNewSinceLastRun": true,
  "maxItems": 500
}
```

### Output

```json
{
  "noticeId": "8be91e001f7b4084b0148dd4415d7321",
  "title": "Assorted Cap Screws",
  "solicitationNumber": "SPMYM327Q1106",
  "noticeType": "Combined Synopsis/Solicitation",
  "postedDate": "2026-11-03T18:18:31+00:00",
  "responseDeadline": "2026-12-03T15:00:00-05:00",
  "department": "DEPT OF DEFENSE",
  "agency": "DEFENSE LOGISTICS AGENCY",
  "office": "DLA MARITIME - PORTSMOUTH",
  "naicsCodes": ["332722"],
  "pscCode": "5305",
  "setAside": "Total Small Business Set-Aside",
  "placeOfPerformance": { "city": "Kittery", "state": "Maine", "zip": "03904", "country": "UNITED STATES" },
  "pointsOfContact": [{ "type": "primary", "name": "Stephen Smith", "email": "Stephen.1.Smith@dla.mil", "phone": null }],
  "description": "This is a COMBINED SYNOPSIS/SOLICITATION for commercial items ...",
  "attachments": [
    { "name": "RFQ SPMYM327Q1106.pdf", "type": "file", "url": "https://sam.gov/api/prod/opps/v3/opportunities/resources/files/de86.../download", "sizeBytes": 260171 }
  ],
  "url": "https://sam.gov/opp/8be91e001f7b4084b0148dd4415d7321/view"
}
```

Download the results as JSON, CSV or Excel, or send them to Google Sheets, Slack, Zapier or Make with Apify integrations.

### Set up a daily alert

1. Set your filters and turn on **Only new notices (alert mode)**.
2. Run it once. The first run returns everything that currently matches and remembers it.
3. Add a daily **Schedule** in Apify Console. Every later run returns only notices that are new for those filters.
4. Optionally connect an integration (email, Slack, Google Sheets) to receive each day's new notices.

### FAQ

**Where does the data come from?** From the public search that powers SAM.gov's own website. Federal procurement notices are public records.

**Do I need a SAM.gov API key?** No.

**Why did a notice match my keyword when the title doesn't mention it?** SAM.gov's keyword search also looks at descriptions and attached clauses. Add NAICS or notice-type filters to narrow results.

**How fresh is the data?** Each run queries SAM.gov live, so results are as current as SAM.gov itself.

**Are contacts included?** Yes, the contracting officers listed on each public notice. Use them only to respond to that opportunity.

### More tools from this developer

**Government contracts, grants and regulation:**

- [Federal Contract Awards (USAspending): Who Won What](https://apify.com/frank0309/usaspending-contract-awards)
- [Grants.gov Federal Grants: Search & New-Grant Alerts](https://apify.com/frank0309/grants-gov-opportunities)
- [EU Tenders (TED): Public Procurement Search & Alerts](https://apify.com/frank0309/eu-ted-tenders)
- [UK Public Tenders: Find a Tender + Contracts Finder](https://apify.com/frank0309/uk-public-tenders)
- [Federal Register Rules & Notices: Search & New-Rule Alerts](https://apify.com/frank0309/federal-register-documents)

Also available: job postings from company career pages, developer and ai ecosystem data, research, health and safety data. See [all tools](https://apify.com/frank0309).

# Actor input Schema

## `keywords` (type: `string`):

Free-text search across titles and descriptions, e.g. "cybersecurity" or "janitorial services". All words must match. Leave empty to get every notice that matches the filters below.

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

Leave empty for all types.

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

6-digit NAICS codes, e.g. 541511 (custom programming) or 561720 (janitorial). Notices matching any code are returned.

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

Only return notices reserved for these business types. Leave empty for all.

## `placeOfPerformanceStates` (type: `array`):

2-letter state codes, e.g. VA, MD, TX.

## `modifiedWithinDays` (type: `integer`):

Leave empty for any date.

## `openForResponsesOnly` (type: `boolean`):

Skip notices whose response deadline has passed.

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

Exclude archived and inactive notices.

## `includeDetails` (type: `boolean`):

Add the full description, NAICS, set-aside, place of performance, contacts and attachment links to each notice.

## `onlyNewSinceLastRun` (type: `boolean`):

Return only notices that earlier runs with the same filters have not returned. Schedule the Actor daily to get a feed of new opportunities. The first run returns everything that matches.

## `maxItems` (type: `integer`):

SAM.gov returns at most 10,000 results per search.

## Actor input object example

```json
{
  "keywords": "cybersecurity",
  "openForResponsesOnly": false,
  "activeOnly": true,
  "includeDetails": true,
  "onlyNewSinceLastRun": false,
  "maxItems": 100
}
```

# Actor output Schema

## `notices` (type: `string`):

All notices saved by this run, with filters applied and, if enabled, full details, contacts and attachment links.

## `overview` (type: `string`):

The key fields of each notice (title, type, agency, set-aside, NAICS, dates, 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 = {
    "keywords": "cybersecurity"
};

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,frank0309/sam-gov-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/Lp155oWt6HZCdDVbU/builds/CfwddtgfEzAQtER8J/openapi.json
