SAM.gov Contract Opportunities Scraper
Pricing
Pay per usage
SAM.gov Contract Opportunities Scraper
Search US government contract opportunities from SAM.gov. Filter by keyword, NAICS code, set-aside type, agency, location, and date range. Get solicitations, awards, and contact info.
Pricing
Pay per usage
Rating
0.0
(0)
Developer
lulz bot
Actor stats
0
Bookmarked
1
Total users
0
Monthly active users
a day ago
Last modified
Categories
Share
SAM.gov Government Contract Opportunities Scraper
Search and extract federal government contract opportunities from SAM.gov (System for Award Management). Find solicitations, presolicitations, award notices, and more with powerful filtering by agency, NAICS code, set-aside type, location, and deadline.
Features
- Keyword search -- Find contract opportunities by keyword across all federal agencies
- NAICS code filtering -- Target specific industries (e.g.,
541512for Computer Systems Design) - Set-aside filtering -- Filter by small business, 8(a), HUBZone, SDVOSB, WOSB, and more
- Agency filtering -- Search opportunities from specific departments (DoD, NASA, HHS, etc.)
- Location filtering -- Filter by state and ZIP code for place of performance
- Opportunity details -- Fetch full descriptions and contact info for specific notices
- Award data -- Includes award amounts, awardee info, and contract numbers when available
- Automatic pagination -- Handles multi-page result sets with rate limiting
Input Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
mode | string | "search" | search to find opportunities, details for a specific notice |
apiKey | string | required | SAM.gov public API key (free at api.sam.gov) |
searchQuery | string | "" | Keyword search (e.g., "cybersecurity", "construction") |
opportunityId | string | "" | Notice ID for details mode |
solicitationNumber | string | "" | Solicitation number for details mode |
naicsCode | string | "" | NAICS code filter (up to 6 digits) |
setAsideType | string | "" | Set-aside type: SBA, 8A, HZC, SDVOSBC, WOSB, etc. |
opportunityType | string | "" | Type: solicitation, presolicitation, sources sought, award, etc. |
agency | string | "" | Agency or department name (partial match) |
postedFrom | string | "" | Posted after date (MM/DD/YYYY) |
postedTo | string | "" | Posted before date (MM/DD/YYYY) |
deadlineFrom | string | "" | Response deadline start (MM/DD/YYYY) |
deadlineTo | string | "" | Response deadline end (MM/DD/YYYY) |
state | string | "" | Place of performance state (2-letter code) |
zip | string | "" | Place of performance ZIP code |
limit | integer | 100 | Max results (0 for all available) |
Example Inputs
Search for IT security contracts:
{"mode": "search","apiKey": "YOUR_SAM_GOV_API_KEY","searchQuery": "cybersecurity","naicsCode": "541512","setAsideType": "SBA","limit": 50}
Find DoD opportunities in Virginia:
{"mode": "search","apiKey": "YOUR_SAM_GOV_API_KEY","agency": "Department of Defense","state": "VA","opportunityType": "o","limit": 100}
Get details for a specific opportunity:
{"mode": "details","apiKey": "YOUR_SAM_GOV_API_KEY","opportunityId": "abc123def456"}
Output Fields
| Field | Type | Description |
|---|---|---|
noticeId | string | Unique notice identifier |
title | string | Opportunity title |
solicitationNumber | string | Solicitation number |
type | string | Human-readable opportunity type |
typeCode | string | Single-letter type code |
agency | string | Full agency path |
agencyCode | string | Agency hierarchy code |
naicsCode | string | NAICS industry code |
classificationCode | string | Product/service classification code |
setAsideType | string | Set-aside description |
active | boolean | Whether the opportunity is currently active |
postedDate | string | Date posted |
responseDeadline | string | Response submission deadline |
placeOfPerformance | object | City, state, country, ZIP of performance |
pointOfContact | array | Contact names, emails, phones |
award | object | Award date, number, amount, and awardee info |
awardAmount | number | Contract award dollar amount |
description | string | Full description (in details mode) |
url | string | SAM.gov opportunity URL |
officeAddress | object | Contracting office location |
Use Cases
- Government contracting -- Find and bid on federal contract opportunities
- Small business outreach -- Discover set-aside opportunities for SBA, 8(a), HUBZone, SDVOSB
- Market research -- Analyze government spending patterns by agency, NAICS, or region
- Competitive intelligence -- Track awards to competitors and analyze win rates
- Subcontracting -- Find prime contractors winning large awards for teaming opportunities
Data Source
Data is sourced from the official SAM.gov Opportunities API. A free API key is required (register at api.sam.gov).
Run on Apify
This scraper runs on the Apify platform -- a full-stack web scraping and automation cloud. Sign up for a free account to get started with 30-day trial of all features.