# SAM.gov Contract Opportunities Scraper – Federal RFPs & Bids (`iamshytv/sam-gov-opportunities`) Actor

Find US federal contract opportunities from SAM.gov's official public data extract: RFPs, RFQs, sources sought and awards. Filter by keyword, NAICS, notice type, set-aside (8(a), SDVOSB, WOSB, HUBZone) and state. Deadlines, agency, NAICS/PSC, award amount. No API key.

- **URL**: https://apify.com/iamshytv/sam-gov-opportunities.md
- **Developed by:** [shai mate](https://apify.com/iamshytv) (community)
- **Categories:** Lead generation, Business
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 58.3% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$4.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/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 RFPs, Bids & Awards (No API Key)

Find **US federal government contract opportunities** – solicitations, RFQs/RFPs, combined synopsis/solicitations, sources sought, presolicitations, special notices and **award notices** – from SAM.gov's **official daily public data extract** (published on SAM.gov Data Services). Filter by **keywords, NAICS code or prefix, notice type, set-aside (Small Business, 8(a), SDVOSB, WOSB, EDWOSB, HUBZone), place-of-performance state and posting date**. No SAM.gov account, no API key, no daily request quota.

### Who is it for?

- **Small businesses & GovCon BD teams** – a daily feed of new bids in your NAICS codes.
- **Proposal writers & consultants** – build pipelines for clients by set-aside and state.
- **Market researchers** – who is buying what, award amounts and awardees.
- **AI agents** – an MCP tool that answers "what new cybersecurity RFPs are open in Virginia?"

### Features

- 70,000+ active notices scanned in seconds from the official extract (refreshed by SAM.gov daily)
- Filters: keywords (title + description), NAICS (exact or prefix like `5415`), notice type, set-aside codes, state, posted within N days
- Fields: notice ID, title, solicitation number, type, posted date, **response deadline**, archive date, department / sub-tier / office, NAICS, PSC, set-aside, place of performance, award number/date/amount/awardee, description, direct SAM.gov link
- **Only new since last run** mode for scheduled alerting – newest unseen notices first
- Privacy by design: **contracting officer names, emails and phone numbers are removed**
- Uses only the sanctioned public download (SAM.gov's terms prohibit scraping its website; this Actor doesn't)

### Input example

```json
{
  "keywords": ["software", "cyber"],
  "naicsCodes": ["5415"],
  "noticeTypes": ["Solicitation", "Combined Synopsis/Solicitation", "Sources Sought"],
  "setAsides": ["SBA"],
  "placeOfPerformanceStates": ["VA", "MD", "DC"],
  "postedWithinDays": 7,
  "maxResults": 200,
  "onlyNewSinceLastRun": true
}
```

### Output example

```json
{
  "noticeId": "13d96f7813f04163892a35feaa031015",
  "title": "Mortgage-Backed Securities Operations & Analytics (MBSOA)",
  "solicitationNumber": "86615527MBSOA",
  "noticeType": "Sources Sought",
  "postedDate": "2026-10-23 16:11:58",
  "responseDeadline": "2026-11-06T14:00:00-05:00",
  "department": "HOUSING AND URBAN DEVELOPMENT, DEPARTMENT OF",
  "office": "CPO : GNMA SUPPORT DIVISION",
  "naicsCode": "541512",
  "pscCode": "DA01",
  "setAsideCode": null,
  "placeOfPerformanceState": "VA",
  "awardAmount": null,
  "description": "Description: Mortgage-Backed Securities Operations & Analytics (MBSOA) The Department of Housing and Urban Development (HUD) is issuing this Sources Sought…",
  "url": "https://sam.gov/opp/13d96f7813f04163892a35feaa031015/view"
}
```

### Pricing

Pay per event: **$4.00 per 1,000 opportunities** returned (newest first). Set a max cost per run; the Actor stops at your limit.

### Tips

- Daily alert: `postedWithinDays: 2` + `onlyNewSinceLastRun: true` + a daily Schedule + Slack/email integration.
- Common set-aside codes: `SBA` total small business, `SBP` partial, `8A`, `8AN` 8(a) sole source, `HZC` HUBZone, `SDVOSBC`, `WOSB`, `EDWOSB`.

### Use with AI agents (MCP)

`https://mcp.apify.com?tools=<username>/sam-gov-opportunities`

Data source: SAM.gov Contract Opportunities public extract (U.S. General Services Administration). Not affiliated with or endorsed by GSA or SAM.gov.

# Actor input Schema

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

Keep notices whose title or description contains any keyword (case-insensitive). Empty = all.

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

e.g. 541511, 541512, or a prefix like 5415 to match the whole group.

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

Leave empty for all.

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

e.g. SBA (total small business), SBP, 8A, 8AN, SDVOSBC, WOSB, EDWOSB, HZC.

## `placeOfPerformanceStates` (type: `array`):

2-letter codes, e.g. VA, MD, TX.

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

Use 1 with a daily schedule for a new-bids alert feed.

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

Exclude inactive notices.

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

Newest posted first. You pay per opportunity returned.

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

Truncate the description text to this many characters (0 = none).

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

For scheduled monitoring: skip notices already output in previous runs (stored in a named key-value store).

## Actor input object example

```json
{
  "keywords": [
    "software",
    "cybersecurity"
  ],
  "naicsCodes": [],
  "noticeTypes": [],
  "setAsides": [],
  "placeOfPerformanceStates": [],
  "activeOnly": true,
  "maxResults": 100,
  "descriptionMaxChars": 5000,
  "onlyNewSinceLastRun": false
}
```

# Actor output Schema

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

Matching federal contract opportunities (notice, agency, NAICS/PSC, deadlines, set-aside, award). Stored in the run's default dataset.

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

JSON record RUN_SUMMARY in the default key-value store: counts and any per-input errors.

# 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",
        "cybersecurity"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("iamshytv/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",
        "cybersecurity",
    ] }

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

```

## MCP server setup

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