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 the official API. Return 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

Search published U.S. federal contract opportunities through SAM.gov's official Opportunities Public API. Use it for capture, proposal, and business-development workflows that need structured solicitations, sources sought, special notices, and award notices instead of a brittle browser scrape.

Each dataset row is one validated opportunity with its title, solicitation number, notice type, agency, NAICS and classification codes, set-aside, dates, place of performance, public contracting contacts, award details when present, attachment URLs, and direct SAM.gov links.

When to use it

Use this actor when a government contractor, capture team, proposal team, or AI agent needs a current shortlist of federal opportunities by keyword, NAICS code, set-aside, agency, location, notice type, posted date, or response deadline. It is especially suitable for scheduled bid monitoring because all results come from SAM.gov's paginated public API.

Do not use it to submit, edit, publish, or access restricted SAM.gov notices. It searches only published opportunities. It also does not download or OCR attachments; attachment URLs are returned where the official API provides them.

No credentials required

The actor uses the public endpoint that powers SAM.gov search: https://sam.gov/api/prod/opportunities/v2/search. It does not need a SAM.gov account, personal API key, cookie, or proxy. The public gateway requires a non-empty compatibility query parameter, which the actor supplies internally without using a secret. The endpoint requires a posted-date range; this actor defaults to the last 30 days through today when dates are omitted.

Quick start

Search recent cybersecurity solicitations and sources sought:

{
"query": "cybersecurity",
"noticeTypes": ["o", "k", "r"],
"naicsCode": "541512",
"postedFrom": "2026-07-01",
"postedTo": "2026-07-19",
"maxResults": 100
}

Search small-business opportunities in Virginia:

{
"setAsideCode": "SBA",
"state": "VA",
"postedFrom": "2026-07-01",
"postedTo": "2026-07-19",
"maxResults": 250
}

Inputs

FieldPurpose
queryMatches the opportunity title through the official API.
noticeTypesOptional SAM.gov codes: o solicitation, k combined synopsis, p presolicitation, r sources sought, s special notice, a award, u justification, g surplus sale, or i intent to bundle.
naicsCodeOne 2–6 digit NAICS code, such as 541512.
setAsideCodeOne official code, such as SBA, 8A, HZC, SDVOSBC, or WOSB.
stateTwo-letter place-of-performance state or territory code.
agencyOfficial organization-name filter, such as Department of Defense.
postedFrom, postedToInclusive posted-date range in YYYY-MM-DD or MM/DD/YYYY. SAM.gov permits at most one year.
responseDueFrom, responseDueToOptional inclusive deadline range; both must be supplied together.
maxResultsHard cap of 1–10,000 dataset records and billable opportunity events. Defaults to 100.

Dataset fields

The default dataset has a stable, agent-friendly shape. noticeId, title, samUrl, sourceUrl, contacts, and attachmentUrls are always present. Fields that the official source omits are explicitly null, not silently removed.

samUrl is the public opportunity landing page. sourceUrl is the official API record URL when supplied. contacts contains public points of contact. award is populated only on award notices that include award data. attachmentUrls is a URL list, never a downloaded file.

FieldExampleDownstream use
noticeIdff826a59eac743c4a1a07ff5e0cf3e3aStable deduplication key for a monitoring workflow.
title, noticeType, activeNetwork modernization, Solicitation, trueBid/no-bid triage.
agency, naicsCode, setAsideCodeDepartment of Defense, 541512, SBAFit scoring and routing to a capture owner.
postedDate, responseDeadline2026-07-18, 2026-08-17T17:00:00-04:00Proposal-calendar prioritization.
contacts[{"name":"Ada Lovelace","email":"ada@example.gov"}]Public contracting contact handoff.
samUrl, attachmentUrlsOfficial SAM.gov URLsHuman review and proposal-document collection.

Example persisted 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"
}

Workflow: from search to bid queue

  1. Schedule a daily query for one NAICS, agency, or set-aside and use a narrow posted-date range.
  2. Deduplicate records by noticeId; retain a record when its deadline, notice type, or title makes it a potential fit.
  3. Rank candidates by your capabilities and response deadline, then open samUrl to review the official notice and any supplied attachments.
  4. Assign a capture owner from the public contacts data. A row is a discovery signal, not a bid recommendation.

For a reliable pagination workflow, use maxResults as the run's total cap. The actor requests the official API in pages of up to 100 records and stops when it has reached the cap or the source has no more results.

Run outcomes

Every terminal path writes OUTPUT and RUN_SUMMARY in the default key-value store:

  • COMPLETE: all fetched pages were processed successfully.
  • PARTIAL: useful opportunities were returned, but a page failed, a source record was malformed, or the event-charge limit was reached.
  • VALID_EMPTY: the official API completed normally but had no matching opportunities.
  • INVALID_INPUT: a filter or date range needs correction; the run succeeds so automation can inspect the diagnostic.
  • UPSTREAM_FAILED: the official API returned no usable data for a valid request; the run fails honestly.

Pricing

This actor uses Pay per Event plus Apify platform usage.

  • Actor start: $0.00005 per configured GB.
  • Opportunity returned: $0.0035 for each validated dataset record.

The actor caps opportunity charges at maxResults, reports the maximum event cost at startup, and returns only records that have passed basic shape validation. Platform compute and storage usage are additional and charged by Apify separately.

For example, a run capped at 100 returned opportunities has a maximum event charge of $0.35005 (100 × $0.0035 plus one 512 MB start event charged as one GB). If SAM.gov returns 12 opportunities, the event charge is $0.04205, plus Apify platform usage.

API and AI-agent use

After you deploy this private actor, call sam-gov-scraper through the Apify API with an input such as:

curl -X POST 'https://api.apify.com/v2/acts/khadinakbar~sam-gov-scraper/runs?token=YOUR_APIFY_TOKEN' \
-H 'content-type: application/json' \
-d '{"query":"cybersecurity","noticeTypes":["o","r"],"postedFrom":"2026-07-01","postedTo":"2026-07-19","maxResults":25}'

For an AI agent, use this actor to identify federal opportunities matching a clearly stated capability or NAICS code. Do not use it for entity registration, award-spending history, restricted notices, or document extraction. The agent should treat VALID_EMPTY as a completed search, surface INVALID_INPUT or CONFIG_ERROR to its operator, and continue with returned records for PARTIAL.

Scheduling guidance

For a daily monitoring feed, use a narrow posted range such as yesterday through today, a stable filter set, and maxResults sized to your workflow. To capture revisions as well as new notices, schedule one search per relevant NAICS or agency rather than relying on an unbounded broad query.

Source and limitations

The actor queries SAM.gov's documented Opportunities Public API. API availability, returned fields, and rate limits are controlled by SAM.gov. The public API returns the latest active version of an opportunity; it is not an archive of every historical revision. The actor intentionally makes no claim that a published notice is a viable bid, complete solicitation package, or contract award guarantee.

As of July 19, 2026, the implementation targets SAM.gov's live public search endpoint at https://sam.gov/api/prod/opportunities/v2/search. Re-check the official API documentation and search behavior before changing filters or source fields.

Troubleshooting and responsible use

If INVALID_INPUT reports a date-range issue, use dates no more than one year apart and provide both response-deadline bounds. If the actor returns VALID_EMPTY, broaden the date range, remove a filter, or choose a different notice type rather than retrying the identical request. If it returns UPSTREAM_FAILED, retry later after checking the public SAM.gov search page; the endpoint may be unavailable or have changed.

Use returned public data only for lawful procurement research and follow the governing solicitation and SAM.gov requirements. Verify all material details on the official notice before making a business, proposal, contact, or compliance decision.