GovCon Intelligence Engine — SAM.gov Opportunity Scraper
Pricing
from $0.50 / 1,000 opportunity analyzeds
GovCon Intelligence Engine — SAM.gov Opportunity Scraper
Pulls federal contracting opportunities from the SAM.gov API. Scores each record 0–100 across six dimensions, classifies by category and urgency, detects changes run-over-run, and surfaces actionable alerts. Pay-per-event.
Pricing
from $0.50 / 1,000 opportunity analyzeds
Rating
0.0
(0)
Developer
Kevin
Actor stats
0
Bookmarked
1
Total users
0
Monthly active users
7 days ago
Last modified
Categories
Share
Pulls federal contracting opportunities from the SAM.gov Opportunities API, scores each record 0–100, classifies it by category and urgency, detects changes run-over-run, and surfaces actionable alerts. Designed for government contractors who need a reliable, structured feed of federal opportunities — not raw SAM.gov data dumps.
Pricing: Pay-per-event. See the Apify Store page for current pricing.
Who This Is For
- Small businesses and government contractors monitoring SAM.gov daily
- Capture teams tracking specific agencies, NAICS codes, or set-aside types
- BD automation pipelines that need structured, scored opportunity data
- Anyone who wants to stop manually searching SAM.gov
Quick Start
- Get a free SAM.gov API key at https://sam.gov/profile/details
- Run the actor with at minimum
{ "samApiKey": "YOUR_KEY" } - Results appear in the default Apify dataset
Key Features
- Queries the official SAM.gov REST API — no browser scraping, no fragile HTML parsing
- Scores every opportunity 0–100 across multiple dimensions with a transparent
scoreBreakdown - Classifies records by category:
bid_opportunity,pre_solicitation,award_notice,market_research,special_notice,justification - Normalizes set-aside codes, agency names, and place of performance across all records
- Detects changes run-over-run: new, modified, unchanged, and relisted records
- Emits per-record action fields:
recommendedAction,alertPriority,alertReason - Flags data-quality anomalies via
dataQualityFlagsfor diagnostic visibility - Supports watchlist scoring: configure preferred keywords, NAICS codes, agencies, states, and set-asides for personalized scoring boosts
- Optional webhook (n8n, Zapier, Make) and Slack Block Kit integration
Scoring Methodology (0–100)
Each opportunity is scored using a multi-component model. The full breakdown is available in scoreBreakdown on every record.
| Component | Range | What it measures |
|---|---|---|
noticeTypeScore | 0–25 | Record category (solicitation, pre-sol, sources sought, etc.) |
setAsideScore | 0–20 | Set-aside type vs. your preferred set-asides |
deadlineScore | −20 to +18 | Urgency: days until response deadline |
valueScore | 0–15 | Contract value tier |
dataQualityScore | 0–10 | Completeness of key fields |
watchlistScore | 0–10 | Matches to your preferred keywords, NAICS, agencies, and states |
penaltyScore | subtracted | Applied for non-actionable categories, expired records, missing required fields |
Scores are clamped to 0–100. scoreConfidence (0–100) reflects how complete the underlying data is. scoreVersion identifies the scoring formula version; buildVersion identifies the actor release.
Classification and Action Fields
Every record includes:
| Field | Values | Meaning |
|---|---|---|
recordCategory | bid_opportunity pre_solicitation award_notice market_research special_notice justification other | Notice type classification |
deadlineUrgency | today soon upcoming distant expired none | Deadline proximity label (soon = within 7 days) |
lifecycleStage | open closing_soon awarded archived unknown | Opportunity lifecycle state |
recommendedAction | bid_now review_soon watch research_only ignore | Score- and category-driven action recommendation |
alertPriority | high medium low none | Alert urgency level |
alertReason | string or null | Human-readable explanation of why this record warrants attention |
award_notice and justification records always receive alertPriority: none and alertReason: null. Expired records always receive alertPriority: none.
Change Detection
When trackChanges: true (default), the actor stores a normalized snapshot of each opportunity in Apify KV store between runs and detects real field changes on subsequent runs.
Each record receives one of four changeType values:
| Value | Meaning |
|---|---|
new | First time this noticeId has been seen |
modified | One or more tracked fields changed since the last run |
unchanged | No detectable change since the last run |
relisted | Record reappeared after being absent in a prior run |
The changedFields array lists exactly which normalized fields changed. Change detection uses normalized values only — raw formatting differences (e.g. set-aside code variants that normalize to the same value) never produce false modified results. firstSeenAt and lastSeenAt are preserved across runs.
Flagged Reasons
flaggedReasonsV2 is an array of diagnostic strings on each record. Flags are category-aware — non-actionable notice types (award notices, justifications) do not receive flags that are meaningless for them.
Common flags:
| Flag | Meaning |
|---|---|
new_record | First time this notice has been seen |
modified_record | Fields changed since last run |
bid_relevant | Category is actively biddable |
deadline_today | Response deadline is today |
deadline_soon | Deadline within 7 days |
expired | Deadline has passed |
set_aside_match | Positive set-aside designation present |
watchlist_match | Matched a preferred keyword, NAICS, agency, or state |
high_value | Estimated value at or above $1M |
missing_naics | NAICS code absent |
missing_value | No estimated contract value |
missing_deadline | No response deadline provided |
award_notice | Record is an award notice |
likely_removed | Record was absent in recent runs |
Data Quality Flags
dataQualityFlags is a separate diagnostic array that flags raw data anomalies from SAM.gov. These are informational only and do not affect scoring or alerts.
| Flag | Meaning |
|---|---|
empty_set_aside_string | Set-aside field was an empty string in the source |
empty_response_deadline_string | Deadline field was an empty string in the source |
deadline_before_posted_date | Response deadline is earlier than the posted date |
missing_naics | NAICS code absent |
foreign_state_code_format | Non-US place of performance with ISO 3166-2 region code in the state field |
Output Modes
| Mode | What is included |
|---|---|
full | All records with all fields (default) |
bid_feed | Solicitations, pre-solicitations, and sources sought only |
awards_feed | Award notices and justifications only |
alerts | New or modified records, records with urgent deadlines, and records with bid_now or review_soon action — award notices and justifications excluded |
etl_flat | All records with nested objects flattened to underscore-delimited keys for data pipeline compatibility |
Each run also appends a summary record with runType: "summary" containing aggregate stats: total records, new/modified counts, top agencies, top NAICS codes, bid-relevant count, and top 5 opportunities by score.
Input Parameters
Core Filters
| Parameter | Type | Default | Description |
|---|---|---|---|
samApiKey | string | required | SAM.gov public API key |
keywords | string[] | [] | Keywords to filter opportunities (matched against title in SAM.gov query) |
naicsCode | string | — | Single NAICS code filter |
agency | string | — | Agency name partial match |
noticeType | string[] | [] | Notice type codes: o Solicitation, p Presolicitation, k Combined, r Sources Sought, s Special Notice, a Award, u Justification, g Surplus Sale, i Bundle Intent |
setAside | string[] | [] | Set-aside codes to filter on: SBA, 8A, 8AN, HZC, HZS, SDVOSBC, SDVOSBS, WOSB, WOSBSS, EDWOSB, EDWOSBSS, VSB, VOSB |
activeOnly | boolean | true | Only return currently active opportunities |
postedFrom / postedTo | string | — | Posted date range (ISO 8601 or MM/DD/YYYY) |
deadlineFrom / deadlineTo | string | — | Response deadline date range |
minContractValue / maxContractValue | integer | — | Contract value filter in USD |
maxResults | integer | 100 | Maximum opportunities to fetch and process (1–10,000) |
Behavior
| Parameter | Type | Default | Description |
|---|---|---|---|
trackChanges | boolean | true | Enable KV-store change detection across runs |
outputMode | string | full | full · bid_feed · awards_feed · alerts · etl_flat |
minScore | integer | 0 | Exclude records below this opportunity score |
onlyFlagged | boolean | false | Only output records with at least one flag |
Watchlist / Scoring Preferences
These fields boost scoring and populate watchlistMatch and watchlistMatches on matched records.
| Parameter | Type | Default | Description |
|---|---|---|---|
preferredKeywords | string[] | [] | Keywords matched against record titles for scoring bonus |
preferredNaicsCodes | string[] | [] | NAICS codes that receive a scoring bonus when matched |
preferredAgencies | string[] | [] | Agency names (partial match) that receive a scoring bonus |
preferredStates | string[] | [] | State codes (e.g. VA, TX) matched against place of performance |
preferredSetAsides | string[] | [] | Set-aside types (SBA, SDVOSB, WOSB, HUBZONE, 8A, VOSB, OTHER) that receive maximum set-aside score |
Integrations
| Parameter | Type | Description |
|---|---|---|
webhookUrl | string | POST all output records as JSON to this URL at end of run (n8n, Zapier, Make, or custom endpoint) |
slackWebhookUrl | string | Send a Slack Block Kit summary with run stats and top 5 opportunities by score |
Output Fields (per record)
Core Notice Fields
noticeId · title · solicitationNumber · agency · agencyCode · noticeType · noticeTypeCode · naicsCode · naicsCodes · classificationCode · setAside · setAsideLabel · postedDate · responseDeadLine · archiveDate · active · estimatedValue · awardDate · awardNumber · awardee · placeOfPerformance · pointOfContact · descriptionUrl · opportunityUrl · scrapedAt
Normalized Fields
normalizedSetAside · normalizedAgency · normalizedPlaceOfPerformance (object: city, state, country, raw)
Classification and Deadline
recordCategory · bidRelevance · daysUntilDeadline · deadlineUrgency · isExpired · isAward · isActiveOpportunity · lifecycleStage · dataCompletenessScore
Scoring
opportunityScoreV2 · opportunityScore (alias) · scoreBreakdown · scoreConfidence · scoreVersion · buildVersion
Change Detection
changeType · changedFields · firstSeenAt · lastSeenAt · isNewRecord · isModifiedRecord · isLikelyRemoved · previousNoticeType · previousResponseDeadline · previousEstimatedValue
Watchlist
watchlistMatch · watchlistMatches
Flags and Reasons
flaggedReasonsV2 · flaggedReasons (alias) · dataQualityFlags · matchReasons · disqualifyingReasons
Action and Alerts
recommendedAction · alertPriority · alertReason
Example Inputs
SDVOSB IT opportunities at DoD
{"samApiKey": "YOUR_KEY","keywords": ["cybersecurity", "zero trust", "SIEM"],"naicsCode": "541512","agency": "DEPARTMENT OF DEFENSE","setAside": ["SDVOSBC"],"activeOnly": true,"maxResults": 200,"minScore": 40,"outputMode": "alerts","preferredKeywords": ["cybersecurity", "zero trust"],"preferredSetAsides": ["SDVOSB"]}
Daily new-opportunity monitor for a specific NAICS
{"samApiKey": "YOUR_KEY","noticeType": ["o", "k", "r"],"activeOnly": true,"trackChanges": true,"outputMode": "alerts","preferredNaicsCodes": ["541511", "541512"],"preferredAgencies": ["GSA", "Department of Veterans Affairs"],"preferredStates": ["VA", "MD", "DC"],"webhookUrl": "https://your-n8n.cloud/webhook/govcon"}
Awards intelligence feed
{"samApiKey": "YOUR_KEY","noticeType": ["a"],"activeOnly": false,"outputMode": "awards_feed","maxResults": 500,"trackChanges": false}
Limitations and Notes
- SAM.gov API rate limits apply. The free public API key is subject to daily and per-minute quotas. The actor handles 429 rate limit responses with exponential backoff but cannot exceed what SAM.gov permits.
- Date range required. The SAM.gov API requires a posting date range. If none is provided, the actor defaults to the last 30 days.
- Estimated value availability. Estimated contract value is not present on all opportunity types. It is most reliably populated on award notices.
- Change detection requires consistent runs. The KV store used for change detection is scoped to the Apify actor run environment. If you clear storage or run in a new environment, all records will appear as
newon the first run. - This actor queries the SAM.gov Opportunities API. It does not scrape the SAM.gov website and does not access documents, attachments, or full opportunity descriptions.