SAM.gov Government Contracts Scraper avatar

SAM.gov Government Contracts Scraper

Pricing

Pay per event

Go to Apify Store
SAM.gov Government Contracts Scraper

SAM.gov Government Contracts Scraper

Find active SAM.gov contract opportunities with agencies, NAICS/PSC codes, contacts, deadlines, descriptions, and official notice links.

Pricing

Pay per event

Rating

0.0

(0)

Developer

Stas Persiianenko

Stas Persiianenko

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Categories

Share

Find and export public U.S. federal contract opportunities from SAM.gov. This actor searches SAM.gov opportunity notices, follows pagination, and saves clean structured records with agency, office, NAICS, PSC, dates, contacts, descriptions, and direct SAM.gov links.

Use it when you need a repeatable feed of federal procurement opportunities for sales research, bid monitoring, capture management, compliance checks, market intelligence, or internal lead routing.

What does SAM.gov Government Contracts Scraper do?

The actor collects public opportunity search results from SAM.gov and turns them into a normalized Apify dataset.

It can:

  • 🔎 Search by keyword or phrase.
  • 🏛️ Filter to active opportunities.
  • 📄 Filter by SAM.gov notice type codes.
  • 🧭 Filter by NAICS or PSC code.
  • ⏱️ Sort by recently modified or recently published notices.
  • 📬 Extract contact names, emails, and phone numbers when SAM.gov provides them.
  • 🧾 Save cleaned plain-text descriptions for spreadsheet and CRM workflows.
  • 🔗 Include direct SAM.gov detail URLs for verification.

Who is it for?

Government contractors

Track active solicitations, combined synopsis notices, presolicitations, and award notices for target keywords and classification codes.

Business development teams

Build daily or weekly opportunity lists for account executives, capture managers, proposal teams, and partner managers.

Market researchers

Analyze which agencies, offices, and NAICS categories are publishing contract opportunities in your market.

Procurement analysts

Monitor federal buying activity, response deadlines, and agency demand without manually refreshing SAM.gov searches.

Data teams

Use the Apify API, integrations, and webhooks to load government opportunity data into warehouses, CRMs, dashboards, or alerting systems.

Why use this actor?

  • ✅ HTTP-only implementation keeps runs lightweight and affordable.
  • ✅ No SAM.gov account or user API key is required for the public search endpoint.
  • ✅ Dataset fields are designed for spreadsheet, CRM, and BI exports.
  • ✅ Pagination is handled automatically until your maxItems limit is reached.
  • ✅ Contact fields are split into clean arrays.
  • ✅ Plain-text description is included by default.
  • ✅ Raw HTML description can be enabled only when needed.

Typical use cases

  • Daily feed of new active opportunities for cybersecurity.
  • Weekly search for NAICS 541511 software development opportunities.
  • PSC-specific monitoring for vehicles, facilities, logistics, IT, or professional services.
  • Capture team routing by agency or office.
  • Market sizing by agency, NAICS code, notice type, and deadline.
  • Contract opportunity enrichment before human review.

How much does it cost to scrape SAM.gov government contracts?

The actor uses pay-per-event pricing with a small run-start event and a per-opportunity event. You only pay for opportunities saved to the dataset, plus the standard Apify platform usage included in the actor run.

A small monitoring run can request 25 opportunities. Larger research runs can request hundreds or thousands of opportunities depending on the search result volume available from SAM.gov.

Final tiered pricing is calculated from cloud validation runs before store publication so the actor remains sustainable while staying predictable for users.

Input configuration

FieldTypeDefaultDescription
querystringtruck prefillKeyword or phrase to search. Leave empty for newest active notices.
maxItemsinteger50Maximum number of opportunities to save.
activeOnlybooleantrueReturn only active opportunities.
noticeTypesarrayo, k prefillSAM.gov notice type codes.
naicsCodestringemptyOptional NAICS code filter.
pscCodestringemptyOptional Product Service Code filter.
sortstring-modifiedDateSAM.gov sort expression.
includeHtmlDescriptionbooleanfalseInclude raw HTML notice description.

Example input

{
"query": "truck",
"maxItems": 25,
"activeOnly": true,
"noticeTypes": ["o", "k"],
"sort": "-modifiedDate",
"includeHtmlDescription": false
}

Output data

Each dataset item is one SAM.gov opportunity notice.

FieldDescription
idSAM.gov opportunity identifier.
titleOpportunity title.
solicitationNumberSolicitation or notice number.
noticeTypeHuman-readable notice type.
noticeTypeCodeSAM.gov notice type code.
activeWhether the notice is active.
canceledWhether the notice is canceled.
publishDatePublication date.
modifiedDateLast modified date.
responseDateResponse deadline when available.
archiveDateArchive date when available.
departmentDepartment name.
agencyAgency name.
officeOffice name.
naicsCodesNAICS code array.
naicsTitlesNAICS title array.
pscCodesPSC code array.
pscTitlesPSC title array.
placeOfPerformanceFlattened place of performance.
contactNamesContact names.
contactEmailsContact emails.
contactPhonesContact phone and fax values.
descriptionTextCleaned plain-text description.
descriptionHtmlOptional original HTML description.
samUrlDirect SAM.gov detail URL.
sourceSource endpoint.

Example output

