SAM.gov Scraper — Federal Contract Opportunities
Pricing
from $3.50 / 1,000 opportunity returneds
SAM.gov Scraper — Federal Contract Opportunities
Search public SAM.gov federal contract opportunities through SAM.gov's public API. Returns solicitations, sources sought, awards, contacts, deadlines, set-asides and direct SAM.gov links.
Pricing
from $3.50 / 1,000 opportunity returneds
Rating
0.0
(0)
Developer
Khadin Akbar
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
18 days ago
Last modified
Categories
Share
What is SAM.gov Scraper — Federal Contract Opportunities?
SAM.gov Scraper is an Apify Actor for capture teams, proposal teams, analysts, and AI agents that need public U.S. federal contract opportunities from the public SAM.gov Opportunities API. It accepts a search query and optional filters, and each dataset record represents one validated opportunity. The returned record can include the opportunity title, solicitation number, notice type, agency, NAICS code, set-aside details, deadlines, contacts, attachment URLs, and direct SAM.gov links, giving you a structured result set for review and downstream routing.
Best fit and connected workflows
This Actor fits workflows that start with a procurement signal and end with a decision on what to review next. Common routing patterns include:
- Keyword-led opportunity discovery for a capability area such as cybersecurity or cloud migration.
- NAICS, set-aside, agency, or place-of-performance filtering for focused market monitoring.
- Deadline-based screening for proposal calendars and capture queues.
- Award, sources sought, solicitation, and special notice monitoring in one normalized output stream.
- Apify-based automation and AI agent workflows that need one consistent opportunity dataset.
Because it is an Apify Actor, it is usable through Apify MCP as part of a larger agent workflow, while the data still comes from the public SAM.gov API and is written to the default dataset.
Practical scenario
A capture manager starts with the query "network modernization", the NAICS code 541512, and a posted-date range for the current search window. The Actor returns records with fields like title, noticeType, agency, responseDeadline, setAsideCode, contacts, and samUrl. The manager uses the deadline and set-aside fields to decide which opportunities move into the capture queue, then opens samUrl for the public notice and attached documents.
Inputs
| Field | Type | Purpose |
|---|---|---|
query | string | Searches words in the opportunity title. Required. |
noticeTypes | array[string] | Limits results to published SAM.gov notice-type codes such as o, k, r, or a. |
naicsCode | string | Filters by one 2-to-6-digit NAICS industry code. |
setAsideCode | string | Filters by one SAM.gov set-aside code such as SBA, 8A, HZC, or SDVOSBC. |
state | string | Filters by a two-letter place-of-performance state or territory code. |
agency | string | Filters by SAM.gov organization name, such as Department of Defense. |
postedFrom | string | Sets the first posted date in YYYY-MM-DD or MM/DD/YYYY format. |
postedTo | string | Sets the last posted date in YYYY-MM-DD or MM/DD/YYYY format. |
responseDueFrom | string | Starts an inclusive response-deadline range. Use with responseDueTo. |
responseDueTo | string | Ends an inclusive response-deadline range. Use with responseDueFrom. |
maxResults | integer | Caps validated opportunity records written to the dataset. Defaults to 100. |
Focused JSON input example
{"query": "cybersecurity","noticeTypes": ["o", "k", "r"],"naicsCode": "541512","setAsideCode": "SBA","state": "VA","agency": "Department of Defense","postedFrom": "2026-07-01","postedTo": "2026-07-19","responseDueFrom": "2026-07-20","responseDueTo": "2026-08-31","maxResults": 100}
Output fields
The default dataset uses a stable schema. noticeId, title, samUrl, sourceUrl, contacts, and attachmentUrls are required on every record.
| Field | Type | Purpose |
|---|---|---|
noticeId | string | SAM.gov unique opportunity identifier. |
title | string | Published federal procurement opportunity title. |
solicitationNumber | string or null | Solicitation identifier when present. |
noticeType | string or null | Current SAM.gov notice type. |
baseNoticeType | string or null | Original notice type before revision. |
postedDate | string or null | Posted date. |
responseDeadline | string or null | Response deadline. |
active | boolean or null | Active status from the source record. |
naicsCode | string or null | NAICS code. |
classificationCode | string or null | PSC or classification code. |
setAsideCode | string or null | Set-aside code. |
setAsideDescription | string or null | Set-aside description. |
agency | string or null | Agency name from the source. |
office | string or null | Office name from the source. |
placeOfPerformance | object or null | City, state, zip, and country when available. |
contacts | array | Public points of contact. |
award | object or null | Award details when the source record includes them. |
descriptionUrl | string or null | Description URL. |
attachmentUrls | array[string] | Attachment URLs returned by the source. |
samUrl | string | Direct public SAM.gov opportunity page. |
sourceUrl | string | public API source URL for the record. |
Illustrative dataset record
{"noticeId": "ff826a59eac743c4a1a07ff5e0cf3e3a","title": "Network modernization services","noticeType": "Solicitation","postedDate": "2026-07-18","responseDeadline": "2026-08-17T17:00:00-04:00","naicsCode": "541512","setAsideCode": "SBA","agency": "DEPARTMENT OF DEFENSE","contacts": [{"name": "Ada Lovelace","title": "Contracting Officer","email": "ada@example.gov","phone": null}],"attachmentUrls": [],"samUrl": "https://sam.gov/opp/ff826a59eac743c4a1a07ff5e0cf3e3a/view","sourceUrl": "https://api.sam.gov/opportunities/v2/search?noticeid=ff826a59eac743c4a1a07ff5e0cf3e3a"}
How it works
This Actor searches published U.S. federal contract opportunities through the public SAM.gov Opportunities API. It uses the public search endpoint behind SAM.gov opportunities, applies your filters, and writes normalized opportunity records to the default dataset.
Implementation facts surfaced in the contract:
- It searches published opportunities only.
- It returns notice types including solicitations, combined synopsis/solicitation, presolicitation, sources sought, special notices, award notices, justifications, sale of surplus property, and intent to bundle.
- It defaults to a posted-date window from 30 days ago through today when dates are omitted.
- It uses
maxResultsas a hard cap for validated opportunity records written to the dataset. - The output also includes
OUTPUTandRUN_SUMMARYrecords in the default key-value store.
SAM.gov Scraper — Federal Contract Opportunities is designed as a focused workflow.
Pricing
SAM.gov Scraper — Federal Contract Opportunities uses Pay per event plus Apify platform usage.
- Actor start: charged once per configured GB of memory when the run starts.
- Opportunity returned: charged for each validated SAM.gov opportunity written to the default dataset.
A run capped at one hundred returned opportunities means one hundred Opportunity returned events, plus one Actor start event, and then Apify platform usage on top of that. To see the live amount that applies to your current configuration, open the Pricing tab in the Apify console.
Use with AI agents (MCP)
This Actor can be used through Apify MCP as a tool for procurement discovery and opportunity triage. The tool returns structured SAM.gov opportunity records from the public API, so an agent can search, read, and route opportunities using stable fields like noticeId, title, agency, responseDeadline, contacts, and samUrl.
Actor identity: khadinakbar/sam-gov-scraper
Find current SAM.gov opportunities for cybersecurity work in Virginia, return only records with public titles and deadlines, and summarize which ones appear earliest by response date. Use the dataset output as the source of truth and keep the SAM.gov link with each record.
Output interpretation:
- Treat each dataset row as one validated opportunity.
- Use
noticeIdfor deduplication. - Use
samUrlfor the human review step. - Use
sourceUrlfor provenance back to the public API record. - Use
contactsfor public points of contact only when they are present in the source.
Scope and pagination:
- The actor searches published opportunities through the public SAM.gov Opportunities API.
- It follows the contract's filtered search fields and returns normalized records.
maxResultssets the total cap for written records, so it also helps bound opportunity-event charges.
Cost guidance:
- Each returned opportunity is a billable event.
- A narrower query, tighter date window, or lower
maxResultscan reduce the number of returned records. - Apify platform usage is separate from event charges.
Apify API example
import { ApifyClient } from "apify-client";const client = new ApifyClient({token: process.env.APIFY_TOKEN,});const run = await client.actor("khadinakbar/sam-gov-scraper").call({query: "cybersecurity",noticeTypes: ["o", "r"],postedFrom: "2026-07-01",postedTo: "2026-07-19",maxResults: 10,});const datasetItems = await client.dataset(run.defaultDatasetId).listItems();console.log(datasetItems.items);
Set APIFY_TOKEN in your environment before running the example. The code starts the Actor, waits for completion, and reads back the default dataset items.
Best results and outcome guidance
For the most useful output, start with one clear search intent and then add filters that match the workflow you are building:
- Use
queryfor capability keywords that appear in the opportunity title. - Use
noticeTypeswhen you want a narrower notice set such as solicitations or sources sought. - Use
naicsCodeandsetAsideCodeto align the search with your market focus. - Use
postedFromandpostedToto keep monitoring windows current. - Use
responseDueFromandresponseDueTowhen deadline priority matters. - Use
maxResultsto match the amount of opportunity review your process can handle.
Continue the workflow
- Then use APEC Jobs Scraper to extend SAM.gov Scraper — Federal Contract Opportunities with a neighboring job-market research source when the brief calls for Apec data.
- Then use ZipRecruiter Jobs Scraper to extend SAM.gov Scraper — Federal Contract Opportunities with a neighboring job-market research source when the brief calls for Ziprecruiter data.
Design note
I found that the dataset contract requires both contacts and attachmentUrls on every record, while many other fields are nullable. That is a useful signal that the output is structured for stable downstream handling even when the source omits optional details.
FAQ
Can I route by notice type?
Yes. noticeTypes accepts published SAM.gov notice-type codes such as solicitation, combined synopsis/solicitation, sources sought, special notice, and award notice.
Can I search by agency and place of performance together?
Yes. The input includes both agency and state, so a workflow can focus on an organization name and a work-location state at the same time.
How should I use the returned links?
Use samUrl for the public opportunity page and sourceUrl for the public API source record. Both are useful for provenance and review.
What should I use for deduplication?
Use noticeId. It is the SAM.gov unique opportunity identifier in the output schema.
Is this Actor useful for AI agents?
Yes. It exposes structured procurement data through Apify, and the result set can be consumed in Apify MCP workflows or through the Apify API.
Responsible use
Use the returned public data for lawful procurement research and workflow automation. Verify the public SAM.gov notice before making business, proposal, contact, or compliance decisions. The Actor searches published opportunities through the public API and returns source-backed records, but the final procurement judgment belongs with the user and their review process.