# SAM.gov Opportunities Scraper — Federal Contract Monitor (`bovi/sam-gov-opportunities-scraper`) Actor

Scrape active US federal contract opportunities from SAM.gov: title, solicitation number, notice type, agency, set-aside, NAICS, deadlines, contact, location. Filter by keyword, NAICS, set-aside, agency, state or date. Keyless official source. Schedule as a GovCon monitor. Per result.

- **URL**: https://apify.com/bovi/sam-gov-opportunities-scraper.md
- **Developed by:** [Vitalii Bondarev](https://apify.com/bovi) (community)
- **Categories:** Business, Lead generation
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.43 / 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/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 Opportunities Scraper — Federal Contract Monitor

Scrape **active US federal contract opportunities** straight from SAM.gov — the
official government system where agencies publish solicitations, sources-sought
notices, combined synopses and award notices. Built for GovCon capture teams,
small-business contractors, proposal shops and market-intelligence pipelines who
need clean, structured opportunity data on a schedule.

### What you get — one flat record per opportunity

| Field | Description |
|---|---|
| `title`, `solicitation_number` | Opportunity title and solicitation/notice number |
| `notice_type`, `notice_type_code` | Solicitation, Presolicitation, Sources sought, Award notice … |
| `is_active`, `is_canceled` | Lifecycle flags |
| `publish_date`, `response_date`, `modified_date` | Posting date, offer deadline, last-modified |
| `modification_count` | Number of amendments (great for change monitoring) |
| `department`, `agency`, `office` | Full awarding-org hierarchy |
| `naics_code`, `classification_code`, `set_aside` | NAICS, PSC, small-business set-aside |
| `contact_name`, `contact_email`, `contact_phone` | Primary point of contact |
| `pop_city`, `pop_state`, `pop_zip`, `pop_country` | Place of performance |
| `description` | Full plain-text opportunity description |
| `url` | Direct link to the opportunity on sam.gov |

### Why this one

- **Actually returns data.** It reads SAM.gov's live opportunity index and
  returns populated, current records — not empty result sets.
- **Keyless and official.** Pulls from the official SAM.gov source. No API key
  required to run; supply an optional public api.sam.gov key only if you want
  higher request budgets.
- **Built to be scheduled.** Sort by most-recently-modified and filter on a
  `modifiedFrom` window to run it as a recurring monitor that surfaces new and
  amended notices in your industry.
- **Rich by default.** Detail enrichment adds NAICS, set-aside, point of
  contact and place of performance — the fields you need to actually qualify
  and act on a lead.

### Filters

`keyword` · `naicsCode` · `noticeType` · `setAside` · `organizationId`
(agency) · `placeOfPerformanceState` · `modifiedFrom` / `modifiedTo` ·
`activeOnly` · `includeDetails` · `maxItems`.

### Example input

```json
{
  "keyword": "cybersecurity",
  "naicsCode": "541512",
  "setAside": "SDVOSBC",
  "placeOfPerformanceState": "VA",
  "activeOnly": true,
  "includeDetails": true,
  "maxItems": 200,
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"], "apifyProxyCountry": "US" }
}
```

### Pricing

Pay per result — you are charged for each opportunity returned. Run it ad-hoc or
schedule it; you only pay for the opportunities you collect.

### Notes

This Actor collects publicly available US federal procurement information for
legitimate business-development and market-research use. Use US residential
proxy (the default) for reliable access.

# Actor input Schema

## `keyword` (type: `string`):

Free-text term searched across opportunity titles and descriptions, e.g. "cybersecurity", "roofing", "IT support".

## `naicsCode` (type: `string`):

North American Industry Classification System code, e.g. "541512" (Computer Systems Design), "236220" (Commercial Building Construction).

## `noticeType` (type: `string`):

Restrict to one notice type.

## `setAside` (type: `string`):

Restrict to a small-business set-aside category.

## `organizationId` (type: `string`):

Filter by awarding agency using its SAM.gov organization ID, e.g. "100006688" (Department of Defense).

## `placeOfPerformanceState` (type: `string`):

Two-letter US state code for the place of performance, e.g. "VA".

## `modifiedFrom` (type: `string`):

Only opportunities modified on/after this date. Format YYYY-MM-DD-04:00 (with timezone offset), e.g. "2026-06-01-04:00". Use with sort = most recently modified for a monitor.

## `modifiedTo` (type: `string`):

Only opportunities modified on/before this date. Format YYYY-MM-DD-04:00, e.g. "2026-06-19-04:00".

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

When on, return only currently active (not archived) opportunities.

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

When on, fetch each opportunity's detail page to add NAICS, set-aside, point of contact, place of performance and full description (one extra request per opportunity).

## `maxItems` (type: `integer`):

Maximum number of opportunities to return.

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

Optional public api.sam.gov key for higher request budgets. Never required — the actor works without it. Get one free at https://sam.gov.

## `proxyConfiguration` (type: `object`):

Apify proxy used to reach SAM.gov. US residential is the reliable default; the run is billed to your account.

## Actor input object example

```json
{
  "keyword": "information technology",
  "noticeType": "",
  "setAside": "",
  "activeOnly": true,
  "includeDetails": true,
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

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

Dataset of SAM.gov opportunities (title, solicitation number, notice type, agency, set-aside, NAICS, response date, point of contact, place of performance, 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 = {
    "keyword": "information technology",
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("bovi/sam-gov-opportunities-scraper").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 = {
    "keyword": "information technology",
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("bovi/sam-gov-opportunities-scraper").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 '{
  "keyword": "information technology",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}' |
apify call bovi/sam-gov-opportunities-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

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