# SAM.gov Contract Opportunities (Federal Bids) (`vigil-works/sam-gov-opportunities`) Actor

Find open federal contract opportunities on SAM.gov by keyword, NAICS, set-aside, state and response deadline. Days left, contacts, attachments. Only-new mode for daily bid alerts. No API key.

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

## Pricing

from $2.00 / 1,000 contract 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)

Find open U.S. federal contract opportunities on SAM.gov and get clean, flat rows for a spreadsheet, CRM, bid tracker or AI agent. Filter by keyword, NAICS code, small business set-aside, notice type, state and response deadline. Every row tells you how many days are left to respond. Turn on **only new notices** and schedule it daily to get a bid alert with just the fresh opportunities.

No SAM.gov account and no API key needed. It reads the same public search service the sam.gov search page uses.

### What it does

- Searches active Contract Opportunities: solicitations, combined synopsis/solicitations, presolicitations, sources sought, special notices and award notices.
- Filters by keyword (exact phrases in double quotes), NAICS code (a short code like `5415` covers every code under it), set-aside (Total Small Business, 8(a), HUBZone, SDVOSB, WOSB, EDWOSB, VOSB and more), notice type, place-of-performance state, response deadline window and posted/updated date.
- Skips notices whose deadline has already passed (SAM.gov keeps them listed for weeks) and cancelled notices. Both can be turned off.
- Adds `daysLeft` to every row, so you can sort by urgency.
- With details on: NAICS, PSC code, set-aside, place of performance, full description as plain text, every point of contact, and for award notices the winner, UEI, award number and dollar amount.
- With attachments on: every file and link on the notice. Public files get a direct download link; controlled files that need a SAM.gov login are listed by name without a link.
- **Only new notices:** remembers what each search returned before (per set of filters, in your own Apify key-value store) and returns only notices it has not shown you yet.
- Runs several keywords at once and removes duplicates. Retries on errors, waits politely between requests, keeps the run going if one notice fails, and stops with a plain message when an input is wrong.

### Who it is for

Small businesses and government contractors looking for bids, capture and business development teams, 8(a), HUBZone, SDVOSB and WOSB firms, bid-matching and GovCon newsletter builders, and consultants who track federal spending for clients.

**Daily bid alert:** set your NAICS codes and set-aside, turn on `onlyNew`, and schedule the Actor every morning on Apify. Each run's dataset holds only that day's new bids; send it to email, Slack, Google Sheets or a webhook with an Apify integration.

### Example input

```json
{
  "keywords": ["software"],
  "naicsCodes": ["5415"],
  "noticeTypes": ["o", "k", "r"],
  "setAsides": ["SBA"],
  "states": ["VA", "MD", "DC"],
  "onlyNew": true,
  "includeDetails": true,
  "includeAttachments": true,
  "maxResults": 100
}
```

| Field | What it does |
|---|---|
| `keywords` | Words or phrases, like the sam.gov search box. Quote a phrase for an exact match. Empty = everything matching the other filters. |
| `naicsCodes` | 2 to 6 digit NAICS codes. `5415` matches 541511, 541512, 541519. |
| `setAsides` | `SBA` total small business, `SBP` partial, `8A`, `8AN`, `HZC`, `HZS`, `SDVOSBC`, `SDVOSBS`, `WOSB`, `WOSBSS`, `EDWOSB`, `EDWOSBSS`, `VSA`, `VSS`, `LAS`, `IEE`, `ISBEE`, `BICiv`. |
| `noticeTypes` | `o` solicitation, `k` combined synopsis/solicitation, `p` presolicitation, `r` sources sought, `s` special notice, `a` award notice, `u` justification, `i` intent to bundle, `g` surplus sale. |
| `states` | Place-of-performance state codes such as `TX`, `VA`, `DC`. |
| `deadlineFrom` / `deadlineTo` | Response deadline window, `YYYY-MM-DD`. |
| `updatedSince` | Only notices posted or changed on or after this date. |
| `onlyNew` | Skip every notice an earlier run of the same search already returned. For schedules. |
| `includeDetails` | `true` (default): NAICS, set-aside, place of performance, description, contacts, award. One extra request per notice. |
| `includeAttachments` | `false` (default). `true` lists files and links. One extra request per notice. |
| `skipExpired` / `skipCancelled` | Both `true` by default. |
| `maxResults` | Up to 10,000 in total, newest updated first. |

