# SAM.gov Contract Opportunities: Federal Bids, RFPs & Alerts (`pikoulas/sam-gov`) Actor

Every active US federal contract opportunity from SAM.gov's public daily extract, one row each, filtered by keyword, NAICS, PSC, set-aside, notice type, agency, state and date: deadlines, officers' contacts, awards, descriptions. Bid alerts of new and amended ones only. No API key.

- **URL**: https://apify.com/pikoulas/sam-gov.md
- **Developed by:** [Spyridon Pikoulas](https://apify.com/pikoulas) (community)
- **Categories:** Business, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.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.
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: Federal Bids, RFPs & Alerts

Every active US federal contract opportunity on SAM.gov, filtered your way, without an account or an
API key:

- **Keywords:** words or phrases in a notice's title, solicitation number or description.
- **Codes:** NAICS and product and service codes (PSC), whole or by their start (`5415`, `R4`).
- **Set-asides:** small business, 8(a), HUBZone, SDVOSB, WOSB, EDWOSB, VA veteran-owned and the rest.
- **Notice types:** solicitations, combined synopses, presolicitations, sources sought, special
  notices, award notices, justifications.
- **Agencies and places:** part of a department's, sub-tier's or office's name, and the state of the
  place of performance.
- **Dates:** posted or updated in the last days, and deadlines that haven't passed.

One row per opportunity: where a solicitation was amended, its newest notice. With **New and
amended only**, a daily run gives just the opportunities posted or amended since the last one,
with the earlier deadline where it moved.

Each notice comes with its agency path, posting date, response deadline, set-aside, NAICS and PSC,
place of performance, the contracting officers' names, emails and phones, the award (number, date,
amount, awardee) on award notices, its full description and its SAM.gov link.

It reads SAM.gov's own public data extract, the file SAM.gov publishes each day for its data's
reuse. All of its 70,000 or so active notices are read in under 10 seconds.
It costs **$2 per 1,000 notices**.

### What people use it for

- **Bid alerts:** a daily run on a schedule with your NAICS codes and set-asides and **New and
  amended only**, sent to a sheet, Slack or your CRM.
- **Capture and business development:** the opportunities in your market with their deadlines and
  contracting officers in one table.
- **Teaming and subcontracting:** award notices with who won, how much and where.
- **Market research:** what each agency buys, under which codes and set-asides.

### How to get SAM.gov contract opportunities

1. Click **Try for free**; Apify's free plan covers a first run.
2. Enter **Keywords**, **NAICS codes** or other filters, and **Posted within (days)**.
3. Click **Start**, then download the results as JSON, CSV, Excel or HTML, or read them through
   the API.

An input with more options:

```json
{
  "keywords": ["cybersecurity", "zero trust"],
  "naicsCodes": ["5415"],
  "noticeTypes": ["solicitation", "combined", "sources-sought"],
  "setAsides": ["SBA", "SDVOSBC"],
  "agencies": ["VETERANS AFFAIRS"],
  "states": ["VA", "MD", "DC"],
  "postedWithinDays": 7,
  "hidePassedDeadlines": true,
  "maxResults": 0
}
```

Filters combine, and the values within one are alternatives: `["VA", "MD"]` is Virginia or
Maryland. Notices come newest first; `maxResults` caps them, 0 for all that match.

### Bid alerts: new and amended only

With `"trackChanges": true`, a run gives, and charges for, only the opportunities no earlier run
with the same `memory` gave, and those with a newer notice since (an amendment, a new deadline):

```json
{
  "naicsCodes": ["5415"],
  "setAsides": ["SBA"],
  "hidePassedDeadlines": true,
  "trackChanges": true,
  "memory": "it-small-business"
}
```

Each one then carries `change` (`new` or `amended`), `previousNoticeId`, and `previousDeadline`
where the deadline moved; the **New and amended** view shows them. The first run gives every
opportunity that matches; later ones what's new, and the status says how many were unchanged.
The memory is a record in your account's key-value store `sam-gov-memory`, one per memory name; an
opportunity not matched for 120 days is forgotten.

### Output

```json
{
  "noticeId": "8ae1c4445b4a430795ae21326160c4f6",
  "title": "SIPR LAN DROPS",
  "solicitationNumber": "FA282326QA054",
  "type": "Combined Synopsis/Solicitation",
  "baseType": "Combined Synopsis/Solicitation",
  "postedDate": "2026-11-04T16:14:41",
  "responseDeadline": "2026-11-09T10:00:00-06:00",
  "archiveDate": "2026-11-24",
  "department": "DEPT OF DEFENSE",
  "subTier": "DEPT OF THE AIR FORCE",
  "office": "FA2823  AFTC PZIO",
  "cgac": "057",
  "fpdsCode": "5700",
  "aacCode": "FA2823",
  "setAsideCode": "SBA",
  "setAside": "Small Business Set Aside - Total",
  "naicsCode": "541519",
  "pscCode": "7G21",
  "placeOfPerformanceStreet": null,
  "placeOfPerformanceCity": null,
  "placeOfPerformanceState": "FL",
  "placeOfPerformanceZip": "32542",
  "placeOfPerformanceCountry": "USA",
  "awardNumber": null,
  "awardDate": null,
  "awardAmount": null,
  "awardee": null,
  "primaryContactTitle": null,
  "primaryContactName": "Contracting Officer",
  "primaryContactEmail": "contracting.officer@us.af.mil",
  "primaryContactPhone": "8505550100",
  "primaryContactFax": null,
  "secondaryContactTitle": null,
  "secondaryContactName": null,
  "secondaryContactEmail": null,
  "secondaryContactPhone": null,
  "secondaryContactFax": null,
  "officeCity": "EGLIN AFB",
  "officeState": "FL",
  "officeZip": "32542-5418",
  "officeCountry": "USA",
  "additionalInfoLink": null,
  "url": "https://sam.gov/opp/8ae1c4445b4a430795ae21326160c4f6/view",
  "description": "See attacthed PWS Dated 18 SEP 2026, Clauses, and combo. Sipr Lan Drops"
}
```

