AIDEVELOPER TOOLS

SAM.gov Government Contract Monitor

## What does SAM.gov Government Contract Monitor do?

Try on Apify Store
$0.002per event
1
Users (30d)
36
Runs (30d)
90
Actively maintained
Maintenance Pulse
$0.002
Per event

Maintenance Pulse

90/100
Last Build
Today
Last Version
1d ago
Builds (30d)
8
Issue Response
N/A

Cost Estimate

How many results do you need?

contract-fetcheds
Estimated cost:$0.20

Pricing

Pay Per Event model. You only pay for what you use.

EventDescriptionPrice
contract-fetchedCharged per government contract opportunity retrieved from SAM.gov.$0.002

Example: 100 events = $0.20 · 1,000 events = $2.00

Documentation

What does SAM.gov Government Contract Monitor do?

SAM.gov Government Contract Monitor is an Apify actor that searches and retrieves federal government contract opportunities directly from the official SAM.gov (System for Award Management) API. The U.S. federal government posts all contract opportunities worth over $25,000 on SAM.gov, making it the single most important data source for businesses pursuing government contracts.

This actor automates the process of searching, filtering, and extracting contract opportunity data that would otherwise require tedious manual browsing on the SAM.gov website. It returns structured, machine-readable data for each opportunity including the solicitation details, contracting agency hierarchy, NAICS industry codes, set-aside designations for small businesses, response deadlines, contracting officer contact information, place of performance, and direct links back to SAM.gov.

Whether you are a government contractor scanning for new RFPs, a business development team tracking opportunities by industry code, or a data analyst building a pipeline of federal procurement intelligence, this actor delivers clean, normalized results ready for immediate use.

Why use SAM.gov Government Contract Monitor on Apify?

Searching SAM.gov manually is slow and repetitive. The website's built-in search has limited filtering, no scheduling capability, and no way to export structured data at scale. The raw SAM.gov API, while powerful, requires developer effort to authenticate, paginate, parse nested JSON responses, and handle error cases.

This actor handles all of that complexity for you. Running on Apify's cloud infrastructure, it provides:

  • Scheduled monitoring -- Set up recurring runs to check for new opportunities daily or weekly, so you never miss a deadline.
  • Clean, flat output -- The raw SAM.gov API returns deeply nested JSON. This actor normalizes it into a flat, consistent structure with the fields that matter most.
  • Pagination handled automatically -- The SAM.gov API caps results at 1,000 per request. This actor pages through all results transparently.
  • Deduplication -- When searching multiple NAICS codes, the actor deduplicates opportunities that appear under more than one code.
  • Dry-run mode -- Test your entire workflow with realistic sample data before committing your API key.
  • Integrations -- Push results to Google Sheets, Slack, email, webhooks, or any downstream system using Apify's built-in integrations.

Key features

  • Search by keywords -- Find opportunities by title keywords such as "cybersecurity," "construction," or "IT support."
  • NAICS code filtering -- Target specific industries using one or more NAICS codes (e.g., 541512 for Computer Systems Design Services).
  • Small business set-aside filters -- Filter by SBA, 8(a), 8(a) Sole Source, HUBZone, SDVOSB, WOSB, EDWOSB, and veteran-owned set-asides.
  • Procurement type selection -- Focus on solicitations, combined synopsis/solicitations, sources sought, presolicitations, award notices, or special notices.
  • State-level filtering -- Narrow results to opportunities with a specific place of performance state.
  • Date range control -- Search opportunities posted within the last 1 to 365 days.
  • Contact extraction -- Each result includes the primary contracting officer's name, email, and phone number.
  • Dry-run mode -- Returns realistic sample data without requiring an API key, perfect for testing integrations.
  • Up to 1,000 results per run -- Configurable result limits with automatic pagination.

Use cases

Government contractor business development -- An IT services firm searches for cybersecurity solicitations with NAICS 541512, filtering by HUBZone set-aside. They schedule daily runs and send results to a Slack channel where their capture team reviews new opportunities each morning.

