I built the Apify actor I use in the examples. I will say that now, so you can read the rest with the right amount of skepticism.
The job is simple. You want US federal contract opportunities from SAM.gov: solicitations, combined synopses, sources sought, awards. You want filters for keyword, NAICS, set-aside, agency, and state. You do not want to register for a SAM.gov API key, and you do not want to scrape the website.
If that is your job, you can do it for $1.50 per 1,000 matching notices, plus a $0.00005 start fee per run. The first 100 notices each UTC month are free. Platform usage is included. The full daily extract is scanned for free. You only pay for rows that match your filters.
What I actually use
I use SAM.gov Contract Opportunities on Apify Store. It reads SAM.gov's official public Contract Opportunities extract, not the website. There is no login, no captcha, and no CSS selector to break. You do not need a SAM.gov account or API key.
Each matching notice becomes a dataset row with the notice id, solicitation number, title, type, department, NAICS, set-aside, dates, place of performance, a public sam.gov URL, and, for award notices, the awardee and amount.
What it will do:
- Filter by keyword (including a prefix like
cyber*), NAICS, PSC, set-aside, notice type, agency, state, and posted date. - Keep only notices still open for response, or only the latest version of each solicitation.
- Optionally add the description, with emails, phone numbers, and contact sentences removed.
- Remember which notices it already returned, if you want a daily alert feed.
What it will not do:
- Give you contact names, emails, or phones. Those columns in the extract are never read.
- Return archived or historical notices. The public extract is active notices only.
- Return restricted or CUI notices. Those are not in the public extract.
- Scrape logged-in pages, or get around a paywall.
If you need the official SAM.gov Opportunities API, with your own key and their quota, this is the wrong tool. If you need a name and a phone number for the contracting officer, this is also the wrong tool.
How fresh is the data
SAM.gov publishes the extract once a day, early morning US Eastern. A notice posted this afternoon usually shows up in the extract the next morning. The dataset includes dataAsOf, which is when SAM.gov generated the file, so you can see how stale a given run is.
Walkthrough: software work posted in the last week
You will need an Apify account and an API token from Console, under Settings, then API and Integrations. The Free plan is $0, includes $5 of prepaid usage each month, and does not require a card. Unused credit expires at the end of the cycle. You can also run the actor from its Store page with no code. The examples below are the API path.
This input asks for software-related notices in NAICS 5415 (computer systems design), posted in the last 7 days, still open for a response, capped at 20 rows.
curl
curl -X POST "https://api.apify.com/v2/acts/datlab~sam-gov-contract-opportunities/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"keywords": ["software"],
"naicsCodes": ["5415"],
"noticeTypes": ["solicitation", "combined", "sources_sought"],
"postedWithinDays": 7,
"openForResponseOnly": true,
"maxItems": 20
}'
JavaScript, official client
import { ApifyClient } from "apify-client";
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor("datlab/sam-gov-contract-opportunities").call({
keywords: ["software"],
naicsCodes: ["5415"],
noticeTypes: ["solicitation", "combined", "sources_sought"],
postedWithinDays: 7,
openForResponseOnly: true,
maxItems: 20,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
for (const item of items) {
console.log(item.postedDate, item.noticeType, item.title, item.url);
}
Python, official client
import os
from apify_client import ApifyClient
client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("datlab/sam-gov-contract-opportunities").call(
run_input={
"keywords": ["software"],
"naicsCodes": ["5415"],
"noticeTypes": ["solicitation", "combined", "sources_sought"],
"postedWithinDays": 7,
"openForResponseOnly": True,
"maxItems": 20,
}
)
items = client.dataset(run["defaultDatasetId"]).list_items().items
for item in items:
print(item["postedDate"], item["noticeType"], item["title"], item["url"])
A successful item looks like this (trimmed, from a real run shape):
{
"noticeId": "8a07bbdf3601455da3e3aa3a0616d1b3",
"solicitationNumber": "128PTA27Q0009",
"title": "Compliance Data Warehouse (CDW), HyDRA, HyDRA Maps, Analytics, Geospatial Services, and Operational Support",
"noticeType": "Sources Sought",
"department": "AGRICULTURE, DEPARTMENT OF",
"subTier": "USDA, DEPARTMENTAL ADMINISTRATION",
"naicsCode": "518210",
"setAside": "No Set aside used",
"postedDate": "2026-11-16T19:46:02",
"responseDeadline": "2026-11-30T08:00:00-05:00",
"active": true,
"placeOfPerformance": "DC, USA",
"popState": "DC",
"awardAmount": null,
"awardee": null,
"url": "https://sam.gov/opp/8a07bbdf3601455da3e3aa3a0616d1b3/view",
"source": "sam.gov-public-extract",
"dataAsOf": "2026-11-17T04:30:19.000Z"
}
I ran a 5-notice health check on 17 November 2026. The fields above are the ones the actor actually returns. The sample title and dates will move as the extract refreshes. postedDate comes from SAM.gov with no time zone. responseDeadline usually has the agency's offset, and sometimes it is a date only.
Filters that are easy to get wrong
-
keywordsare a whole-word or phrase match, case-insensitive.cyber*is a prefix match. By default they also search the description. TurnsearchInDescriptionoff if you only want the title and solicitation number. -
naicsCodesandpscCodesare prefix matches.5415matches 541511 and 541512.D3matches D301. -
setAsideTypesuses SAM.gov codes such asSBA,8A,SDVOSBC,WOSB, plusANY(any set-aside) andNONE(full and open). -
agenciesis a substring of the department, sub-tier, or office. Abbreviations like DOD, VA, GSA, DHS, and NASA work. -
placeOfPerformanceStatesacceptsTXorCalifornia. -
postedFromandpostedTo(YYYY-MM-DD) overridepostedWithinDays. -
includePre2022Awardsdefaults to false. Award notices posted before 4 April 2022 may include Dun and Bradstreet entity data, and SAM.gov restricts how that can be used. Leave the flag off unless you have a reason and have read that limit. -
onlyNewSinceLastRunskips notices already returned, andstateKeykeeps that memory separate per watch list.
Attachments live on the public SAM.gov page at url. The extract does not include the files.
What a run actually costs
The prices are pay per event. I am doing the arithmetic in the open, not quoting a made-up invoice.
- First 100 notices each UTC month are free. The $0.00005 start fee is still charged.
- After that, 1,000 notices in one run: 1,000 x $0.0015 + $0.00005 = $1.50005.
- 20 notices after the allowance is used: 20 x $0.0015 + $0.00005 = $0.03005.
Filters run before anything is saved, so a tight maxItems and a tight date window are how you cap spend. Scanning the extract is free.
When a result looks off
A notice you saw on sam.gov today is missing. The extract lags by up to a day. Check dataAsOf. If the notice is archived, restricted, or CUI, it will not be in this file.
The title looks truncated. Some titles are already truncated in SAM.gov's extract. The actor does not invent the rest.
You wanted a contracting officer's email. It is not in the output, by design.
You wanted awards from 2020. Historical and archived notices are not in the public extract.
You are responsible for how you use the data (SAM.gov terms, applicable law, and the pre-2022 entity-data limit if you turn that flag on). The actor only reads the public extract.
If you want an agent to call this as a tool, you have two options. Apify hosts an MCP server, and you can pin the actor with https://mcp.apify.com/?tools=fetch-actor-details,datlab/sam-gov-contract-opportunities. Or you can run the open-source DatLab MCP server locally with your own Apify token. See the Apify MCP docs.
If a public notice comes out messy, leave a comment with the notice id. I will take a look.
The actor is here: datlab/sam-gov-contract-opportunities. If you are collecting page text or screenshots instead of federal notices, I also have Web Page to Markdown, Website to Markdown Crawler, and Bulk Website Screenshot.
Top comments (0)