SAM.gov & USAspending Contracts Scraper
Pricing
from $0.70 / 1,000 opportunity records
SAM.gov & USAspending Contracts Scraper
SAM.gov and government contracts data in one place: search federal opportunities by keyword, NAICS, set-aside and agency, look up USAspending award history, and run a daily monitor with Slack or webhook alerts. From $1 per 1,000 opportunities.
Pricing
from $0.70 / 1,000 opportunity records
Rating
0.0
(0)
Developer
Andrew Boiko
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
5 days ago
Last modified
Categories
Share
SAM.gov & USAspending Contracts Scraper puts open federal contract opportunities and past award data into one dataset, so you can see both what is up for bid and who held similar contracts before. Search SAM.gov by keyword, NAICS code, set-aside and agency, look up USAspending award history by company, NAICS or agency, and run a daily monitor that returns only notices you have not seen yet and can post them to Slack or any webhook.
It uses the official SAM.gov Get Opportunities API and the public USAspending.gov API. No browser, no scraping of protected pages, no logins. Results come as clean JSON, CSV or Excel from the Apify dataset.
What does SAM.gov & USAspending Contracts Scraper do?
The actor has three modes:
- Awards history (USAspending, no key needed). Search federal contract awards by recipient name, NAICS code, awarding agency, keyword, date range and amount. Each row has the award ID, recipient, amount, dates, awarding agency and sub-agency, NAICS, PSC and a link to the USAspending award page. This is the FPDS-style "who won what" data used for incumbent research.
- Opportunities search (SAM.gov, free API key). Search active and archived notices by title keyword, NAICS code, set-aside type, agency, state, notice type, posted dates and response deadline. Each row has the notice ID, solicitation number, agency path, set-aside, deadline, NAICS, place of performance, points of contact, resource links and the SAM.gov link.
- Daily monitor (SAM.gov, free API key). Same filters as the opportunities search, but the actor remembers the notices it already delivered in a named key-value store and returns only new ones on the next run. New notices can be posted to a Slack incoming webhook or any HTTPS webhook (Make, Zapier, n8n).
Optional join: in opportunities and monitor mode you can switch on "Add incumbent award history". For each opportunity NAICS code the actor attaches the largest recent USAspending awards (default: last 3 years) in the field incumbentAwards, so one row shows what is open and who has been winning similar work. The match is by NAICS and, when the agency is one of the major departments the actor recognises, also by top-level awarding agency. The field incumbentMatch tells you which. This is a NAICS-level signal, not a link to the specific predecessor contract of one solicitation.
Why use SAM.gov & USAspending Contracts Scraper?
- Opportunities and awards in one actor. Other SAM.gov scrapers in the Store return notices only. Here the same account gives you SAM.gov notices, USAspending awards and the incumbent join, so you do not stitch three tools together.
- Built for monitoring. The monitor mode keeps state between runs, overlaps the date window by one day so late-posted notices are not missed, never charges for a notice you already received, and posts only the new ones to Slack or a webhook.
- Cheap, per record pricing. Opportunities cost $1.00 per 1,000 records and awards $2.00 per 1,000 on the free pricing tier, going down to $0.70 and $1.40 per 1,000 on the Gold plan. You pay for records only, not for empty results, errors or duplicates.
- Official data sources. SAM.gov API and USAspending API, so the schema is stable and there is nothing to break when a web page changes. Retries with backoff on 429 and 5xx, clear errors when the API key is wrong or the daily quota is used up.
How much does it cost to scrape sam.gov?
You pay per record returned. There is no charge for the actor start beyond Apify's standard start event, and nothing for errors, empty rows or duplicate notices.
| Event | FREE | BRONZE | SILVER | GOLD |
|---|---|---|---|---|
| Opportunity record (SAM.gov notice) | $0.0010 | $0.0009 | $0.0008 | $0.0007 |
| Award record (USAspending award) | $0.0020 | $0.0018 | $0.0016 | $0.0014 |
Examples on the FREE tier: 1,000 SAM.gov opportunities = $1.00. 1,000 USAspending awards = $2.00. A daily monitor that finds 20 new notices per day costs about $0.02 per day, about $0.60 per month.
Platform compute for a typical run is a few cents or less, because the actor is HTTP only and a 1,000 record run takes seconds to a minute.
Limits and controls:
- Free Apify plan: output is capped at 25 results per run. The run stops normally with the message "Free tier limit reached (25 results). Upgrade to a paid Apify plan for unlimited results."
- Max results: the
maxItemsinput stops the run after that many billed records. - Spending limit: set "Maximum cost per run" (
maxTotalChargeUsd) in the run options. The actor stops cleanly when the limit is reached. - Incumbent awards attached to opportunities are not billed separately. They only add a few USAspending requests.
Input
Pick a mode first. All other fields are optional filters.
| Field | Type | Used in | What it does |
|---|---|---|---|
mode | select | all | awards, opportunities or monitor. Default awards. |
keywords | list | all | Opportunities and monitor: matched against the notice title, one API request per keyword. Awards: matched against award text on USAspending. |
naicsCodes | list | all | NAICS codes such as 541512. |
agencies | list | all | Opportunities: agency or department name as SAM.gov writes it (for example DEPT OF DEFENSE), first value used. Awards: exact top-tier agency name (for example Department of Defense). |
setAsides | list | opportunities, monitor | SAM.gov set-aside codes: SBA, 8A, HZC, SDVOSBC, WOSB, EDWOSB, VSA and others. One request per code. |
noticeTypes | list | opportunities, monitor | o solicitation, k combined synopsis/solicitation, p presolicitation, r sources sought, s special notice, a award notice, u justification, g surplus sale, i intent to bundle. |
state | text | opportunities, monitor | Two-letter state code. |
recipientNames | list | awards | Company names to look up on USAspending. |
postedFrom, postedTo | text | all | Date range as YYYY-MM-DD. SAM.gov accepts at most a 1-year window, longer windows are shortened with a warning. |
daysBack | integer | all | Used when postedFrom is empty. 7 days for opportunities, 90 for awards. In monitor mode: look-back of the first run only. |
responseDeadlineFrom, responseDeadlineTo | text | opportunities, monitor | Filter by response deadline. |
minAwardAmount, maxAwardAmount | integer | awards | Award value range in USD. |
includeIncumbentAwards, incumbentYears | boolean, integer | opportunities, monitor | Attach recent top awards for the same NAICS. |
maxItems | integer | all | Stop after this many billed records. Default 20. |
samApiKey | secret | opportunities, monitor | Your free SAM.gov API key. |
stateStoreName, monitorName | text | monitor | Named key-value store and state key. Use one monitorName per saved Task. |
notifyWebhookUrl, notifyFormat | secret, select | monitor | Slack incoming webhook or any HTTPS URL, as a Slack message or as JSON. |
proxyConfiguration | proxy | all | Off by default. Both sources are official APIs. |
Example 1: awards for a NAICS code, no key needed.
{"mode": "awards","naicsCodes": ["541512"],"agencies": ["Department of Veterans Affairs"],"daysBack": 180,"minAwardAmount": 1000000,"maxItems": 100}
Example 2: small business set-aside opportunities with incumbents.
{"mode": "opportunities","naicsCodes": ["541512", "541519"],"setAsides": ["SBA", "8A"],"noticeTypes": ["o", "k", "r"],"daysBack": 14,"includeIncumbentAwards": true,"samApiKey": "YOUR_SAM_GOV_KEY","maxItems": 200}
Example 3: daily monitor with a Slack alert.
{"mode": "monitor","keywords": ["cybersecurity", "zero trust"],"naicsCodes": ["541512"],"monitorName": "cyber-alerts","notifyWebhookUrl": "https://hooks.slack.com/services/XXX/YYY/ZZZ","notifyFormat": "slack","samApiKey": "YOUR_SAM_GOV_KEY"}
Output example
Illustrative records, not taken from a live run. Opportunity row:
{"recordType": "opportunity","noticeId": "0a1b2c3d4e5f60718293a4b5c6d7e8f9","title": "Cybersecurity Support Services","solicitationNumber": "W911QX-26-R-0042","agency": "DEPT OF DEFENSE.DEPT OF THE ARMY.ACC-APG","department": "DEPT OF DEFENSE","postedDate": "2026-10-14","type": "Solicitation","responseDeadline": "2026-11-15T17:00:00-05:00","setAside": "Total Small Business Set-Aside (FAR 19.5)","setAsideCode": "SBA","naicsCode": "541512","placeOfPerformance": { "city": "Aberdeen", "state": "MD", "country": "USA" },"contacts": [{ "type": "primary", "name": "Jane Doe", "email": "jane.doe@example.mil" }],"url": "https://sam.gov/opp/0a1b2c3d4e5f60718293a4b5c6d7e8f9/view","incumbentMatch": "naics+agency","incumbentAwards": [{ "awardId": "W91XXX24D0001", "recipientName": "EXAMPLE SYSTEMS LLC", "awardAmount": 12500000, "startDate": "2024-03-01", "endDate": "2027-02-28" }]}
Award row:
{"recordType": "award","awardId": "W91XXX24D0001","recipientName": "EXAMPLE SYSTEMS LLC","recipientUei": "EXAMPLEUEI123","awardAmount": 12500000,"startDate": "2024-03-01","endDate": "2027-02-28","agency": "Department of Defense","subAgency": "Department of the Army","naicsCode": "541512","pscCode": "D302","url": "https://www.usaspending.gov/award/CONT_AWD_W91XXX24D0001_9700_-NONE-_-NONE-"}
A summary with counts, charged events, estimated cost and warnings is saved to the OUTPUT record of the default key-value store.
How to use SAM.gov & USAspending Contracts Scraper (tutorial)
- Get a free SAM.gov API key (only for opportunities and monitor modes). Sign in at sam.gov, open Account Details and request a Public API Key. Awards mode needs no key.
- Open the actor and pick a mode. Start with
awardsand the prefilled NAICS code to see the data shape in under a minute. - Set your filters. Add keywords, NAICS codes, set-asides or agencies. For opportunities, paste your key in the secret field.
- Run and export. Open the Output tab, switch to the Overview table, and download JSON, CSV or Excel.
- Schedule alerts. Save the monitor setup as a Task, keep one
monitorNameper Task, set a daily schedule and paste a Slack incoming webhook URL. Only notices you have not received before are returned and posted.
Run via API
Replace YOUR_APIFY_TOKEN with your token. The actor id is tiger19935~sam-gov-usaspending-contracts.
curl -X POST "https://api.apify.com/v2/acts/tiger19935~sam-gov-usaspending-contracts/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \-H "Content-Type: application/json" \-d '{"mode":"awards","naicsCodes":["541512"],"daysBack":30,"maxItems":50}'
Node.js:
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: process.env.APIFY_TOKEN });const run = await client.actor('tiger19935/sam-gov-usaspending-contracts').call({mode: 'opportunities',naicsCodes: ['541512'],setAsides: ['SBA'],samApiKey: process.env.SAM_GOV_API_KEY,maxItems: 100,});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items.length, 'opportunities');
MCP: the input is a flat JSON object with list fields, so the actor can be called as a tool from Apify MCP server clients. Ask your assistant for "federal contract awards for NAICS 541512 in the last 30 days".
Integrations
- Slack: paste an incoming webhook URL into
notifyWebhookUrlin monitor mode. - Make, Zapier and n8n: use the Apify module or node to run the actor and read the dataset, or set
notifyFormattojsonand receive new notices on a webhook trigger. Both tools can forward them to email. - Google Sheets: use the Apify integration to append dataset items to a sheet after each scheduled run.
- Webhooks: Apify run webhooks work as usual, for example to start a CRM import when a run succeeds.
- Schedules: run the monitor Task daily from the Apify Console.
Legal / ethical use
The actor reads public US government data through the official SAM.gov API and the USAspending.gov API. It does not log in, bypass access controls or collect data that is not public. Use your own SAM.gov API key and follow the SAM.gov and USAspending.gov terms of use. Points of contact in notices can include names and work email addresses of government staff. If you store or process them, you are responsible for compliance with the laws that apply to you, including privacy and anti-spam rules. This actor is not affiliated with or endorsed by the US government, GSA or SAM.gov.
FAQ and support
Do I need a SAM.gov API key?
For awards mode, no. For opportunities and monitor modes, yes: the SAM.gov Get Opportunities API requires a key. It is free. Paste your own into the secret field samApiKey.
Why do I get a quota message from SAM.gov? Free SAM.gov keys have a daily request limit that depends on your account type, and it can be as low as about 10 requests per day for accounts without a role. Each keyword, NAICS and set-aside combination uses at least one request. Reduce the number of combinations, wait for the quota to reset, or use a key from an account with higher limits. Results found before the limit are kept.
Can I get alerts?
Yes. Save a Task in monitor mode with your NAICS codes and keywords, schedule it daily and set notifyWebhookUrl to a Slack incoming webhook, or to a Make, Zapier or n8n webhook that forwards to email.
What is the date limit? SAM.gov accepts a posted-date window of at most one year per request. Longer windows are shortened to the most recent year with a warning. Run again with an earlier "Date to" to read older notices. USAspending history goes back to October 2007.
How are keywords matched? In opportunities mode keywords are matched against the notice title by SAM.gov. In awards mode they are matched against award text by USAspending.
Does it show who won a specific solicitation? Not directly. The incumbent field lists the largest recent awards for the same NAICS and, where recognised, the same agency. Use it to find likely incumbents, then check the award rows for the exact contract.
Are duplicates billed? No. Duplicate notices and awards, empty rows and errors are not charged. In monitor mode notices delivered in earlier runs are skipped.
Something looks wrong or a field is empty. Open the Issues tab on the actor page with your run link. Replies come within 12 hours.
More tools by the same author
- Prozorro & TED Tenders Scraper - public tenders from Ukraine and the EU
- Billing & Payment Stack Detector - which payment gateway a website uses
- Website Technology Detector - tech stack of any site
- Decision-Maker Contacts - people and roles at a company
Related searches
sam.gov scraper, sam.gov api, federal contract opportunities, usaspending api, government contracts data, naics contract search, gov contract alerts, rfp monitor, fpds data, set-aside opportunities, federal bids, govcon lead generation.