### Example output

A real row from a run on Nov 23, 2026 (description and attachments shortened):

```json
{
  "noticeId": "479d8ee8a0f44bc7a33d6955916c9e05",
  "solicitationNumber": "DISA-OTA-27-R-ICAM",
  "title": "Area of Interest (AOI) for Next Generation Enterprise Identity, Credential, and Access Management (E-ICAM) Prototype Other Transaction (OT)",
  "noticeType": "Solicitation",
  "postedDate": "2026-11-18",
  "responseDeadline": "2026-11-30T17:00:00-06:00",
  "responseDeadlineDate": "2026-11-30",
  "daysLeft": 7,
  "department": "DEPT OF DEFENSE",
  "agency": "DEFENSE INFORMATION SYSTEMS AGENCY (DISA)",
  "office": "IT CONTRACTING DIVISION - PL84",
  "naicsCodes": ["541519"],
  "pscCode": "DA01",
  "setAside": null,
  "placeOfPerformanceCity": "Fort George G Meade",
  "placeOfPerformanceState": "MD",
  "description": "Amendment 0002 - The purpose of this amendment is to update the Area of Interest (AOI) requirements...",
  "contactName": "DITCO OTA Mailbox",
  "contactEmail": "disa.scott.ditco.mbx.ps84-other-transaction-authority@mail.mil",
  "attachments": [
    {
      "name": "AOI - NG E-ICAM - Amendment 0002.pdf",
      "type": "file",
      "public": true,
      "url": "https://sam.gov/api/prod/opps/v3/opportunities/resources/files/af6ca1aee81c4135a29e81e78257c00e/download",
      "sizeBytes": 309908,
      "postedDate": "2026-11-18"
    }
  ],
  "url": "https://sam.gov/opp/479d8ee8a0f44bc7a33d6955916c9e05/view",
  "searchKeyword": "software"
}
```

### Output fields

`noticeId`, `solicitationNumber`, `title`, `noticeType`, `postedDate`, `updatedDate`, `responseDeadline` (with time zone), `responseDeadlineDate`, `daysLeft`, `department`, `agency`, `office`, `officeCity`, `officeState`, `awardeeName`, `cancelled`, `url`, `searchKeyword`, and with details on: `naicsCodes`, `pscCode`, `setAsideCode`, `setAside`, `placeOfPerformanceCity`, `placeOfPerformanceState`, `placeOfPerformanceZip`, `placeOfPerformanceCountry`, `description`, `contactName`, `contactEmail`, `contactPhone`, `contacts`, `archiveDate`, `awardDate`, `awardNumber`, `awardAmount`, `awardeeUei`. With attachments on: `attachments` (name, type, public, url, sizeBytes, postedDate). Dates are `YYYY-MM-DD`; amounts are US dollars.

### Notes

- Data comes from SAM.gov's public search. This Actor is not affiliated with or endorsed by SAM.gov, GSA or the U.S. government. Always confirm deadlines and requirements on the notice itself before you bid.
- The search covers active notices only. SAM.gov's search pages stop at 10,000 records per query, so narrow very broad searches with filters.
- `daysLeft` counts calendar days from today (UTC) to the deadline date. `0` means responses are due today.
- Exports to JSON, CSV, Excel and more from the Apify dataset, or call it from the API or an AI agent through Apify's MCP server.

### Pricing

