SAM.gov Scraper — Federal Contracts & Bids
Pricing
$1.00 / 1,000 scraped federal contracts
SAM.gov Scraper — Federal Contracts & Bids
Ultra-fast US federal government contracts scraper without browser overhead. Extract active solicitations, defense bids, RFPs, NAICS codes, set-aside categories, response deadlines, and contracting officer contact emails on 256MB RAM.
Pricing
$1.00 / 1,000 scraped federal contracts
Rating
0.0
(0)
Developer
Hector
Maintained by CommunityActor stats
1
Bookmarked
2
Total users
1
Monthly active users
5 days ago
Last modified
Categories
Features
Share
SAM.gov Scraper — Federal Contracts & Bids
SAM.gov Scraper extracts structured SAM.gov records, metadata, metrics, and direct links in real time. Built on a zero-browser HTTP/2 engine running in 256 MB RAM, it delivers normalized datasets with zero null fields ready for CSV, Excel, JSON, or API pipelines.
Looking for related scrapers? Check out Reddit Scraper, LinkedIn Jobs Scraper, Google Autocomplete & SEO Scraper, Hacker News Scraper, or browse our full catalog of 118+ dedicated scrapers.
What does SAM.gov Scraper do?
Ultra-fast US federal government contracts scraper without browser overhead. Extract active solicitations, defense bids, RFPs, NAICS codes, set-aside categories, response deadlines, and contracting officer contact emails on 256MB RAM.
Whether you need to monitor SAM.gov at scale, enrich B2B/B2C databases, or feed structured records into analytics and AI workflows, SAM.gov Scraper handles pagination, field normalization, and schema validation automatically:
- Bulk Data Extraction: Collect SAM.gov listings, items, and detailed attributes in batches using keywords, filters, or direct URLs.
- Complete Public Metadata: Capture identifiers, pricing/engagement metrics, author/vendor details, timestamps, and canonical URLs.
- Multi-Format Export: Download results in JSON, CSV, Excel (XLSX), XML, or HTML Table directly from the Apify Console.
- Ready for Automation & AI: Connect seamlessly to Apify Integrations (Make, Zapier, n8n, Google Sheets), REST API endpoints, or the Apify MCP Server.
Beyond the Official SAM.gov API
- No API Keys or Approval Delays: Start extracting public SAM.gov data immediately without registering developer apps or waiting for quota approvals.
- No Restrictive Rate Quotas: Bypass strict per-minute API limits and expensive enterprise tiers while capturing the complete public data points displayed on SAM.gov.
- 256 MB Zero-Browser Architecture: Uses native HTTP/2 and TLS session emulation instead of heavy Chromium instances, executing in seconds at a fraction of standard compute costs.
What data can you scrape from SAM.gov?
SAM.gov Scraper extracts the following data points from SAM.gov:
🆔 Opportunity ID (opportunityId) | 📅 Solicitation Number (solicitationNumber) | 📝 Title (title) |
🏷️ Notice Type (noticeType) | 📝 Department (department) | 📝 Agency (agency) |
📝 Office (office) | 📅 Posted Date (postedDate) | 📝 Response Deadline (responseDeadline) |
📝 Is Active (isActive) | 📝 Naics Code (naicsCode) | 🆔 Set Aside Type (setAsideType) |
| Data Category | Extracted Fields & Data Points |
|---|---|
| Identity & Core Identifiers | opportunityId (Opportunity ID), title (Title), noticeType (Notice Type), setAsideType (Set Aside Type), primaryContactName (Primary Contact Name) |
| Details, Attributes & Context | department (Department), agency (Agency), office (Office), responseDeadline (Response Deadline), isActive (Is Active), naicsCode (Naics Code) |
| Direct Links, Media & Timestamps | solicitationNumber (Solicitation Number), postedDate (Posted Date), officeState (Office State), samUrl (Sam URL) |
Why scrape SAM.gov? (Typical Use Cases & Guides)
You can use SAM.gov Scraper for a wide range of data and business workflows:
- Competitive & Market Intelligence: Track real-time listings, rankings, pricing shifts, and activity across SAM.gov without manual copy-pasting.
- B2B Lead Generation & CRM Enrichment: Extract structured SAM.gov records to enrich pipelines in HubSpot, Salesforce, Clay, Pipedrive, or Airtable.
- Trend Detection & Sentiment Monitoring: Analyze volume velocity, user ratings, and community feedback on SAM.gov to spot market opportunities early.
- AI Agents, RAG & LLM Knowledge Pipelines: Feed normalized, zero-null SAM.gov datasets directly into vector databases, autonomous AI agents, and LLM workflows.
- Automated Reporting & Scheduled Monitoring: Connect SAM.gov Scraper to Make.com, n8n, Zapier, or Google Sheets for hands-free daily data refreshes.
- Market Research & Competitor Analysis: Benchmark SAM.gov offerings, pricing strategies, and market share across regions.
- Lead Generation & CRM Enrichment: Build targeted prospect lists and sync verified records straight into HubSpot, Salesforce, or Clay.
- AI Agents & RAG Pipelines via MCP: Connect live SAM.gov data directly to Claude Desktop, Cursor, or LangChain agents.
How to scrape SAM.gov data
SAM.gov Scraper is designed for a zero-configuration start, even if you have never scraped data before:
- Create a free Apify account using your email (includes $5.00 in free monthly credits).
- Open SAM.gov Scraper and click on the Input tab — all required fields are already pre-filled with a working example.
- Enter your search terms, target URLs, or filter criteria (or keep the default pre-filled configuration for an instant 1-Click test).
- Click the green "Start" button and wait a few seconds for the data to be extracted.
- Download your dataset in JSON, CSV, Excel (XLSX), or HTML, or fetch it via the API tab.
For more technical details on every parameter, check out the Input Schema tab or read the Apify Platform Documentation.
🔗 How to scrape SAM.gov by Search Term or Direct URL
| Scraping by Search Term / Filter 🔑 | Enter keywords, categories, or filter parameters just as you would search on SAM.gov. Set the maximum number of items you want to extract and click Start. |
| Scraping by Direct URL 🔗 | Paste one or more direct SAM.gov links (or import a list of URLs from a Google Sheet / CSV) to extract targeted item or profile details in bulk. |
⬇️ Input Configuration & Examples
To start scraping SAM.gov, fill in the visual input form in the Apify Console or pass a JSON payload via the API. Full technical specifications are available on the Input Schema tab.
Input Parameters Reference
| Parameter | Type | Default / Prefill | Description |
|---|---|---|---|
keyword | string | cybersecurity | Keyword or topic to search across government contract opportunities (e.g. 'cybersecurity', 'cloud migration', 'artificial intelligence', 'HVAC maintenance'). |
naicsCode | string | 541512 | Filter by 6-digit North American Industry Classification System code (e.g. 541512 for Computer Systems Design, 541519 for Other Computer Related Services). Leave empty for all industries. |
noticeType | string | ALL | Filter by procurement notice stage. Options: ALL, SOLICITATION, PRESOLICITATION, COMBINED_SYNOPSIS, SOURCES_SOUGHT, AWARD_NOTICE. |
setAside | string | ALL | Filter by socio-economic small business set-aside qualification. Options: ALL, SBA, 8A, SDVOSB, WOSB, HUBZONE. |
activeOnly | boolean | true | When enabled, returns only currently active opportunities with upcoming response deadlines. Disable to include historical and archived records. |
fetchDetails | boolean | true | Fetch detailed opportunity records to extract direct contracting officer emails, phone numbers, NAICS codes, and full office addresses. |
maxItems | integer | 50 | Maximum number of government contract opportunities to extract. |
proxyConfiguration | object | {"useApifyProxy":false} | Proxy settings. The scraper runs fast with standard proxies or datacenter proxies. |
Example 1: Standard Extraction (1-Click Default)
{"keyword": "cybersecurity","naicsCode": "541512","noticeType": "ALL","setAside": "ALL"}
Example 2: Filtered & Batch Extraction
{"keyword": "cybersecurity","naicsCode": "541512","noticeType": "SOLICITATION","setAside": "SBA","activeOnly": true,"fetchDetails": true,"maxItems": 100}
⬆️ Output Example (Table View, JSON & Fields Reference)
The scraped results are stored in a structured Apify Dataset available in the Storage tab. Below is a preview of the dataset in both Table View (CSV/Excel format) and JSON format.
Table View (CSV / Excel Dataset Preview)
| Opportunity ID | Solicitation Number | Title | Notice Type | Department | Agency |
|---|---|---|---|---|---|
ee790d538a8b4e019e2579d3bccee37a | HT942627QE003 | BPA - Cybersecurity & Cloud Infrastruct... | Solicitation | DEPT OF DEFENSE | DEFENSE HEALTH AGENCY (DHA) |
ee790d538a8b4e019e2579d3bccee37a | HT942627QE4 | BPA - Cybersecurity & Cloud Infrastruct... | Solicitation | DEPT OF DEFENSE | DEFENSE HEALTH AGENCY (DHA) |
ee790d538a8b4e019e2579d3bccee37a | HT942627QE5 | BPA - Cybersecurity & Cloud Infrastruct... | Solicitation | DEPT OF DEFENSE | DEFENSE HEALTH AGENCY (DHA) |
JSON Output Example
{"opportunityId": "ee790d538a8b4e019e2579d3bccee37a","solicitationNumber": "HT942627QE003","title": "BPA - Cybersecurity & Cloud Infrastructure Defense Services","noticeType": "Solicitation","department": "DEPT OF DEFENSE","agency": "DEFENSE HEALTH AGENCY (DHA)","office": "DHA CONTRACTING ACTIVITY","postedDate": "2026-11-01","responseDeadline": "2026-11-28T17:00:00.000Z","isActive": true,"naicsCode": "541512","setAsideType": "Total Small Business Set-Aside (FAR 19.5)","primaryContactName": "Sarah M. Jenkins","primaryContactEmail": "sarah.jenkins.civ@health.mil","primaryContactPhone": "+1 (703) 681-4200","officeCity": "Falls Church","officeState": "VA","samUrl": "https://sam.gov/opp/ee790d538a8b4e019e2579d3bccee37a/view"}
Output Fields Reference
| Field Name | Type | Description |
|---|---|---|
opportunityId | string | Unique SAM.gov opportunity ID |
solicitationNumber | string | Official federal solicitation or RFP notice number |
title | string | Title of the federal contract opportunity |
noticeType | string | Type of notice (Solicitation, Sources Sought...) |
department | string | Cabinet-level federal department |
agency | string | Sub-agency within department |
office | string | Contracting office |
postedDate | string | Date opportunity was posted |
responseDeadline | string | Bid closing deadline |
isActive | boolean | Whether opportunity is active |
naicsCode | string | Primary NAICS classification code |
setAsideType | string | Small business set-aside qualification |
primaryContactName | string | Lead contracting officer name |
primaryContactEmail | string | Contracting officer email address |
primaryContactPhone | string | Contracting officer phone |
officeCity | string | Contracting office city |
officeState | string | Contracting office state |
samUrl | string | Link to view opportunity on SAM.gov |
🔗 Scrape any data you need with dedicated scrapers
Combine SAM.gov Scraper with our other dedicated scrapers from @RBBscrap if you want to extract specialized data across platforms:
| 🔹 Reddit Scraper | 🔹 LinkedIn Jobs Scraper | 🔹 Google Autocomplete & SEO Scraper |
| 🔹 Hacker News Scraper | 🔹 Web to Markdown Converter for AI & RAG | 🔹 Glassdoor Scraper |
| Scraper | Extracted Data & Primary Use Case |
|---|---|
| Reddit Scraper | Posts, Comments & Subreddits |
| LinkedIn Jobs Scraper | B2B Leads & Salaries |
| Google Autocomplete & SEO Scraper | Search Ideas |
| Hacker News Scraper | Stories, Comments & News |
| Web to Markdown Converter for AI & RAG | Extract structured Web to Markdown datasets and metrics |
| Glassdoor Scraper | Salaries, Reviews & Jobs |
⚠️ Error Items & Resilience Reference
SAM.gov Scraper is engineered to process multi-query and batch runs resiliently without crashing if a single query or URL fails:
| Status / Code | Meaning & Automatic Handling |
|---|---|
OK | Record successfully extracted, validated, and normalized with zero null fields. |
DEFAULT_PREFILL_APPLIED | When an empty input payload {} is submitted, the Actor automatically applies its built-in default query so 1-Click runs always succeed. |
RATE_LIMIT_RETRY | Transient HTTP 429 / 503 responses trigger automatic retry with exponential backoff and session rotation. |
INVALID_TARGET_SKIPPED | Unreachable or malformed target items in a batch are logged with [WARN] and skipped without interrupting the run. |
❓ Frequently Asked Questions (FAQ)
How much does scraping SAM.gov cost?
SAM.gov Scraper uses transparent Pay-Per-Event (PAY_PER_EVENT) pricing set 5x cheaper than the market leader ($\div 5$):
- Event Rate: $0.001 per Scraped SAM.gov Scraper Record (Scraped SAM.gov Scraper Record.00 per 1,000 items).
- 🎁 1st Run 100% FREE: Your very first execution is 100% free (
$0.00event charges are applied on your initial run). - Apify Free Plan ($5.00/month included): Every Apify account receives $5.00 in free monthly credits, which is enough to extract up to ~5,000 items per month for free.
- View full details on the Pricing tab and the Apify Pricing page.
Can I integrate SAM.gov Scraper with Make, Zapier, n8n, or Google Sheets?
Yes. SAM.gov Scraper can be connected with almost any cloud service or web app thanks to integrations on the Apify platform, including Make, Zapier, n8n, Slack, Airbyte, Google Sheets, Google Drive, and webhooks.
Can I use SAM.gov Scraper with the Apify API (Python & Node.js)?
Yes. The Apify API gives you programmatic access to run SAM.gov Scraper, schedule jobs, and fetch datasets. Use the apify-client PyPI package for Python or the apify-client NPM package for Node.js, or check the Apify API Reference:
Python (apify-client)
from apify_client import ApifyClientclient = ApifyClient("YOUR_APIFY_API_TOKEN")run = client.actor("rbbscrap/sam-gov-scraper").call(run_input={"keyword": "cybersecurity","naicsCode": "541512","noticeType": "ALL","setAside": "ALL"})for item in client.dataset(run["defaultDatasetId"]).iterate_items():print(item)
Node.js (apify-client)
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: 'YOUR_APIFY_API_TOKEN' });const run = await client.actor('rbbscrap/sam-gov-scraper').call({keyword: "cybersecurity",naicsCode: "541512",noticeType: "ALL",setAside: "ALL"});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items);
Can I use SAM.gov Scraper through an MCP Server (Claude Desktop, Cursor, AI Agents)?
Yes. With the Apify API, you can use SAM.gov Scraper in conjunction with an MCP server to connect directly to Claude Desktop, Cursor, Windsurf, or LibreChat. Read the official guide on how to set up Apify Actors with MCP, or go to the MCP tab:
- Start a Server-Sent Events (SSE) session to receive a
sessionId. - Send API messages using that
sessionIdto trigger SAM.gov Scraper with your input parameters. - Receive structured SAM.gov dataset records directly inside your AI agent conversation.
Do I need residential proxies or login cookies to scrape SAM.gov?
No. SAM.gov Scraper operates on a zero-browser HTTP/2 protocol engine (256 MB RAM) and works out-of-the-box without requiring login cookies or external proxies for standard workloads. For high-volume enterprise runs, you can optionally use Apify Proxy in the input configuration.
Is it legal to scrape data from SAM.gov?
Our scrapers are ethical and do not extract any private user data behind login walls. They only extract what is shared publicly on the web. However, please keep in mind that personal data is protected by GDPR (EU Regulation 2016/679) and other regulations worldwide. You should not scrape personal data unless you have a legitimate legal basis. Read more in Apify's guide on the legality of web scraping.
Your feedback & support
We are continuously improving the performance of our Actors. If you have any technical feedback for SAM.gov Scraper, need a custom feature, or found a bug, please create an issue on the Actor's Issues tab in the Apify Console.