# SAM.gov Contract Opportunities Scraper - Federal Bids (`bigdatadan/samgov-opportunities`) Actor

Search live US federal contract opportunities on SAM.gov by keyword, NAICS, notice type, set-aside and state. Deadlines, agency, NAICS, set-aside, place of performance, contracting contacts. No API key.

- **URL**: https://apify.com/bigdatadan/samgov-opportunities.md
- **Developed by:** [Alexander Meggitt](https://apify.com/bigdatadan) (community)
- **Categories:** Lead generation, Business, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.40 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Scraper: bids, NAICS, set-asides and contacts

Find live US federal contract opportunities on **SAM.gov** and get them as a clean table: title, notice type, agency/office, **NAICS**, PSC, **set-aside** (SBA, 8(a), HUBZone, SDVOSB, WOSB…), **place of performance**, posted/modified dates, **response deadline**, award info, full description, and the official **contracting officer contacts**.

- **No SAM.gov account or API key.** The official API needs a key and has tight daily limits; this actor uses the same public endpoints as the SAM.gov website.
- **Server-side filters:** keywords, NAICS codes, notice types, updated-within-N-days.
- **Extra filters:** set-aside codes, place-of-performance states, open-for-response only.
- **Fast:** 25 fully detailed notices in about 2 s. Details are fetched in parallel (4 at a time, with retry/backoff), and only for rows that will be returned.
- **Daily-monitor friendly:** set `updatedWithinDays: 1` and schedule it every morning.

### Use cases

GovCon bid-finding for small businesses, BD teams and consultants; lead lists for proposal writers; market research by NAICS and agency; feeding a CRM or Slack alert of new solicitations.

### Input

| Field | Description |
|---|---|
| `keywords` | Same as the SAM.gov search box |
| `naicsCodes` | e.g. `541512`, `236220` |
| `noticeTypes` | Solicitation, Combined Synopsis/Solicitation, Presolicitation, Sources Sought, Special Notice, Award… |
| `setAsides` | `SBA`, `8A`, `HZC`, `SDVOSBC`, `WOSB`, `EDWOSB`, `NONE` |
| `states` | Place-of-performance states, e.g. `CO`, `TX` |
| `updatedWithinDays` | Default 7; 0 = no limit |
| `openForResponseOnly` | Drop notices whose deadline has passed |
| `includeDetails` / `includeContacts` | Full record and points of contact (default on) |
| `maxResults` | Cap (charged per notice) |

Example (small-business construction in the Southwest, still open):

```json
{"naicsCodes": ["236220", "238210"], "setAsides": ["SBA", "SDVOSBC", "8A", "HZC"], "states": ["CO", "UT", "AZ", "NM", "TX"], "updatedWithinDays": 30, "openForResponseOnly": true, "maxResults": 20}
```

### Output (real row from a test run on Oct 31, 2026)

```json
{
  "notice_id": "dbbad4746c0847de9046bee6a8519c03",
  "title": "FCI Three Rivers-Replace Generators, Transformers, and Electrical Infrastructure",
  "solicitation_number": "15BNAS27Q00000002",
  "notice_type": "Combined Synopsis/Solicitation",
  "notice_type_code": "k",
  "department": "JUSTICE, DEPARTMENT OF",
  "agency": "FEDERAL PRISON SYSTEM / BUREAU OF PRISONS",
  "office": "NATIONAL ACQUISITIONS - CO",
  "office_city": "WASHINGTON",
  "office_state": "DC",
  "posted_date": "2026-10-29T13:54:31+00:00",
  "modified_date": "2026-10-29T13:54:31+00:00",
  "response_deadline": "2026-11-30T11:00:00-05:00",
  "response_timezone": "America/New_York",
  "is_active": true,
  "is_canceled": false,
  "awardee_name": null,
  "description": "Modification** 10/29/2026- Add Pre-Bid Meeting Minutes\n\nModification** 10/27/2026 Pre-Bid Meeting  will be held on Thursday Oct. 29, 2026- 8:00 AM CST, prior to the site visit to begin. If you are not able to attend the …",
  "url": "https://sam.gov/opp/dbbad4746c0847de9046bee6a8519c03/view",
  "naics": [
    "236220"
  ],
  "psc_code": "Z2NZ",
  "set_aside": "8A",
  "pop_city": "Three Rivers",
  "pop_state": "TX",
  "pop_zip": "78071",
  "pop_country": "USA",
  "award_amount": null,
  "award_date": null,
  "awardee_uei": null,
  "scraped_at": "2026-11-01T06:01:06.607519+00:00"
}
```

`contacts` holds the government points of contact published on the notice: `type`, `name`, `title`, `email`, `phone`.

### Pricing (suggested)

Pay per event: **`opportunity` at $0.003 ($3.00 per 1,000 notices)**, with tiers down to $2.40/1K for Gold.
Benchmarks in Apify Store on Oct 31, 2026: the leading SAM.gov actor charges about $3/1K (28 monthly users), the second has about 25 monthly users, and a third fails 71% of its runs. GovCon users get high value per notice, so $3/1K is safe. A $5/1K "with contacts" price is also plausible.

### Notes

SAM.gov data is public US Government information. The actor makes about 1 request per notice and backs off on errors, so please keep schedules reasonable.

# Actor input Schema

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

Free-text search, same as the SAM.gov search box (e.g. cybersecurity, janitorial, "fire alarm"). Leave empty to list everything that matches the other filters.

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

Only opportunities with these NAICS codes, e.g. 541512, 236220.

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

Leave empty for all types.

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

Keep only these set-asides (needs details on). Examples: SBA (Total Small Business), 8A, HZC (HUBZone), SDVOSBC (Service-Disabled Veteran-Owned), WOSB, EDWOSB, NONE.

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

Two-letter state codes, e.g. CO, TX (needs details on).

## `updatedWithinDays` (type: `integer`):

Only notices posted or modified in the last N days. 0 = no limit. Use 1 for a daily monitor.

## `openForResponseOnly` (type: `boolean`):

Skip notices whose response deadline has already passed (and awards without a deadline).

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

Skip archived/inactive notices.

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

Fetch each notice's full record (NAICS, set-aside, place of performance, contacts, full description). One extra request per notice.

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

Include the official government points of contact published on the notice.

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

Stop after this many notices (you are charged per notice).

## Actor input object example

```json
{
  "keywords": "cybersecurity",
  "updatedWithinDays": 7,
  "openForResponseOnly": false,
  "activeOnly": true,
  "includeDetails": true,
  "includeContacts": true,
  "maxResults": 100
}
```

# Actor output Schema

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

One row per SAM.gov federal contract notice: agency, NAICS, set-aside, deadlines, place of performance, contacts and URL.

# 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("bigdatadan/samgov-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" }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bigdatadan/samgov-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/jZBk5GJVXM1G850zi/builds/9JjH9RF1VpIWgQ8qx/openapi.json