Small business set-aside tracking -- A woman-owned small business (WOSB) filters for WOSB and EDWOSB set-aside opportunities across multiple NAICS codes. The actor deduplicates results automatically, and they export to Google Sheets where the BD team assigns pursuit owners.

Federal market research -- A market analyst sets postedDaysAgo to 180 and searches without filters to understand procurement volume trends across agencies. They combine results with USAspending data to see which agencies spend the most in their industry.

Regional opportunity monitoring -- A construction firm in Virginia filters by state: "VA" and procurement types for solicitations and combined synopsis/solicitations. They get daily email alerts via Apify integrations when new Virginia-based opportunities match.

Competitive intelligence -- A defense contractor monitors award notices (procurementType: "a") to track which competitors win contracts in their space. They cross-reference awardee names with EDGAR filing data to understand competitive positioning.

How to use SAM.gov Government Contract Monitor

  1. Get a free SAM.gov API key -- Visit sam.gov, create an account (or log in), navigate to Account Details, and generate a free API key. This key provides access to the public opportunities API at no cost.

  2. Configure your search -- Enter your API key, then set your filters. At minimum, provide keywords or NAICS codes to focus your search. You can combine multiple filters for precise targeting.

  3. Run the actor -- Click "Start" to execute your search. The actor will query the SAM.gov API, paginate through all matching results, and push clean data to the output dataset.

  4. Schedule recurring runs -- Use Apify's scheduler to run the actor daily or weekly. Combine with integrations to receive alerts when new opportunities matching your criteria are posted.

  5. Try dry-run mode first -- Leave the API key empty or enable "Dry run" to test with sample data before using your live key.

Input parameters

ParameterTypeRequiredDefaultDescription
apiKeyStringNo-Your free SAM.gov API key. Leave empty for dry-run mode.
keywordsStringNo-Keywords to search in opportunity titles.
naicsCodesString[]No-NAICS industry codes to filter by (e.g., "541512"). Searches each code separately and deduplicates.
procurementTypesString[]No["o","k"]Procurement type codes: o (Solicitation), k (Combined Synopsis/Solicitation), r (Sources Sought), p (Presolicitation), a (Award Notice), s (Special Notice), u (J&A), g (Surplus), i (Intent to Bundle).
setAsideTypeStringNoAllSmall business set-aside filter: SBA, SBP, 8A, 8AN, HZC, HZS, SDVOSBC, SDVOSBS, WOSB, WOSBSS, EDWOSB, EDWOSBSS, VSA, VSS.
stateStringNo-Two-letter state code for place of performance (e.g., "CA", "TX", "VA").
postedDaysAgoIntegerNo30Only return opportunities posted within the last N days (1-365).
maxResultsIntegerNo100Maximum number of opportunities to return (1-1000).
dryRunBooleanNotrueReturn sample data without calling the API. Useful for testing.

Input examples

IT services -- HUBZone set-aside in Virginia:

{
    "apiKey": "YOUR_SAM_GOV_API_KEY",
    "keywords": "software development",
    "naicsCodes": ["541512", "541511"],
    "setAsideType": "HZC",
    "state": "VA",
    "postedDaysAgo": 30,
    "maxResults": 200,
    "dryRun": false
}

Construction -- all small business solicitations nationwide:

{
    "apiKey": "YOUR_SAM_GOV_API_KEY",
    "naicsCodes": ["236220", "237310", "238210"],
    "procurementTypes": ["o", "k"],
    "setAsideType": "SBA",
    "postedDaysAgo": 14,
    "maxResults": 500,
    "dryRun": false
}

Market research -- broad scan of recent awards:

{
    "apiKey": "YOUR_SAM_GOV_API_KEY",
    "procurementTypes": ["a"],
    "postedDaysAgo": 90,
    "maxResults": 1000,
    "dryRun": false
}

Early intelligence -- sources sought only:

{
    "apiKey": "YOUR_SAM_GOV_API_KEY",
    "keywords": "cybersecurity",
    "procurementTypes": ["r", "p"],
    "postedDaysAgo": 60,
    "maxResults": 100,
    "dryRun": false
}

