# SAM.gov Federal Contract Opportunities Tracker (`straightforward_hydra/sam-gov-opportunities-tracker`) Actor

Find US federal contract opportunities to bid on, from SAM.gov. Filter by keywords, NAICS, agency, state and set-aside; get clean structured results with deadlines and contacts.

- **URL**: https://apify.com/straightforward\_hydra/sam-gov-opportunities-tracker.md
- **Developed by:** [Dev D](https://apify.com/straightforward_hydra) (community)
- **Categories:** Developer tools, Lead generation, SEO tools
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## SAM.gov Federal Contract Opportunities Tracker 🇺🇸

**Find US federal contracts to bid on — straight from SAM.gov, filtered to exactly what your business does.**

Every federal contract opportunity — solicitations, presolicitations, sources-sought notices — is posted on **SAM.gov**. This Actor searches them by keyword, NAICS industry code, agency, state and set-aside, and returns clean, structured records with deadlines and contacts. Point it at what you sell, run it on a schedule, and never miss a bid.

> Data comes from SAM.gov's official public API. Public procurement data — clean liability profile.

***

### What you can do with it

- 🎯 **Never miss a bid** — monitor new opportunities in your industry the day they post.
- 🏢 **Feed a GovCon CRM / pipeline** — structured opportunities with agency, deadline, contact.
- 🔔 **Set-aside alerts** — track 8(a), WOSB, SDVOSB, HUBZone, Total Small Business set-asides.
- 📊 **Market research** — what agencies are buying, in which NAICS, in which states.
- 🤝 **Teaming & capture** — spot sources-sought early to position before the solicitation drops.

### Features

- ✅ **Powerful filtering** — keywords, NAICS codes, agency, state, set-aside, notice type.
- ✅ **Clean structured output** — title, agency, deadline, NAICS, set-aside, place of performance, point of contact, direct SAM.gov link.
- ✅ **Active-only by default** — focus on opportunities still open for response.
- ✅ **Schedule-friendly** — small lookback window for a daily new-opportunities feed.
- ✅ **Low-maintenance** — official REST/JSON API, no scraping, no browser.

***

### 🔑 Getting your free SAM.gov API key (required)

SAM.gov requires a free API key tied to your account:

1. Go to **sam.gov** and sign in (create a free account if needed).
2. Open **Account Details** (top-right profile menu).
3. Scroll to **API Key** and generate / copy it.
4. Paste it into the **SAM.gov API key** field of this Actor.

Your key is only ever sent to `api.sam.gov`. Note: SAM.gov rate-limits keys by account role (personal keys have a daily request quota).

### Input

| Field | Description |
|---|---|
| **SAM.gov API key** | Your free key (required). |
| **Keywords** | Title search, e.g. `cybersecurity`, `janitorial services`. |
| **Notice types** | Solicitation, Combined, Presolicitation, Sources Sought, etc. |
| **NAICS codes** | Industry codes, e.g. `541512`. |
| **Place of performance state** | Two-letter state code, e.g. `VA`. |
| **Set-aside code** | e.g. `SBA`, `8A`, `WOSB`, `SDVOSBC`, `HZC`. |
| **Agency / organization name** | e.g. `General Services Administration`. |
| **Lookback days** | Days back by posted date (1–365). |
| **Active opportunities only** | Only currently-open notices. |
| **Max results** | Cap the number of results. |

#### Example — open small-business IT solicitations, last 14 days

```json
{
  "apiKey": "YOUR_SAM_GOV_KEY",
  "keywords": "information technology",
  "noticeTypes": ["o", "k", "p"],
  "naicsCodes": ["541512", "541519"],
  "setAsideCode": "SBA",
  "daysBack": 14,
  "activeOnly": true
}
```

### Output

Each row is one opportunity:

```json
{
  "notice_id": "abcdef1234567890",
  "title": "Enterprise Cybersecurity Support Services",
  "solicitation_number": "W1234-26-R-0001",
  "notice_type": "Solicitation",
  "base_type": "Combined Synopsis/Solicitation",
  "department": "DEPT OF DEFENSE / DEPT OF THE ARMY",
  "organization_type": "OFFICE",
  "posted_date": "2026-07-10",
  "response_deadline": "2026-08-01T17:00:00-04:00",
  "archive_date": "2026-08-16",
  "naics_code": "541512",
  "classification_code": "D310",
  "set_aside": "Total Small Business Set-Aside",
  "set_aside_code": "SBA",
  "active": "Yes",
  "pop_city": "Fort Belvoir",
  "pop_state": "Virginia",
  "pop_country": "United States",
  "pop_zip": "22060",
  "contact_name": "Jane Smith",
  "contact_email": "jane.smith@army.mil",
  "contact_phone": "703-555-0100",
  "award_number": "",
  "award_amount": "",
  "award_date": "",
  "awardee_name": "",
  "description_link": "https://api.sam.gov/opportunities/v1/noticedesc?noticeid=abcdef1234567890",
  "ui_link": "https://sam.gov/opp/abcdef1234567890/view"
}
```

### Run it on a schedule

Set the Actor to run **daily** with a short lookback (`daysBack` = 2) to get a feed of newly posted opportunities in your industry. Connect a **Slack / email / webhook / Google Sheets** integration to route new bids straight to your capture team.

### Notes & limitations

- Requires a free SAM.gov API key (each user supplies their own).
- The posted-date range is limited to **1 year** per SAM.gov's API.
- `description_link` points to the full notice description (also requires an API key to fetch); `ui_link` opens the opportunity on SAM.gov.
- Award fields are only populated for award notices.
- This is **factual public procurement data**.

***

#### Keywords

SAM.gov scraper, federal contract opportunities, government contracts, GovCon, RFP scraper, solicitation tracker, sources sought, federal bids, contract opportunities API, SAM.gov API, government RFPs, NAICS, set-aside contracts, 8a WOSB SDVOSB HUBZone, small business contracts, federal procurement, bid opportunities, government tenders, contract alerts, capture management, federal marketplace.

# Actor input Schema

## `apiKey` (type: `string`):

Your free SAM.gov API key. Get it at sam.gov: sign in -> Account Details -> API Key (or via api.data.gov). Required. Only sent to api.sam.gov.

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

Search opportunity titles for these keywords, e.g. "cybersecurity" or "janitorial services". Leave empty to match all titles.

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

Which types of notices to include. Default is the bid-relevant set. Choose ALL for every type.

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

Filter by NAICS industry codes (up to 6 digits), e.g. 541512 (computer systems design). Leave empty for all industries.

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

Two-letter US state code where the work is performed, e.g. CA, TX, VA. Leave empty for all.

## `setAsideCode` (type: `string`):

Filter by set-aside, e.g. SBA (Total Small Business), 8A, WOSB, SDVOSBC, HZC. Leave empty for all.

## `organizationName` (type: `string`):

Filter by department or sub-tier agency name, e.g. "General Services Administration". Leave empty for all.

## `daysBack` (type: `integer`):

How many days back (by posted date) to search, 1-365. Ignored if you set explicit dates below. For a scheduled monitor, use a small value (e.g. 2).

## `postedFrom` (type: `string`):

Explicit start date, format MM/DD/YYYY. Overrides Lookback days. Range with Posted to must be <= 1 year.

## `postedTo` (type: `string`):

Explicit end date, format MM/DD/YYYY. Overrides Lookback days.

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

Only return opportunities still marked active (open). Turn off to include inactive/archived ones.

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

Stop after pushing this many opportunities. Leave empty for no limit.

## Actor input object example

```json
{
  "keywords": "cybersecurity",
  "noticeTypes": [
    "o",
    "k",
    "p",
    "r"
  ],
  "daysBack": 30,
  "activeOnly": true
}
```

# 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("straightforward_hydra/sam-gov-opportunities-tracker").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("straightforward_hydra/sam-gov-opportunities-tracker").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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 straightforward_hydra/sam-gov-opportunities-tracker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=straightforward_hydra/sam-gov-opportunities-tracker",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/JHA9tdosHuH2HtAXy/builds/NKoHtEce6RHqInHjJ/openapi.json
