# SAM.gov Contract Opportunities with AI Summaries (`htamber/sam-gov-ai`) Actor

Federal contract opportunities from SAM.gov with plain-English AI summaries, key requirements and who should bid. No SAM.gov API key needed.

- **URL**: https://apify.com/htamber/sam-gov-ai.md
- **Developed by:** [Harshbir Tamber](https://apify.com/htamber) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 opportunity with ai summaries

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 with AI Summaries

Find US federal contract opportunities on SAM.gov and get a **plain-English AI summary** of each one: what the government is buying, the key requirements, who should bid, and how much effort a bid takes.

**No SAM.gov API key needed** and no rate limits. The Actor reads SAM.gov's official public data file, which is refreshed daily.

### Why use it

SAM.gov listings are long, full of jargon, and hard to scan. This Actor turns them into a short, consistent brief so you can decide in seconds whether an opportunity is worth a closer look.

- **AI summary** in 2 to 3 sentences
- **Key requirements**: quantities, certifications, deliverables, deadlines
- **Who should bid**: the kind of company that fits
- **Effort to bid**: Low, Medium or High
- **Full description text** and contact details included
- Filter by **keywords** (title and description), **NAICS** (partial codes work, e.g. `5415`), **state**, **set-aside** (SBA, 8(a), HUBZone, SDVOSB, WOSB and more), **notice type** and **posting date**

### Good for

- Small businesses and government contractors looking for new bids
- Business development teams building a daily bid pipeline
- Consultants and proposal writers serving government contractors
- Feeding opportunities into a CRM, Google Sheets, Slack or an AI agent

### Example input

```json
{
  "keywords": ["cybersecurity", "network"],
  "naicsCodes": ["5415"],
  "state": "VA",
  "setAside": "SBA",
  "noticeTypes": ["Solicitation", "Combined Synopsis/Solicitation"],
  "postedWithinDays": 7,
  "maxResults": 50
}
```

### Example output

```json
{
  "title": "53--COVER,ACCESS",
  "noticeType": "Combined Synopsis/Solicitation",
  "setAside": "Small Business Set Aside - Total",
  "naicsCode": "332722",
  "responseDeadline": "2026-10-23",
  "department": "DEPT OF DEFENSE",
  "contactEmail": "DibbsBSM@dla.mil",
  "samUrl": "https://sam.gov/workspace/contract/opp/7c4b6603c8a34a219aff64f66ea30047/view",
  "aiSummary": "The Defense Logistics Agency is seeking to procure 3 units of an access cover (NSN 5340015787689) for delivery to DLA Distribution San Joaquin within 164 days. This is a small business set-aside requirement.",
  "aiKeyRequirements": [
    "Supply 3 units of COVER,ACCESS (NSN 5340015787689)",
    "Deliver to DLA Distribution San Joaquin within 164 days",
    "Small business set-aside eligibility required",
    "Electronic quote submission only"
  ],
  "aiWhoShouldBid": "Small businesses that manufacture or distribute metal covers or access panels and can meet military specifications.",
  "aiEffortToBid": "Low"
}
```

### Tips

- **Daily alerts:** schedule this Actor to run every morning with `postedWithinDays: 1` and connect it to email, Slack or Google Sheets through Apify integrations.
- **Only biddable notices:** set notice types to `Solicitation` and `Combined Synopsis/Solicitation`.
- **Save money:** turn off AI summaries to get the raw data at a lower price.

### Pricing

You pay per opportunity returned, and only for results you get. Set a maximum spend per run and the Actor stops there. See the Pricing tab for current prices.

### Data freshness

SAM.gov rebuilds its public data file once a day, so the newest opportunities are usually from the previous day.

### Notes

Data comes from SAM.gov's public Contract Opportunities extract. AI summaries are generated automatically and can contain mistakes: always read the full solicitation on SAM.gov before bidding. This Actor is not affiliated with SAM.gov or the US government.

# Actor input Schema

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

Return opportunities whose title or description contains any of these words or phrases, e.g. "cybersecurity", "janitorial". Leave empty for all.

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

One or more NAICS codes. Partial codes work too: "5415" matches 541511, 541512 and so on.

## `state` (type: `string`):

Two-letter state code, e.g. OH. Matches the place of performance, or the buying office's state when no place of performance is listed.

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

Only return opportunities with this set-aside.

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

Leave empty for all types. Pick Solicitation and Combined Synopsis/Solicitation to see only opportunities you can bid on now.

## `postedWithinDays` (type: `integer`):

How far back to look. SAM.gov refreshes its data file once a day, so the newest opportunities are usually from yesterday.

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

Skip opportunities that are no longer active.

## `aiSummaries` (type: `boolean`):

Download each opportunity's full description and add a plain-English AI summary, key requirements, who should bid, and effort to bid.

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

Stop after this many opportunities. Raise it for bigger pulls (each result is charged).

## Actor input object example

```json
{
  "setAside": "",
  "postedWithinDays": 7,
  "activeOnly": true,
  "aiSummaries": true,
  "maxResults": 10
}
```

# Actor output Schema

## `results` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("htamber/sam-gov-ai").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("htamber/sam-gov-ai").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 '{}' |
apify call htamber/sam-gov-ai --silent --output-dataset

```

## MCP server setup

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

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/9QfUfnCDLuKiKTZ9E/builds/QzdGmbrE1pWgbWaO6/openapi.json