Input tips

  • Combine NAICS codes with keywords for the most precise results. NAICS codes filter by industry classification while keywords search opportunity titles.
  • Use procurementTypes: ["r"] to catch Sources Sought notices, which represent early-stage market research before a formal solicitation is issued.
  • Set postedDaysAgo: 180 for your first run to get a sense of opportunity volume in your space before narrowing.
  • Leave state empty unless you specifically need work in one state. Many federal contracts allow remote performance.

Output example

Each opportunity in the output dataset contains the following fields:

{
    "noticeId": "a1b2c3d4e5f6a7b8c9d0",
    "title": "Enterprise Cloud Migration and Modernization Services",
    "solicitationNumber": "W912DQ-24-R-0042",
    "procurementType": "Solicitation",
    "postedDate": "2025-04-15",
    "responseDeadline": "2025-05-15",
    "naicsCode": "541512",
    "classificationCode": "D316",
    "active": true,
    "setAsideType": "SBA",
    "setAsideDescription": "Total Small Business Set-Aside",
    "agency": "DEPT OF DEFENSE",
    "subAgency": "DEPT OF THE ARMY",
    "office": "W6QM ARMY CONTRACTING COMMAND",
    "contactName": "Jane Smith",
    "contactEmail": "[email protected]",
    "contactPhone": "(555) 123-4567",
    "performanceCity": "Arlington",
    "performanceState": "VA",
    "awardAmount": null,
    "awardDate": null,
    "awardeeName": null,
    "samUrl": "https://sam.gov/opp/a1b2c3d4e5f6a7b8c9d0/view",
    "additionalInfoUrl": null,
    "attachmentCount": 3
}

Output fields

FieldTypeDescription
noticeIdStringUnique SAM.gov identifier for the opportunity
titleStringOpportunity title as posted by the contracting office
solicitationNumberStringOfficial solicitation or reference number
procurementTypeStringHuman-readable type: Solicitation, Combined Synopsis/Solicitation, Sources Sought, Award Notice, etc.
postedDateStringDate the opportunity was posted (YYYY-MM-DD)
responseDeadlineString/nullDeadline for proposals/responses; null if not specified
naicsCodeStringNorth American Industry Classification System code
classificationCodeStringProduct/service classification code (PSC)
activeBooleanWhether the opportunity is currently active and accepting responses
setAsideTypeStringSet-aside code (SBA, 8A, HZC, SDVOSBC, WOSB, etc.)
setAsideDescriptionStringHuman-readable set-aside description
agencyStringTop-level federal agency (e.g., "DEPT OF DEFENSE")
subAgencyStringSub-agency or department
officeStringSpecific contracting office
contactNameString/nullPrimary contracting officer's name
contactEmailString/nullPrimary contracting officer's email
contactPhoneString/nullPrimary contracting officer's phone
performanceCityString/nullCity where work will be performed
performanceStateString/nullState code where work will be performed
awardAmountString/nullAward dollar amount (populated for award notices)
awardDateString/nullDate of award (populated for award notices)
awardeeNameString/nullName of the awardee (populated for award notices)
samUrlStringDirect link to the opportunity on SAM.gov
additionalInfoUrlString/nullLink to additional information, if provided
attachmentCountNumberNumber of attached documents (SOWs, amendments, etc.)

How to use the API programmatically

You can start the actor and retrieve results via the Apify API without using the web interface.

Python

from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_API_TOKEN")

run_input = {
    "apiKey": "YOUR_SAM_GOV_API_KEY",
    "keywords": "cybersecurity",
    "naicsCodes": ["541512"],
    "setAsideType": "SBA",
    "postedDaysAgo": 30,
    "maxResults": 200,
    "dryRun": False,
}

run = client.actor("ryanclinton/sam-gov-contract-monitor").call(run_input=run_input)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(f"{item['title']} — {item['agency']} — Deadline: {item['responseDeadline']}")

JavaScript

import { ApifyClient } from "apify-client";