Pay per event: $2 per 1,000 results ($0.002 per notice saved to the dataset), plus a $0.00005 start fee. You do not pay separately for Apify platform usage. A daily alert that finds 20 new bids costs about 4 cents a day.

### Related Actors

- [Grants.gov Grant Opportunity Search](https://apify.com/vigil-works/grants-gov-search): federal grants by keyword, agency, eligibility and deadline.
- [Federal Register Search](https://apify.com/vigil-works/federal-register-search): rules, proposed rules and notices with comment deadlines.
- [Lobbying Disclosures (Senate LDA)](https://apify.com/vigil-works/lobbying-disclosures): who lobbies on which issue, for which client, and how much.

### Questions?

Open an issue on this Actor's Issues tab and it gets answered. Tell me which fields or filters you wish it had and they get considered.

# Actor input Schema

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

Words or phrases to look for in notice titles and descriptions, the same as the sam.gov search box. Put a phrase in double quotes for an exact match. Each keyword is searched separately and results are merged without duplicates. Leave empty to list everything that matches the other filters.

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

Industry codes, 2 to 6 digits. A shorter code matches everything under it: 5415 covers 541511 custom programming, 541512 systems design, 541519 other IT. Leave empty for all industries.

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

Only notices reserved for these business types. Leave empty for all, including full and open competition.

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

Solicitation and Combined Synopsis/Solicitation are the ones you can bid on now. Presolicitation and Sources Sought are early signals. Award Notice shows who won. Leave empty for all types.

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

Two-letter state codes where the work is done, for example TX, VA, DC. Leave empty for anywhere.

## `deadlineFrom` (type: `string`):

Only notices whose response deadline is on or after this date, YYYY-MM-DD. Set it to today to drop notices that have already closed.

## `deadlineTo` (type: `string`):

Only notices whose response deadline is on or before this date, YYYY-MM-DD.

## `updatedSince` (type: `string`):

Only notices posted or changed on or after this date, YYYY-MM-DD.

## `onlyNew` (type: `boolean`):

Remembers every notice this search returned before and skips them next time, so a daily schedule gives you only fresh bids. Memory is kept per set of filters in a key-value store in your account.

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

Adds NAICS, set-aside, place of performance, the full description, contacts and award amount to every row. Costs one extra request per notice. Turn off for a fast list of titles and deadlines.

## `includeAttachments` (type: `boolean`):

Lists each notice's files and links. Public files get a direct download link; controlled files (they need a SAM.gov login) are named without a link. One extra request per notice.

## `skipCancelled` (type: `boolean`):

Leave out notices the agency has cancelled.

## `skipExpired` (type: `boolean`):

SAM.gov keeps notices listed for a while after responses closed. This leaves them out. Notices with no deadline (many Sources Sought and Special Notices) are always kept. Turn off to research past bids or awards.

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

Stop after this many notices in total. Newest updated first.

## Actor input object example

```json
{
  "keywords": [
    "software"
  ],
  "naicsCodes": [
    "541511",
    "541512"
  ],
  "noticeTypes": [
    "o",
    "k"
  ],
  "onlyNew": false,
  "includeDetails": true,
  "includeAttachments": false,
  "skipCancelled": true,
  "skipExpired": true,
  "maxResults": 100
}
```

# 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 = {
    "keywords": [
        "software"
    ],
    "naicsCodes": [
        "541511",
        "541512"
    ],
    "noticeTypes": [
        "o",
        "k"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("vigil-works/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": ["software"],
    "naicsCodes": [
        "541511",
        "541512",
    ],
    "noticeTypes": [
        "o",
        "k",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("vigil-works/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": [
    "software"
  ],
  "naicsCodes": [
    "541511",
    "541512"
  ],
  "noticeTypes": [
    "o",
    "k"
  ]
}' |
apify call vigil-works/sam-gov-opportunities --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,vigil-works/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/DzfsmtjtiC8km4liL/builds/PjVAJQPqTUrIIvGR2/openapi.json
