# SAM.gov Contract Opportunities Finder & Bid Alerts (`pankajbhatia/sam-gov-contract-opportunities`) Actor

Find open U.S. federal contract opportunities from SAM.gov by keyword, NAICS, set-aside, state and agency. Alert mode returns only new bids since your last run. Official public data, no API key needed.

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

## Pricing

from $4.00 / 1,000 opportunity returneds

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 Finder & Bid Alerts

Find open U.S. federal contract opportunities from **SAM.gov** in seconds. Filter by keyword, NAICS code, set-aside, state, agency and deadline. Turn on **alert mode** and schedule it daily to get **only the new bids** since your last run.

- **Official public data**: reads the daily Contract Opportunities extract that GSA publishes on SAM.gov. No login, no API key, no scraping of web pages.
- **Fast and reliable**: scans all ~75,000 active notices in a few seconds. No proxies, no browser, so there's nothing to get blocked.
- **New-bid alerts**: remembers what you've already received, so a daily schedule gives you a clean "what's new today" feed. You only pay for new notices.
- **Pay only for results**: you pay per notice returned, and you can cap the cost of any run.

### Who is it for?

- **Small businesses and contractors** that want every relevant solicitation in their NAICS codes and states.
- **8(a), HUBZone, SDVOSB and WOSB firms** looking for set-asides reserved for them.
- **Bid/proposal consultants and BD teams** that track opportunities for several clients (use one alert name per client).
- **Market researchers** looking at **Award Notices** to see who won what, and for how much.
- **AI agents and automations** (Zapier, Make, n8n, Slack, Google Sheets) that need a clean JSON feed of federal bids.

### How to use it

1. Enter **keywords** (for example `cybersecurity`, `janitorial`, `HVAC`), and/or **NAICS codes** (prefixes work: `5415` covers all of 5415xx).
2. Optionally narrow it down by **set-aside**, **state**, **agency** or **notice type**.
3. Click **Start**. Results appear in the **Opportunities** table and can be exported as JSON, CSV or Excel, or pulled through the API.
4. **For daily alerts**: turn on *Alert mode*, give it an *Alert name* (for example `va-it-services`), save it as a task and add a **daily schedule**. Connect the run to email, Slack or Google Sheets with Apify integrations.

### Input example

```json
{
  "keywords": ["cybersecurity", "zero trust"],
  "naicsCodes": ["5415"],
  "setAsides": ["SBA", "SDVOSBC"],
  "states": ["VA", "MD", "DC"],
  "postedWithinDays": 14,
  "onlyOpenForResponses": true,
  "onlyNewSinceLastRun": true,
  "alertId": "dmv-cyber",
  "maxResults": 200
}
```

#### Main filters