const client = new ApifyClient({ token: "YOUR_APIFY_API_TOKEN" });

const run = await client.actor("ryanclinton/sam-gov-contract-monitor").call({
    apiKey: "YOUR_SAM_GOV_API_KEY",
    keywords: "cybersecurity",
    naicsCodes: ["541512"],
    setAsideType: "SBA",
    postedDaysAgo: 30,
    maxResults: 200,
    dryRun: false,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.log(`${item.title} — ${item.agency} — Deadline: ${item.responseDeadline}`);
});

cURL

# Start the actor
curl -X POST "https://api.apify.com/v2/acts/ryanclinton~sam-gov-contract-monitor/runs?token=YOUR_APIFY_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "apiKey": "YOUR_SAM_GOV_API_KEY",
    "keywords": "cybersecurity",
    "naicsCodes": ["541512"],
    "postedDaysAgo": 30,
    "maxResults": 100,
    "dryRun": false
  }'

# Retrieve results (use the defaultDatasetId from the run response)
curl "https://api.apify.com/v2/datasets/DATASET_ID/items?token=YOUR_APIFY_API_TOKEN&format=json"

How it works

  1. Input validation -- The actor checks for an API key. If no key is provided or dry-run mode is enabled, it immediately returns realistic sample data so you can test your workflow without API access.

  2. NAICS iteration -- If you provide multiple NAICS codes, the actor searches each code separately against the SAM.gov Opportunities API (api.sam.gov/opportunities/v2/search). This is necessary because the SAM.gov API only accepts one NAICS code per request.

  3. Pagination -- The SAM.gov API limits responses to 1,000 results per page. The actor automatically pages through results using offset-based pagination until either all matching records are retrieved or the maxResults limit is reached.

  4. Deduplication -- When searching multiple NAICS codes, the same opportunity may appear under more than one code. The actor tracks all seen noticeId values in a set and skips duplicates, ensuring each opportunity appears only once in the output.

  5. Response normalization -- The raw SAM.gov API returns deeply nested JSON with agency hierarchies stored as dot-separated strings (e.g., "DEPT OF DEFENSE.DEPT OF THE ARMY.W6QM ARMY CONTRACTING COMMAND"). The actor parses these into separate agency, subAgency, and office fields. It also extracts the primary point of contact from the contacts array, converts procurement type codes to human-readable names, and normalizes the boolean active field.

  6. Output -- Clean, flat JSON objects are pushed to the Apify dataset one at a time. A summary log shows the total count, number of active opportunities, those with deadlines, and number of distinct agencies found.

How much does it cost to use?

SAM.gov Government Contract Monitor is extremely cost-efficient. It runs with only 256 MB of memory and completes most searches in under 30 seconds, as it calls a REST API rather than scraping web pages.

ScenarioOpportunitiesEstimated CUEstimated Cost
Quick scan (100 results)1000.002~$0.005
Daily monitoring (200 results)2000.003~$0.008
Full scan (1,000 results)1,0000.010~$0.025
Daily for one month200/day0.09~$0.23

Apify Free Tier: New Apify accounts receive $5 of free platform credits each month. This is enough to run the SAM.gov Contract Monitor hundreds of times per month at no cost, making it effectively free for most use cases.

SAM.gov API: The SAM.gov API key itself is completely free. There are no charges from the government side.

Tips for best results

  • Use NAICS codes for precision -- Keywords search only opportunity titles, but NAICS codes target the official industry classification. Combine both for the best results. Find your NAICS code at naics.com.
  • Start with a broader date range -- If you are new to a market, set postedDaysAgo to 90 or 180 to understand the volume and types of opportunities in your space.
  • Combine set-aside with NAICS -- If you are a certified small business (8(a), HUBZone, SDVOSB, WOSB), always apply the set-aside filter to find opportunities reserved for your category.
  • Schedule daily runs -- Federal opportunities often have tight response windows. Run the actor daily and integrate with email or Slack notifications to stay ahead of deadlines.
  • Use dry-run mode first -- Test your downstream workflow (Google Sheets, webhook, CRM) with sample data before switching to live mode.
  • Monitor multiple NAICS codes -- The actor automatically deduplicates when you provide multiple NAICS codes, so you will not get duplicate entries.
  • Check procurement types -- The default filters for Solicitations and Combined Synopsis/Solicitations cover most actionable opportunities, but add Sources Sought (r) if you want early intelligence on upcoming contracts.
  • Watch for award notices -- Track competitor wins by setting procurementTypes: ["a"]. The output includes awardeeName and awardAmount for award notices.

