SAM.gov Contracts Scraper avatar

SAM.gov Contracts Scraper

Pricing

Pay per usage

Go to Apify Store
SAM.gov Contracts Scraper

SAM.gov Contracts Scraper

Scrape government contract opportunities, entity registrations, and award data from SAM.gov. Search by keyword, NAICS code, set-aside type, agency, date range, and more. Uses the official SAM.gov public API.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

abdulrahman alrashid

abdulrahman alrashid

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

3 days ago

Last modified

Categories

Share

SAM.gov Government Contract Scraper

Scrape government contract opportunities, entity/vendor registrations, and award data from SAM.gov — the U.S. federal government's official system for award management.

Government contracting is a $700B+ annual market. This actor helps small businesses, government contractors, BD professionals, and researchers find relevant federal contract opportunities programmatically.

What data can you scrape?

Contract Opportunities

  • Title, solicitation number, notice type
  • Agency, sub-agency, office
  • Posted date, response deadline, archive date
  • Set-aside type (small business, 8(a), HUBZone, SDVOSB, WOSB, etc.)
  • NAICS codes, product/service classification codes
  • Full description text
  • Point of contact (name, email, phone)
  • Place of performance (city, state, ZIP)
  • Attached documents list
  • Direct URL to SAM.gov listing

Entity/Vendor Registrations

  • Legal business name, DBA name
  • UEI (Unique Entity Identifier), CAGE code
  • Registration status, dates
  • Physical and mailing addresses
  • NAICS codes with descriptions
  • Business types and SBA certifications
  • Points of contact
  • Congressional district
  • Parent entity information

Award Data

  • Contract/award number
  • Award amount
  • Awardee name, UEI, CAGE code
  • Period of performance
  • Associated solicitation data

How it works

This actor uses a dual approach:

  1. SAM.gov Public API (primary) — Uses the official api.sam.gov endpoints for structured, reliable data access
  2. Web scraping fallback — Falls back to scraping SAM.gov's internal web APIs when no API key is provided

API Key

A SAM.gov API key is free and gives you the best results. Entity searches require an API key.

To get your free API key:

  1. Create an account at SAM.gov
  2. Go to Profile → System Account Management
  3. Request a public API key (select "Read Public" permission)
  4. Enter the key in the actor's input configuration

Without an API key, the actor will attempt web scraping for opportunity searches, but results may be limited.

Input examples

Search for cybersecurity contracts (small business set-aside)

{
"scrapeMode": "opportunities",
"apiKey": "YOUR_SAM_GOV_API_KEY",
"keyword": "cybersecurity",
"setAsideType": "SBA",
"maxResults": 50
}

Search by NAICS code with date range

{
"scrapeMode": "opportunities",
"apiKey": "YOUR_SAM_GOV_API_KEY",
"naicsCode": "541512",
"postedFrom": "01/01/2024",
"postedTo": "12/31/2024",
"maxResults": 200
}

Find 8(a) set-aside opportunities from the Department of Defense

{
"scrapeMode": "opportunities",
"apiKey": "YOUR_SAM_GOV_API_KEY",
"setAsideType": "8A",
"agency": "100006688",
"maxResults": 100
}

Search for registered IT vendors in Virginia

{
"scrapeMode": "entities",
"apiKey": "YOUR_SAM_GOV_API_KEY",
"keyword": "information technology",
"naicsCode": "541512",
"placeOfPerformanceState": "VA",
"maxResults": 50
}

Search for recent contract awards

{
"scrapeMode": "awards",
"apiKey": "YOUR_SAM_GOV_API_KEY",
"keyword": "cloud computing",
"postedFrom": "01/01/2024",
"maxResults": 100
}

Output format

Each result is a clean JSON object. Here's an example opportunity:

{
"dataType": "opportunity",
"opportunityId": "abc123def456",
"title": "Enterprise Cybersecurity Support Services",
"solicitationNumber": "W911NF-24-R-0042",
"noticeType": "Solicitation",
"noticeTypeCode": "o",
"agency": "Department of Defense",
"agencyCode": "DOD",
"subAgency": "Department of the Army",
"subAgencyCode": "ARMY",
"office": "Army Contracting Command",
"officeCode": "ACC",
"postedDate": "2024-03-15",
"responseDeadline": "2024-04-30T14:00:00-04:00",
"archiveDate": "2024-05-30",
"setAsideType": "Total Small Business Set-Aside",
"setAsideCode": "SBA",
"naicsCodes": ["541512"],
"classificationCode": "D306",
"description": "The Army seeks qualified small businesses to provide...",
"placeOfPerformance": {
"city": "Arlington",
"state": "Virginia",
"stateCode": "VA",
"country": "United States",
"countryCode": "US",
"zip": "22201"
},
"pointsOfContact": [
{
"type": "primary",
"fullName": "John Smith",
"email": "john.smith@army.mil",
"phone": "703-555-0100"
}
],
"award": null,
"attachments": [],
"active": true,
"url": "https://sam.gov/opp/abc123def456",
"scrapedAt": "2024-03-20T10:30:00.000Z"
}

Set-aside type codes

CodeDescription
SBATotal Small Business Set-Aside
8A8(a) Set-Aside
8AN8(a) Sole Source
HZCHUBZone Set-Aside
HZSHUBZone Sole Source
SDVOSBCService-Disabled Veteran-Owned SB Set-Aside
SDVOSBSService-Disabled Veteran-Owned SB Sole Source
WOSBWomen-Owned Small Business
EDWOSBEconomically Disadvantaged WOSB
VSAVeteran-Owned Small Business Set-Aside
VSBVeteran-Owned Small Business Sole Source

Common NAICS codes for government contracting

CodeIndustry
541512Computer Systems Design Services
541511Custom Computer Programming
541330Engineering Services
541611Administrative Management Consulting
541519Other Computer Related Services
236220Commercial Building Construction
561210Facilities Support Services
561612Security Guards and Patrol Services
541690Other Scientific and Technical Consulting
238210Electrical Contractors

Rate limits and pricing

SAM.gov API rate limits (daily):

  • Non-federal, no role: 10 requests/day
  • Non-federal with role: 1,000 requests/day
  • Federal system account: 10,000 requests/day

Actor pricing: Pay-Per-Event — $1.50 per 1,000 results ($0.0015 per result)

All data scraped by this actor is 100% public government data published on SAM.gov by the U.S. General Services Administration (GSA). SAM.gov provides a public API specifically for programmatic access to this data. There are no legal restrictions on accessing or redistributing this public government information.

Support