`type` is the notice as posted, an amendment included, and `baseType` the kind of notice it
belongs to, which the **Notice types** filter reads. An opportunity is a solicitation number at one
stage: its presolicitation, solicitation and award notice are three. `awardAmount` is in US dollars.

### Use it as an API

One call runs it and returns the results as JSON (for runs under 5 minutes; longer ones start a
run and read its dataset). Apify's Python and JavaScript clients, and its Make, Zapier and n8n
integrations, work the same way.

```bash
curl -X POST "https://api.apify.com/v2/acts/pikoulas~sam-gov/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"naicsCodes": ["541512"], "postedWithinDays": 1}'
```

AI agents can call it as a tool through Apify's MCP server: `https://mcp.apify.com?tools=pikoulas/sam-gov`.

### How much does it cost to get SAM.gov contract opportunities?

You pay **$0.002 per notice**, which is $2 per 1,000 notices, on Apify's paid plans, and $3 per
1,000 on the free plan. There are no monthly fees, and a run that finds nothing, or nothing new,
costs nothing. Set
a spending limit on a run and it stops there with what it has.

### Good to know

- SAM.gov rebuilds the extract once a day, about 04:30 UTC, so a notice posted since then comes in
  the next day's run. A daily schedule after 05:00 UTC with `postedWithinDays: 1` sees each new or
  updated notice; `2` gives a day's overlap. With **New and amended only**, `postedWithinDays`
  can stay at 0: what the memory has is skipped free.
- The extract holds active notices: archived and cancelled ones and attachments aren't in it.
- Many notices name no place of performance: with **Place of performance states** set, they're
  left out.

### FAQ

#### Where does the data come from?

From the Contract Opportunities extract SAM.gov publishes for anyone to download, not from its
website or its APIs. [SAM.gov's terms of use](https://sam.gov/content/about/terms-of-use) offer its
data through APIs and extracts and prohibit web scraping; this Actor reads the extract, and your use
of the data is your own responsibility. Most of it is the work of federal employees and in the
public domain in the US. If you're unsure, ask a lawyer. This Actor isn't affiliated with or
endorsed by SAM.gov or the General Services Administration.

#### Something missing or not working?

Open an issue on the **Issues** tab with the input you used, or ask there for a field you need.

# Actor input Schema

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

Words or phrases to find in a notice's title, solicitation number or description: cybersecurity, janitorial, W912DY. A notice with any of them is kept; leave empty for all.

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

Codes or their starts: 5415 takes in 541511, 541512 and the rest.

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

Codes or their starts: R4 takes in R408, R425 and the rest.

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

Only notices of these types; an amendment counts as its notice's type. Empty for all.

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

Only notices with these set-asides. Empty for all, including notices that state none.

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

Part of a department's, sub-tier's or office's name as SAM.gov writes it: VETERANS AFFAIRS, DEPT OF THE NAVY, NAVSUP.

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

Two-letter codes: VA, MD, DC. Many notices name no place of performance and are left out when this is set.

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

Only notices posted or updated in the last this many days; 1 for a daily schedule. 0 for every active notice.

## `hidePassedDeadlines` (type: `boolean`):

Leave out notices whose response deadline has passed. Notices with no deadline stay.

## `trackChanges` (type: `boolean`):

Give, and charge for, only the opportunities no earlier run with the same memory gave, and those amended since (a newer notice for the same solicitation), marked with the earlier deadline where it moved. Schedule it daily for bid alerts that don't repeat.

## `memory` (type: `string`):

One per alert, so two schedules don't share a memory. Kept in your account's key-value store sam-gov-memory; an opportunity not matched for 120 days is forgotten.

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

Newest first; 0 for all that match.

## Actor input object example

```json
{
  "keywords": [
    "cybersecurity"
  ],
  "hidePassedDeadlines": false,
  "trackChanges": false,
  "memory": "default",
  "maxResults": 20
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `changes` (type: `string`):

No description

# 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"
    ],
    "maxResults": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("pikoulas/sam-gov").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"],
    "maxResults": 20,
}

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,pikoulas/sam-gov"
        }
    }
}
```

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/n6eBxsucbvp3ni0zg/builds/JDM5Z2vq4jka7GDOR/openapi.json
