SAM.gov Scraper — Federal Contract Opportunities avatar

SAM.gov Scraper — Federal Contract Opportunities

Pricing

from $3.50 / 1,000 opportunity returneds

Go to Apify Store
SAM.gov Scraper — Federal Contract Opportunities

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

Khadin Akbar

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

2 days ago

Last modified

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

FieldTypePurpose
querystringSearches words in the opportunity title. Required.
noticeTypesarray[string]Limits results to published SAM.gov notice-type codes such as o, k, r, or a.
naicsCodestringFilters by one 2-to-6-digit NAICS industry code.
setAsideCodestringFilters by one SAM.gov set-aside code such as SBA, 8A, HZC, or SDVOSBC.
statestringFilters by a two-letter place-of-performance state or territory code.
agencystringFilters by SAM.gov organization name, such as Department of Defense.
postedFromstringSets the first posted date in YYYY-MM-DD or MM/DD/YYYY format.
postedTostringSets the last posted date in YYYY-MM-DD or MM/DD/YYYY format.
responseDueFromstringStarts an inclusive response-deadline range. Use with responseDueTo.
responseDueTostringEnds an inclusive response-deadline range. Use with responseDueFrom.
maxResultsintegerCaps 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.

FieldTypePurpose
noticeIdstringSAM.gov unique opportunity identifier.
titlestringPublished federal procurement opportunity title.
solicitationNumberstring or nullSolicitation identifier when present.
noticeTypestring or nullCurrent SAM.gov notice type.
baseNoticeTypestring or nullOriginal notice type before revision.
postedDatestring or nullPosted date.
responseDeadlinestring or nullResponse deadline.
activeboolean or nullActive status from the source record.
naicsCodestring or nullNAICS code.
classificationCodestring or nullPSC or classification code.
setAsideCodestring or nullSet-aside code.
setAsideDescriptionstring or nullSet-aside description.
agencystring or nullAgency name from the source.
officestring or nullOffice name from the source.
placeOfPerformanceobject or nullCity, state, zip, and country when available.
contactsarrayPublic points of contact.
awardobject or nullAward details when the source record includes them.
descriptionUrlstring or nullDescription URL.
attachmentUrlsarray[string]Attachment URLs returned by the source.
samUrlstringDirect public SAM.gov opportunity page.
sourceUrlstringpublic 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 maxResults as a hard cap for validated opportunity records written to the dataset.
  • The output also includes OUTPUT and RUN_SUMMARY records 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 noticeId for deduplication.
  • Use samUrl for the human review step.
  • Use sourceUrl for provenance back to the public API record.
  • Use contacts for 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.
  • maxResults sets 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 maxResults can 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 query for capability keywords that appear in the opportunity title.
  • Use noticeTypes when you want a narrower notice set such as solicitations or sources sought.
  • Use naicsCode and setAsideCode to align the search with your market focus.
  • Use postedFrom and postedTo to keep monitoring windows current.
  • Use responseDueFrom and responseDueTo when deadline priority matters.
  • Use maxResults to 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.

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.