{
"id": "69c370d6849a4783bcacbd43075693e9",
"title": "Request for Quote - Supply Pickup Truck Vehicles",
"solicitationNumber": "19LA9026Q0010",
"noticeType": "Combined Synopsis/Solicitation",
"noticeTypeCode": "k",
"active": true,
"canceled": false,
"publishDate": "2026-06-17T04:59:02+00:00",
"responseDate": "2026-07-18T03:59:00+00:00",
"department": "STATE, DEPARTMENT OF",
"agency": "STATE, DEPARTMENT OF",
"office": "U.S. EMBASSY VIENTIANE",
"naicsCodes": ["336110"],
"pscCodes": ["2310"],
"placeOfPerformance": "Vientiane, LAO",
"contactEmails": ["VientianeProcurement@state.gov"],
"samUrl": "https://sam.gov/opp/69c370d6849a4783bcacbd43075693e9/view"
}

How to run it

  1. Open the actor on Apify.
  2. Enter a keyword, NAICS code, PSC code, or leave the query empty.
  3. Set maxItems to the number of opportunities you want.
  4. Keep activeOnly enabled for live pipeline monitoring.
  5. Run the actor.
  6. Export results as JSON, CSV, Excel, XML, RSS, or HTML.

Search tips

  • Use broad keywords first, then narrow with NAICS or PSC codes.
  • Use activeOnly: true for bid monitoring.
  • Use activeOnly: false only when you need historical or archived notices available in search.
  • Use notice type o for solicitations.
  • Use notice type k for combined synopsis/solicitation notices.
  • Use notice type p for presolicitations.
  • Use notice type a when researching awards.
  • Keep maxItems small for first tests, then scale once filters look right.

Notice type examples

SAM.gov uses short notice type codes. Common examples include:

  • o — Solicitation.
  • k — Combined Synopsis/Solicitation.
  • p — Presolicitation.
  • a — Award Notice.
  • r — Sources Sought.
  • s — Special Notice.

The exact codes shown by SAM.gov may evolve. If a code stops returning expected records, run a broad keyword search and inspect the noticeTypeCode output values.

Integrations

You can connect the actor to:

  • 📊 Google Sheets for daily opportunity lists.
  • 🧰 Airtable for capture pipeline intake.
  • 🧾 HubSpot, Salesforce, or Pipedrive via Apify webhooks and Make/Zapier.
  • 🏢 Data warehouses such as BigQuery, Snowflake, or Postgres.
  • 🔔 Slack or email alerts for new matching notices.
  • 🧪 Internal scoring pipelines that rank opportunities by agency, deadline, or classification code.

API usage

Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/samgov-government-contracts-scraper').call({
query: 'cybersecurity',
maxItems: 50,
activeOnly: true,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.slice(0, 3));

Python

from apify_client import ApifyClient
import os
client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('automation-lab/samgov-government-contracts-scraper').call(run_input={
'query': 'construction',
'maxItems': 50,
'activeOnly': True,
})
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items[:3])

cURL

curl -X POST 'https://api.apify.com/v2/acts/automation-lab~samgov-government-contracts-scraper/runs?token=YOUR_APIFY_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"query":"truck","maxItems":25,"activeOnly":true}'

MCP usage

Use the Apify MCP server to call this actor from AI tools.

MCP URL:

https://mcp.apify.com/?tools=automation-lab/samgov-government-contracts-scraper

Claude Code setup:

$claude mcp add apify-samgov "https://mcp.apify.com/?tools=automation-lab/samgov-government-contracts-scraper"

Claude Desktop JSON config:

{
"mcpServers": {
"apify-samgov": {
"url": "https://mcp.apify.com/?tools=automation-lab/samgov-government-contracts-scraper"
}
}
}

Example prompts:

  • "Find 20 active SAM.gov opportunities for cybersecurity and summarize the agencies."
  • "Search SAM.gov for NAICS 541511 and list response deadlines."
  • "Collect active vehicle procurement notices and highlight contact emails."

Data quality notes

SAM.gov records vary by agency and notice type. Some notices have complete contact information and long descriptions, while others have minimal metadata. This actor preserves available values and uses empty arrays or nulls when SAM.gov does not provide a field.

Limitations

  • The actor currently collects search result data returned by the public SAM.gov endpoint.
  • It does not download attachments.
  • It does not log in to SAM.gov.
  • It does not submit bids or interact with procurement workflows.
  • SAM.gov can change filters and response fields without notice.

FAQ

Is this an official SAM.gov product?

No. This is an independent Apify actor that extracts publicly available SAM.gov opportunity search data. Always verify procurement decisions on the official SAM.gov notice.

Does it require a SAM.gov account?

No. The actor uses public SAM.gov opportunity search data and does not ask for SAM.gov credentials.

Troubleshooting

Why did I get fewer results than maxItems?

SAM.gov may have fewer matching records for your keyword and filters. Try a broader query, remove NAICS/PSC filters, or disable specific notice type filters.

Why are some contact fields empty?

Not every notice includes public contacts in the search response. The actor exports contacts when SAM.gov includes them.

Why is the description shorter than the notice page?

The default descriptionText field is cleaned from the search response description. Enable includeHtmlDescription if you want the raw HTML body returned by the endpoint.

Legality and responsible use

This actor collects publicly available SAM.gov opportunity search data. Use the data responsibly, respect SAM.gov terms and applicable laws, and verify important procurement details on the official SAM.gov notice before making business decisions.

Other Automation Lab actors that can complement government contract research:

Changelog

0.1

  • Initial SAM.gov opportunity search scraper.
  • Extracts notices, dates, agency hierarchy, NAICS/PSC data, contacts, descriptions, and SAM.gov links.

Support

If a run fails or returns unexpected data, include your input JSON and run ID when asking for help. This makes it much easier to reproduce the search and compare it with SAM.gov.