Combine with other actors

  • Federal Register Search -- Monitor proposed rules and notices that precede new contract opportunities or change procurement requirements. Cross-reference rule docket numbers with SAM.gov solicitations to get early warning.
  • Congress Bill Search -- Track federal legislation that creates new procurement programs or authorizes spending. Bills that pass out of committee often lead to SAM.gov opportunities 6-18 months later.
  • USAspending Federal Spending Search -- Analyze historical federal spending data to identify which agencies and programs have the largest budgets in your industry. Prioritize SAM.gov opportunities from high-spending agencies.
  • Grants.gov Federal Grant Search -- Some opportunities appear as grants rather than contracts. Search both SAM.gov and Grants.gov to ensure complete coverage of federal funding opportunities.
  • Congressional Stock Trade Tracker -- Identify congressional interest in specific defense or technology sectors by tracking stock trades, then monitor SAM.gov for related procurement activity.
  • OFAC Sanctions Search -- Screen potential teaming partners or subcontractors against OFAC sanctions lists before bidding on government contracts.

NAICS code quick reference

CodeIndustry
236220Commercial and Institutional Building Construction
237310Highway, Street, and Bridge Construction
238210Electrical Contractors
334111Electronic Computer Manufacturing
334511Search and Navigation Equipment
336411Aircraft Manufacturing
511210Software Publishers
517111Wired Telecommunications Carriers
541330Engineering Services
541511Custom Computer Programming Services
541512Computer Systems Design Services
541519Other Computer Related Services
541611Administrative Management Consulting
541690Other Scientific and Technical Consulting
541715R&D in Physical, Engineering, and Life Sciences
561210Facilities Support Services
561612Security Guards and Patrol Services
611430Professional and Management Development Training

Find the full NAICS directory at naics.com or census.gov/naics.

Set-aside code reference

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

Procurement type code reference

CodeTypeDescription
oSolicitationFormal RFP, RFQ, or IFB — the government is actively seeking proposals
kCombined Synopsis/SolicitationStreamlined notice that combines the announcement and solicitation
rSources SoughtMarket research — the government wants to know who can do the work
pPresolicitationAdvance notice that a solicitation is coming soon
aAward NoticeAnnouncement of a contract award including winner and amount
sSpecial NoticeInformational notice (e.g., conferences, community outreach)
uJustification & AuthorizationJ&A for other-than-full-and-open competition
gSale of Surplus PropertyGovernment surplus sales
iIntent to BundleNotice of intent to bundle contract requirements

Integrations

SAM.gov Government Contract Monitor works seamlessly with Apify's built-in integrations:

  • Google Sheets -- Automatically export new contract opportunities to a spreadsheet for team review.
  • Slack / Email -- Get instant notifications when new opportunities match your criteria.
  • Webhooks -- Push results to your CRM, proposal management system, or custom pipeline.
  • Zapier / Make -- Connect to thousands of apps for custom automation workflows.
  • API access -- Retrieve results programmatically via the Apify API for integration with your own applications.

