# SAM.gov Contract Opportunities: Federal Bids & Set-Asides (`halos_ai_main/sam-gov-contract-opportunities`) Actor

New U.S. federal bids from SAM.gov's official daily extract. Filter by NAICS, set-aside (SBA, 8(a), HUBZone, SDVOSB, WOSB), agency, state and keyword. Daily new-bid alerts. No API key.

- **URL**: https://apify.com/halos_ai_main/sam-gov-contract-opportunities.md
- **Developed by:** [Halos AI](https://apify.com/halos_ai_main) (community)
- **Categories:** Lead generation, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 opportunities

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: Federal Bids & Set-Asides

Get **new U.S. federal contract bids** (solicitations, RFQs, combined synopses, presolicitations, sources sought) from **SAM.gov's official public data extract**, filtered to exactly what you bid on, in seconds.

- ✅ **Official source.** Uses the SAM.gov Contract Opportunities public CSV extract published for bulk download (SAM Data Services / data.gov). No HTML scraping, no browser, no proxies, **no SAM.gov API key**.
- 🎯 **Biddable only by default.** Award notices and justifications (contracts already awarded) are excluded unless you ask for them, so you don't pay for rows you can't bid on.
- ⚡ **Fast and cheap.** The full ~70,000-notice active file is scanned in under 10 seconds per run.
- 🔎 **Filters:** keywords, NAICS (prefix match), set-aside (SBA, 8(a), HUBZone, SDVOSB, WOSB…), notice type, agency, place-of-performance state, posted-within-N-days and still-open-only.
- 🔔 **Monitoring mode.** `onlyNewSinceLastRun` returns only notices you haven't seen for the same filters. Schedule it daily and pipe new bids to email, Slack, Google Sheets or your CRM.

### Who it's for

- Small businesses and GovCon BD teams looking for set-aside bids in their NAICS codes
- Proposal consultants and capture managers building daily bid lists for clients
- Market researchers tracking agency demand by category (turn off `excludeAwards` to see who won and for how much)

### How to use it

1. Click **Try for free** and set your filters: NAICS codes, set-asides, states and/or keywords.
2. Leave **Exclude award notices** and **Only opportunities still open** on to get bids you can still respond to.
3. Click **Start**. Results appear in the **Output** tab within seconds. Export them as CSV, Excel or JSON, or read them through the API.

### Input example

```json
{
  "keywords": ["cybersecurity", "software", "cloud"],
  "naicsCodes": ["5415", "5182"],
  "setAsides": ["SBA"],
  "postedWithinDays": 14,
  "openOnly": true,
  "excludeAwards": true,
  "maxResults": 200
}
```

| Field | Notes |
|---|---|
| `keywords` | ANY keyword in the title or description (case-insensitive) |
| `naicsCodes` | Prefix match: `5415` matches 541511, 541512, 541519… |
| `setAsides` | SAM codes (dropdown): `SBA`, `SBP`, `8A`, `8AN`, `HZC`, `HZS`, `SDVOSBC`, `SDVOSBS`, `WOSB`, `WOSBSS`, `EDWOSB`, `VSA`… |
| `noticeTypes` | Dropdown, substring match: `Solicitation`, `Combined Synopsis/Solicitation`, `Presolicitation`, `Sources Sought`, `Special Notice`… |
| `excludeAwards` | Default **on**. Drops Award Notices and Justifications (J\&A). Picking `Award Notice` in `noticeTypes` overrides it |
| `agencies` | Substring match on department, sub-tier or office, e.g. `VETERANS AFFAIRS`, `NAVY` |
| `states` | Place-of-performance state codes (dropdown) |
| `postedWithinDays` | Default 7. Use 0 to disable |
| `openOnly` | Drops notices whose response deadline has passed |
| `onlyNewSinceLastRun` | Monitoring mode (state kept per filter set) |
| `includeDescription` / `descriptionMaxChars` | Description text, trimmed (default 2,000 chars) |

#### Set-aside code cheat sheet

| Code | Meaning |
|---|---|
| `SBA` / `SBP` | Total / partial small business set-aside |
| `8A` / `8AN` | 8(a) set-aside / 8(a) sole source |
| `HZC` / `HZS` | HUBZone set-aside / sole source |
| `SDVOSBC` / `SDVOSBS` | Service-disabled veteran-owned small business set-aside / sole source |
| `WOSB` / `EDWOSB` | Women-owned / economically disadvantaged women-owned small business |
| `VSA` | Veteran-owned small business set-aside (VA) |

### Output example (one item)

A real, biddable notice from a test run on Oct 18, 2026. The contact is anonymized here; actual results include the government point of contact SAM.gov publishes.

```json
{
  "noticeId": "5b6aae4c101d46afa5df8b26f84130c4",
  "title": "DA10--Circle CVI Software or equivalent in support of VA Portland Healthcare System Portland, Oregon",
  "solicitationNumber": "36C26027Q0080",
  "noticeType": "Combined Synopsis/Solicitation",
  "baseType": "Combined Synopsis/Solicitation",
  "agency": "VETERANS AFFAIRS, DEPARTMENT OF",
  "subTier": "VETERANS AFFAIRS, DEPARTMENT OF",
  "office": "260-NETWORK CONTRACT OFFICE 20 (36C260)",
  "postedDate": "2026-10-15T09:46:08+00:00",
  "responseDeadline": "2026-11-03T13:00:00-07:00",
  "daysUntilDeadline": 16.3,
  "archiveDate": "2026-11-17",
  "naicsCode": "541519",
  "pscCode": "DA10",
  "setAsideCode": "SBA",
  "setAside": "Small Business Set Aside - Total",
  "popCity": "Portland",
  "popState": null,
  "popZip": "97239-2964",
  "popCountry": null,
  "awardNumber": null,
  "awardDate": null,
  "awardAmount": null,
  "awardee": null,
  "contactName": "DOE, JANE",
  "contactTitle": "Contracting Officer",
  "contactEmail": "JANE.DOE@AGENCY.GOV",
  "contactPhone": "(555) 010-0000",
  "officeCity": "VANCOUVER",
  "officeState": "WA",
  "link": "https://sam.gov/workspace/contract/opp/5b6aae4c101d46afa5df8b26f84130c4/view",
  "additionalInfoLink": null,
  "source": "SAM.gov Contract Opportunities public extract",
  "scrapedAt": "2026-10-18T13:20:20.670183+00:00",
  "description": "This is a combined synopsis/solicitation for commercial products and commercial services..."
}
```

### How much does it cost?

**$1.50 per 1,000 opportunities returned, plus a $0.005 start fee per run.** Platform compute is included.

Worked example: a daily monitoring run that finds 20 new bids costs 20 × $0.0015 + $0.005 = **$0.035**. Run it every day for 30 days and you pay about **$1.05/month**. A run with no new bids costs only the $0.005 start fee. `maxResults` caps how much a single run can cost.

### Daily bid alerts in 3 steps

1. Save your filters as a **Task** with `onlyNewSinceLastRun: true` (and `postedWithinDays: 3` for some overlap).
2. In **Schedules**, run the task daily, e.g. 7:00 AM in your time zone. SAM.gov refreshes the extract once a day.
3. Under the task's **Integrations**, add **Email**, **Slack**, **Google Sheets** or a **webhook** to Zapier/Make. Each morning you get only the bids you haven't seen.

### Use it via API

```bash
curl -X POST "https://api.apify.com/v2/acts/halos_ai_main~sam-gov-contract-opportunities/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"naicsCodes":["5415"],"setAsides":["SBA"],"postedWithinDays":7,"maxResults":100}'
```

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("halos_ai_main/sam-gov-contract-opportunities").call(
    run_input={"naicsCodes": ["5415"], "setAsides": ["SBA"], "postedWithinDays": 7}
)
for bid in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(bid["responseDeadline"], bid["title"], bid["link"])
```

### Data freshness and notes

- SAM.gov regenerates the public extract daily, so notices typically appear here within about 24 hours of posting. For minute-level alerts, use SAM.gov's own saved searches.
- The extract covers **active** notices. To track awards (awardee and amount), turn off `excludeAwards` or pick `Award Notice` under notice types.
- Contact names and emails are the government points of contact that SAM.gov publishes on each notice. Use them only for bid-related questions. Don't use this data for spam or bulk unsolicited marketing.
- Not affiliated with or endorsed by the U.S. General Services Administration or SAM.gov.

### FAQ

**Do I need a SAM.gov account or API key?** No.
**Why don't I see award notices?** `excludeAwards` is on by default because awarded contracts can't be bid on. Turn it off to include them.
**Can I get attachments?** This version links to the notice page (`link`), where attachments live.
**Something broke or a field is missing?** Open an issue on the Actor's Issues tab. We monitor runs daily.

# Actor input Schema

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

Matches if ANY keyword appears in the notice title or description (case-insensitive). Example: cybersecurity, janitorial, HVAC. Leave empty to match everything.

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

Full or partial NAICS codes. 5415 matches 541511, 541512, 541519 and so on. Leave empty for all industries.

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

Only notices reserved for these socio-economic programs. Leave empty to include unrestricted (full and open) notices too.

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

Only these notice types (substring match). Leave empty for all biddable types. If you pick Award Notice or Justification, award notices are included even when 'Exclude awards' is on.

## `excludeAwards` (type: `boolean`):

On by default. Drops Award Notices and Justifications (J\&A), which describe contracts that are already awarded and can't be bid on. Turn it off to track who won what and for how much.

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

Substring match on department, sub-tier or office name, e.g. VETERANS AFFAIRS, NAVY, NASA. Leave empty for all agencies.

## `states` (type: `array`):

Two-letter place-of-performance state codes. Notices without a place of performance are excluded when this is set.

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

Only notices posted in the last N days. Use 0 to turn the posted-date filter off (searches every active notice).

## `openOnly` (type: `boolean`):

Drops notices whose response deadline has already passed. Notices with no deadline are kept.

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

Remembers the notice IDs already returned for this exact filter set and outputs only new ones. Turn it on for a daily schedule so you get each bid once.

## `includeDescription` (type: `boolean`):

Adds the notice description (scope of work summary) to each result. Turn it off for smaller, faster exports.

## `descriptionMaxChars` (type: `integer`):

Trims each description to this many characters. 0 = no limit (some descriptions are very long).

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

Stops after this many matching notices. You're billed per result, so this also caps the cost of a run.

## Actor input object example

```json
{
  "keywords": [
    "cybersecurity"
  ],
  "naicsCodes": [
    "5415"
  ],
  "excludeAwards": true,
  "postedWithinDays": 7,
  "openOnly": true,
  "onlyNewSinceLastRun": false,
  "includeDescription": true,
  "descriptionMaxChars": 2000,
  "maxResults": 200
}
```

# Actor output Schema

## `results` (type: `string`):

Federal contract opportunities matching your filters, one item per SAM.gov notice, stored in the run's default dataset.

# 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"
    ],
    "naicsCodes": [
        "5415"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("halos_ai_main/sam-gov-contract-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"],
    "naicsCodes": ["5415"],
}

# Run the Actor and wait for it to finish
run = client.actor("halos_ai_main/sam-gov-contract-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"
  ],
  "naicsCodes": [
    "5415"
  ]
}' |
apify call halos_ai_main/sam-gov-contract-opportunities --silent --output-dataset

```

## MCP server setup

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