| Field | What it does |
|---|---|
| `keywords` / `excludeKeywords` | Match ANY word/phrase in the title (and, by default, the description) |
| `naicsCodes` | Industry codes, prefix match (`5415` → 541511, 541512, …) |
| `pscCodes` | Product Service Codes, prefix match |
| `noticeTypes` | Solicitation, Combined Synopsis/Solicitation, Presolicitation, Sources Sought, Special Notice (default), plus Award Notice and others |
| `setAsides` | SBA, 8(a), HUBZone, SDVOSB, WOSB, EDWOSB and more; `NONE` = full and open |
| `states` | Place-of-performance state (falls back to the contracting office's state) |
| `agencies` | Any part of the department / agency / office name, for example `Army`, `Veterans Affairs` |
| `postedWithinDays` | Only notices posted in the last N days (default 30) |
| `onlyOpenForResponses` | Drop notices whose deadline has passed (default on) |
| `minDaysToRespond` | Only notices with at least N days left to respond |
| `onlyNewSinceLastRun` + `alertId` | Alert mode: return only notices not delivered before under this alert name |

### Output example

```json
{
  "noticeId": "36e01c2dd5c14321849c55786677d5c9",
  "title": "Pyxis Supply Server Software",
  "solicitationNumber": "36C26127Q0062",
  "noticeType": "Solicitation",
  "department": "VETERANS AFFAIRS, DEPARTMENT OF",
  "office": "261-NETWORK CONTRACT OFFICE 21 (36C261)",
  "postedDate": "2026-10-05T16:52:48Z",
  "responseDeadline": "2026-10-13T19:00:00Z",
  "daysUntilDeadline": 5.8,
  "setAsideCode": "SBA",
  "setAside": "Small Business Set Aside - Total",
  "naicsCode": "541519",
  "pscCode": "7A21",
  "placeOfPerformance": { "city": "Las Vegas", "state": "NV", "country": "USA" },
  "award": null,
  "samGovUrl": "https://sam.gov/opp/36e01c2dd5c14321849c55786677d5c9/view",
  "primaryContact": { "name": "…", "email": "…@va.gov" },
  "description": "This RFQ is a Brand Name Only, Small Business Set-Aside …",
  "sourceUpdatedAt": "2026-10-07T03:30:44Z"
}
```

Award Notices also include `award.number`, `award.date`, `award.amountUsd` and `award.awardee`.

Each run also saves a `RUN_SUMMARY` record (notices scanned, matched, skipped as already delivered, returned) in the run's key-value store.

### How much does it cost?

Pay-per-event. You pay a small fee per **opportunity returned** (plus a tiny per-run start fee); nothing else. For example, 1,000 opportunities cost about $4. In alert mode you only pay for **new** notices, so a daily alert usually costs cents. Set **Maximum cost per run** to cap any run. The Actor stops cleanly when it reaches your limit.

### Data source and freshness

The data comes from the official **SAM.gov Contract Opportunities public extract** published by GSA, which is refreshed daily. Each result includes `sourceUpdatedAt` so you know exactly how fresh it is. Always confirm details and attachments on the linked SAM.gov page before you bid.

Contacts are the official government points of contact published on each notice. You can turn them off with `includeContacts: false`.

### Use it through the API, integrations or AI agents

Run it from the Apify API, on a schedule, or connect it to Make, Zapier, n8n or Google Sheets. AI agents can find and call it through the Apify MCP server. Output is clean JSON with the same fields on every run.

### FAQ

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

**Why not use the official SAM.gov API?** Non-federal users are limited to about 10 API requests per day. This Actor reads the full public daily extract instead, so there are no rate limits.

**How fresh is it?** Same-day data, matching SAM.gov's daily public extract. It's not real-time to the minute.

**Can I track several searches?** Yes. Use a different `alertId` for each saved task.

**Something wrong or missing?** Open an issue on the Issues tab. We usually reply within 24 hours.

This Actor is not affiliated with or endorsed by GSA or SAM.gov.

### More tools from this developer

- [Sitemap & URL Extractor](https://apify.com/pankajbhatia/sitemap-url-extractor): get every URL of a website from its sitemaps
- [Website to Markdown for AI & RAG](https://apify.com/pankajbhatia/website-to-markdown): turn web pages into clean Markdown for LLMs
- [Tech Stack Detector](https://apify.com/pankajbhatia/tech-stack-detector): find what any website is built with
- [Apple App Store Reviews Scraper](https://apify.com/pankajbhatia/app-store-reviews): App Store reviews and ratings for any app
- [ATS Jobs Scraper](https://apify.com/pankajbhatia/ats-jobs-scraper): jobs from Greenhouse, Lever, Ashby, Workable and more
- [Website Screenshot](https://apify.com/pankajbhatia/website-screenshot): full-page, mobile and PDF screenshots in bulk
- [PDF to Text & Markdown Extractor](https://apify.com/pankajbhatia/pdf-text-extractor): extract text from PDFs for AI and search
- [Domain WHOIS, DNS & SSL Checker](https://apify.com/pankajbhatia/domain-whois-dns-ssl-checker): bulk domain, DNS, email security and SSL checks
- [SEO Meta Tags & On-Page Audit](https://apify.com/pankajbhatia/seo-meta-tags-checker): bulk on-page SEO audit with fixes
- [Bulk URL Status & Broken Link Checker](https://apify.com/pankajbhatia/url-status-broken-link-checker): status codes, redirect chains and broken links
- [RSS & Atom Feed Reader](https://apify.com/pankajbhatia/rss-feed-reader): merge and filter many news feeds
- [Hacker News Scraper](https://apify.com/pankajbhatia/hacker-news-scraper): HN stories, comments and Who is hiring jobs
- [Academic Paper Search](https://apify.com/pankajbhatia/academic-paper-search): papers from Crossref, arXiv and PubMed
- [SEC EDGAR Filings & Financials](https://apify.com/pankajbhatia/sec-edgar-filings-financials): 10-K, 10-Q, 8-K filings and company financials

# Actor input Schema

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

Return notices containing ANY of these words or phrases (case-insensitive). Leave empty to skip keyword filtering.

## `searchIn` (type: `string`):

Match keywords in the title only, or in the title and full description.

## `excludeKeywords` (type: `array`):

Skip notices containing ANY of these words or phrases.

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

Industry codes. Prefixes work: '5415' matches 541511, 541512, etc.

## `pscCodes` (type: `array`):

Product Service Codes. Prefixes work: 'D3' matches D302, D307, etc.

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

Which notice types to include. Default: Solicitation, Combined Synopsis/Solicitation, Presolicitation, Sources Sought, Special Notice. Add 'Award Notice' to see who won past contracts.

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

Only notices reserved for these business types. 'NONE' = no set-aside (full and open).

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

Two-letter state codes, e.g. VA, TX. Matches place of performance; if a notice has none, the contracting office's state is used.

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

Match any part of the department, sub-tier or office name, e.g. 'Veterans Affairs', 'Army', 'NASA'.

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

Only notices posted in the last N days. 0 = any date.

## `onlyOpenForResponses` (type: `boolean`):

Drop notices whose response deadline has passed. Notices without a deadline are kept.

## `minDaysToRespond` (type: `integer`):

Only notices with a deadline at least N days from now (excludes notices without a deadline). Leave empty to skip.

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

Remembers notices already delivered and returns only new ones. Schedule this Actor daily to get a new-bids feed. You only pay for new notices.

## `alertId` (type: `string`):

Use a different name for each saved search so they keep separate memories, e.g. 'va-it-services'.

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

Stop after this many notices. 0 = no limit.

## `sortBy` (type: `string`):

Order of results: newest posted first, or soonest response deadline first.

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

Include the notice description text in each result.

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

Cut long descriptions to this many characters. 0 = full text.

## `includeContacts` (type: `boolean`):

Official points of contact published on each notice.

## Actor input object example

```json
{
  "keywords": [
    "cybersecurity",
    "software"
  ],
  "searchIn": "titleAndDescription",
  "naicsCodes": [
    "5415"
  ],
  "postedWithinDays": 30,
  "onlyOpenForResponses": true,
  "onlyNewSinceLastRun": false,
  "alertId": "default",
  "maxResults": 500,
  "sortBy": "postedDateDesc",
  "includeDescription": true,
  "descriptionMaxChars": 2000,
  "includeContacts": true
}
```

# Actor output Schema

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

One item per matching SAM.gov contract notice.

## `runSummary` (type: `string`):

Notices scanned, matched, skipped as already delivered, and returned.

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

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

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,pankajbhatia/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/41aZeZd8eGv622Vo4/builds/1Oyhip5gvS4yvHEYC/openapi.json