Limitations

  • Title-only keyword search -- The keywords parameter searches opportunity titles only, not the full description or attached documents. You may need broader keywords to capture relevant opportunities.
  • One NAICS code per API call -- The SAM.gov API only accepts one NAICS code per request. The actor works around this by searching each code separately and deduplicating, but very large NAICS lists will increase run time.
  • No agency filter input -- You cannot filter by contracting agency as an input parameter. Instead, filter the output dataset by the agency or subAgency fields after the run completes.
  • 1,000 result cap -- The SAM.gov API has a hard limit of 1,000 results per query. If your search matches more than 1,000 opportunities, narrow your date range or add more filters.
  • No attachment content -- The actor returns attachmentCount but does not download or parse the actual SOW, amendment, or other attached documents.
  • Prime contracts only -- This actor covers prime contract opportunities. Subcontracting opportunities are listed separately on SAM.gov and are not available through the Opportunities API.
  • Rate limits -- SAM.gov applies rate limits on API access. The actor handles pagination with standard delays, but extremely frequent scheduled runs may encounter throttling.

Responsible use

  • Public data only -- All data returned by this actor comes from publicly available federal procurement notices on SAM.gov. No private or restricted information is accessed.
  • Respect SAM.gov terms -- Use your API key in accordance with SAM.gov's terms of service. Avoid excessive concurrent requests that could burden the API.
  • Contact information -- Contracting officer contact details are provided for legitimate business development purposes. Do not use this data for unsolicited marketing or spam.
  • Scheduling -- Daily or weekly runs are appropriate for monitoring. Avoid running the actor more frequently than necessary.
  • Accuracy -- While the actor normalizes SAM.gov data, always verify critical details (deadlines, requirements, set-aside eligibility) on the official SAM.gov website before preparing a bid.

FAQ

Do I need a SAM.gov API key? For live data, yes. The key is free -- register at sam.gov, go to Account Details, and generate one. Without a key, the actor runs in dry-run mode with sample data.

What is dry-run mode? Dry-run mode returns 3 realistic sample opportunities without calling the SAM.gov API. It is enabled by default so you can test the actor and your integrations before providing an API key.

How often is SAM.gov data updated? SAM.gov updates continuously as agencies post new opportunities. Running the actor daily ensures you catch new postings within 24 hours.

Can I search for subcontracting opportunities? The SAM.gov Opportunities API covers prime contract opportunities. Subcontracting opportunities are listed separately on SAM.gov and are not available through this API endpoint.

What do the procurement type codes mean? The most common types are: o = Solicitation (formal RFP/RFQ), k = Combined Synopsis/Solicitation, r = Sources Sought (market research), p = Presolicitation (advance notice), a = Award Notice, and s = Special Notice. See the procurement type reference table above for the full list.

Is there a rate limit on the SAM.gov API? SAM.gov applies rate limits but they are generous for typical use. The actor handles pagination with reasonable delays. For very large searches (1,000+ results), the actor pages through results automatically.

Can I filter by contracting agency? Direct agency filtering is not available as an input parameter, but you can filter the output dataset by the agency or subAgency fields after the run completes. Use the Apify API's dataset filtering or export to Google Sheets and filter there.

How do I find my NAICS code? Visit naics.com or the Census Bureau's NAICS search. You can search by keyword to find the codes that match your industry. When in doubt, search with multiple related codes — the actor deduplicates automatically.

What is the difference between SBA and 8(a) set-asides? SBA (Total Small Business Set-Aside) is open to all certified small businesses. 8(a) is specifically for businesses in the SBA 8(a) Business Development program, which serves socially and economically disadvantaged entrepreneurs. See the set-aside reference table above for all options.

Can I get results in CSV or Excel format? Yes. After the actor completes, click "Export" on the dataset page and choose CSV, Excel, JSON, or other formats. The Apify API also supports format=csv and format=xlsx query parameters.

How it works

01

Configure

Set your parameters in the Apify Console or pass them via API.

02

Run

Click Start, trigger via API, webhook, or set up a schedule.

03

Get results

Download as JSON, CSV, or Excel. Integrate with 1,000+ apps.

Use cases

Sales Teams

Build targeted lead lists with verified contact data.

Marketing

Research competitors and identify outreach opportunities.

Data Teams

Automate data collection pipelines with scheduled runs.

Developers

Integrate via REST API or use as an MCP tool in AI workflows.

Ready to try SAM.gov Government Contract Monitor?

Start for free on Apify. No credit card required.

Open on Apify Store