Sam Gov Federal Contracts Rfp Opportunities Scraper
Pricing
from $3.00 / 1,000 contract opportunity extracteds
Sam Gov Federal Contracts Rfp Opportunities Scraper
Find public SAM.gov contract opportunities by keyword, NAICS and notice type. Extract response deadlines, set-asides, published government contacts and attachment links. Export structured notices to build and monitor your GovCon pipeline.
Pricing
from $3.00 / 1,000 contract opportunity extracteds
Rating
0.0
(0)
Developer
Arezdev
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
3 days ago
Last modified
Categories
Share
Find active federal contract opportunities, response deadlines, public government contacts, and current attachment links from SAM.gov in one structured dataset.
Build a GovCon pipeline around solicitations, presolicitations, combined synopsis/solicitations, Sources Sought, and award notices. Search by keyword, narrow by NAICS, and focus on small business programs. Export clean JSON, CSV, Excel, or XML from Apify.
Best for building a GovCon opportunity pipeline. Each successful row is a notice; enable details for public contacts and attachment links. This Actor uses public SAM.gov website endpoints, whose availability and response formats can change.
Ready-to-run example
The Input form includes public example values. A fresh apify run uses the input schema defaults. To explicitly select the small sample, including when input was saved by an earlier local run, use:
apify run --input-file .actor/input.example.json
You can also paste .actor/input.example.json into the JSON input editor in Apify Console. Replace the example sources with your own targets and increase the limits when you are ready.
How to use
- Enter keywords such as
cybersecurity,software, or a service your business supplies. - Optionally add a NAICS code and choose the notice types that interest you. Add
ato include Award Notices; the default types areo,p,k, andr. - Keep Fetch details, contacts, and attachments enabled to retrieve public POC emails, phone numbers, classifications, performance locations, and attachment links.
- Choose a maximum number of results and start the Actor. The prefilled example saves at most three rows.
- Open the Output tab, inspect the table, and export the results or connect the dataset to your workflow.
Example input:
{"keywords": "cybersecurity","noticeTypes": ["o", "p", "k", "r"],"onlySmallBusinessSetAside": false,"fetchFullDetailsAndContacts": true,"maxItems": 3,"timeoutSecs": 15,"proxyConfiguration": { "useApifyProxy": false }}
No SAM.gov account or API key is required for the website endpoints used by this Actor. Direct requests are attempted first. To guarantee that no proxy is used, keep useApifyProxy: false as in the example.
Schedule daily or hourly runs in Apify Console to monitor changes. Use opportunityId as your upsert key and compare responseDeadline, title, and attachment URLs across runs. Each run produces its own snapshot; historical deduplication belongs in the destination system.
What data can you extract?
| Fields | Meaning |
|---|---|
opportunityId, samUrl | Notice identifier and canonical SAM.gov link |
status, errorMessage | Extraction outcome and safe diagnostic information |
solicitationNumber, title, noticeType | Procurement identifiers and human-readable notice type |
departmentName, agencyName | Publishing department and agency from the organization hierarchy |
naicsCode, setAsideDescription | Primary NAICS classification and small business eligibility program |
postedDate, responseDeadline, daysUntilDeadline | Published timestamps and remaining time |
placeOfPerformanceCity, placeOfPerformanceState | Published performance location, when available |
primaryPocName, primaryPocEmail, primaryPocPhone | Public primary government contact |
secondaryPocEmail | Public secondary contact email |
attachmentUrls | Current public attachment downloads and external resource links |
scrapedAt | Extraction timestamp in UTC |
Every row contains all 22 output fields. Missing text is an empty string; missing attachments are []; an unknown deadline produces daysUntilDeadline: null. All timestamps are normalized to UTC. Date-only and timezone-free timestamps are interpreted as UTC. daysUntilDeadline is the ceiling of the difference in 24-hour periods, so one hour remaining is 1 and a deadline more than one day ago is negative.
The primary contact is selected by its published primary designation, even if listed after a secondary contact. The performance location comes from the notice rather than the contracting office address. The NAICS filter can match any published NAICS code; the output reports the primary code.
Input settings
| Setting | Default | Description |
|---|---|---|
keywords | "software" | Up to 500 characters; an empty string searches all active notices. Console prefill: "cybersecurity". |
naicsCode | Empty | Optional two to six digit NAICS code or sector/subsector prefix, for example 541512 or 54. |
noticeTypes | ["o","p","k","r"] | Notice codes below. An empty list includes all supported notice types. |
onlySmallBusinessSetAside | false | Include small business set-asides and the programs listed below. |
fetchFullDetailsAndContacts | true | Fetch details, public POCs, performance location, and public resource URLs. |
maxItems | 50 | Total saved rows, including errors; range 1–2000. Console prefill: 3. |
timeoutSecs | 15 | Per-request total timeout, including DNS, redirects, and fallback attempts; range 3–60. |
maxConcurrency | 25 | Concurrent opportunities; range 1–100. Each enriched opportunity makes up to two parallel requests. |
proxyConfiguration | Optional | Proxy settings described below. |
| Notice code | Notice type |
|---|---|
o | Solicitation |
p | Presolicitation |
k | Combined Synopsis/Solicitation |
r | Sources Sought |
a | Award Notice |
s | Special Notice |
u | Justification |
g | Sale of Surplus Property |
i | Intent to Bundle Requirements |
The small business filter includes total/partial small business, 8(a), HUBZone, SDVOSB, WOSB, EDWOSB, veteran-owned small business, and Indian Small Business Economic Enterprise codes. Local-area and general Indian enterprise set-asides do not imply small business eligibility and are excluded by this filter.
When full enrichment is disabled, the Actor saves search metadata with blank contacts and attachment lists. NAICS and set-aside filtering still fetches classification details to verify matches. The website search response often omits classifications and performance location, so those fields may be blank in an unfiltered search-only run.
With no proxy configuration, the Actor starts with a direct request. On HTTP 403, 429, or 503, it can try the Apify SHADER datacenter group and then the account's default datacenter proxy. Configured groups, including residential proxies, are tried only if you explicitly set useApifyProxy: true. Custom proxyUrls are used exclusively. useApifyProxy: false disables automatic proxies. Proxy access and traffic can have separate costs.
Output example
Illustrative record with fictional contact details:
{"opportunityId": "0123456789abcdef0123456789abcdef","status": "SUCCESS","solicitationNumber": "TEST-2026-001","title": "Cybersecurity and software support","noticeType": "Solicitation","departmentName": "EXAMPLE DEPARTMENT","agencyName": "EXAMPLE AGENCY","naicsCode": "541512","setAsideDescription": "Total Small Business Set-Aside (FAR 19.5)","postedDate": "2026-10-19T20:20:30.570Z","responseDeadline": "2026-10-25T17:00:00.000Z","daysUntilDeadline": 6,"placeOfPerformanceCity": "Arlington","placeOfPerformanceState": "VA","primaryPocName": "Alex Example","primaryPocEmail": "primary@example.gov","primaryPocPhone": "+1 (202) 555-0100","secondaryPocEmail": "second@example.gov","attachmentUrls": ["https://sam.gov/api/prod/opps/v3/opportunities/resources/files/abcdef0123456789abcdef0123456789/download"],"samUrl": "https://sam.gov/opp/0123456789abcdef0123456789abcdef/view","scrapedAt": "2026-10-20T12:00:00.000Z","errorMessage": ""}
Use the results in Clay, n8n, Make, or your API
- Clay: Import the dataset CSV or retrieve its JSON through an HTTP source. Map
opportunityIdto the unique key and use NAICS, department, and deadlines to segment your pipeline. - n8n: Run the Actor through Apify's integration or an HTTP Request node, wait for completion, retrieve dataset items, and upsert by
opportunityIdinto your CRM or database. - Make: Schedule an Actor run, retrieve dataset items, and route rows to your chosen destination based on status, set-aside, or remaining days.
- Your API: Use the run's
defaultDatasetIdto retrieve dataset items through Apify's Dataset API. Obtain the generated dataset URL from the run or Output tab and manage authentication through your integration's credential store.
Filter for status === "SUCCESS" before using records in downstream automations. Keep ERROR rows for diagnostics or targeted reruns. Missing contact data means SAM.gov did not publish it; the Actor does not infer email addresses.
Pricing and limits
The custom PPE event is opportunity-scraped. Only saved SUCCESS rows trigger this event. ERROR rows cost $0 in custom event fees, including partial failures where search metadata or contact data could still be retained.
The event price is configured in Apify Console and displayed on the Actor's Store page. For a concrete illustration, at $0.001 per successful opportunity, 1,000 successful opportunities cost $1.00 in event fees. If 900 succeed and 100 fail, the same illustrative rate produces $0.90 in event fees. This is an example, not a published price. Apify compute, storage, and optional proxy traffic can still have separate costs.
Free Apify accounts can save at most 25 total rows per cloud run, including ERROR rows. Paid accounts and local runs use the requested maxItems, up to 2,000. A run stops cleanly when its item cap or custom event budget is exhausted.
Search results are fetched in pages of 25, ordered by most recently modified notice. IDs are deduplicated within the run. SAM.gov limits the accessible search window to 10,000 matching notices; narrow your keywords or NAICS filter for broad searches. Active notices can have past response deadlines. The Actor follows SAM.gov's active flag and does not silently discard overdue notices.
FAQ and troubleshooting
Do I need a SAM.gov API key?
No. This Actor uses SAM.gov's publicly accessible website search and opportunity endpoints. The separate GSA Get Opportunities Public API requires an API key; it is not called by this Actor.
Why are contacts, locations, or attachments missing?
Publication is optional. Some notices have no POCs or performance location, and some have no attachments. Deleted, restricted, export-controlled, explicitly gated, and unavailable resources are omitted. Published download URLs can still require a browser session or be unavailable when opened later. The Actor lists public links without downloading or checking attachment contents.
Why does a row have ERROR even though some data was extracted?
With full enrichment enabled, a failed detail or resource request marks the row ERROR. Available search metadata, successfully retrieved contacts, and public links are retained. The row does not trigger the custom PPE event. A failed search page produces one uncharged diagnostic row and preserves earlier results.
What should I do about HTTP 403, 429, or timeouts?
Lower maxConcurrency, narrow your search, or raise timeoutSecs within its allowed range. Enable an appropriate proxy configuration if you want proxy fallback. When the environment does not provide Apify proxy credentials, automatic proxy tiers are skipped without querying your account. Upstream availability and request throttling prevent any guarantee that every request will succeed.
Does the Actor run with Limited Permissions?
Yes. It uses the current run, its default dataset, SDK pricing state, and environment-provided account flags. It never requests /v2/users/me. Run it with LIMITED_PERMISSIONS in Apify Console. See Apify Actor permissions.
Does it use a browser or bypass restricted attachments?
Extraction uses streaming HTTP requests. It does not require a browser or access restricted resources.
Can I run it locally or build the image?
Use Node.js 22 or later:
npm ci --ignore-scriptsnpm run buildnpm testnpm run smokenpm start
Local input can be placed in storage/key_value_stores/default/INPUT.json; without input, the requested defaults apply. Local SDK output is saved under storage/datasets/default. npm run smoke performs a real direct three-item extraction in an isolated worker and reports counts, elapsed time, and peak RSS without printing POC records. npm run smoke -- --search-only checks search metadata alone.
docker build -t sam-gov-opportunities .docker run --rm sam-gov-opportunities
The image uses two node:22-alpine stages, strict TypeScript compilation, production dependencies, a non-root user, a 160 MB V8 heap, and UV_THREADPOOL_SIZE=64. HTML salvage support in the shared HTTP client is tested; incomplete JSON is always rejected.
How should the Store listing be configured?
Publish with 256 MB memory and Limited Permissions. In Apify Console, configure the custom event opportunity-scraped at your chosen unit price. Leave automatic apify-default-dataset-item charging disabled so diagnostic rows remain free of event fees. If automatic item pricing is enabled at a nonzero rate, the Actor stops before saving or billing records and reports AUTOMATIC_ITEM_PRICING_MUST_BE_DISABLED. Actor pricing is managed by the platform rather than embedded in actor.json; see Apify PPE documentation.