# SAM.gov Scraper – Federal Contract Opportunities, No API Key (`devteamdrew/sam-gov-opportunities`) Actor

SAM.gov scraper for US federal contract opportunities: solicitations, presolicitations, sources sought and award notices with NAICS, PSC, set-aside, deadline, agency and contracting officer contacts. Filter by keyword, NAICS, agency, set-aside and state. No SAM API key needed. Pay per result.

- **URL**: https://apify.com/devteamdrew/sam-gov-opportunities.md
- **Developed by:** [Andrew Moffat](https://apify.com/devteamdrew) (community)
- **Categories:** Lead generation, Business
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## SAM.gov Scraper – Federal Contract Opportunities, No API Key

SAM.gov scraper for US federal contract opportunities: solicitations, presolicitations, sources sought and award notices with NAICS, PSC, set-aside, deadline, agency and contracting officer contacts. Filter by keyword, NAICS, agency, set-aside and state. No SAM API key needed. Pay per result.

**SAM.gov Scraper** by Moxie: fast, reliable and polite, built on official/public data sources.

### What can it do?

- Federal bid teams: a daily feed of new solicitations in your NAICS codes (schedule with incremental mode)
- Small businesses: only set-aside opportunities (SBA, 8(a), WOSB, SDVOSB, HUBZone) in your state
- Lead generation: contracting office and officer contact details for relevant buys
- Competitor intelligence: award notices with awardee and amount
- Feeding notices into an LLM for bid/no-bid triage

### Data source

The official public Contract Opportunities data extract published daily by GSA on SAM.gov Data Services (`ContractOpportunitiesFullCSV.csv`, all active notices). US government data, public, no login and no SAM.gov API key (so no 10-requests-a-day key limit).

### Features

- **Pay only for results** (pay-per-event pricing, no monthly rental)
- **Incremental mode**: scheduled runs return only items you haven't received before
- **LLM-ready output**: optional compact Markdown per item for RAG / AI agents
- **Polite rate limiting** with automatic retries and backoff
- Clean, flat JSON you can export as CSV, Excel, JSON or via API

### Input example

```json
{
  "keywords": [],
  "naicsPrefixes": [
    "5415"
  ],
  "lastDays": 7,
  "maxItems": 20
}
```

### Output example

```json
{
  "id": "584d9822a413468ba6f859a7452c6710",
  "noticeId": "584d9822a413468ba6f859a7452c6710",
  "url": "https://sam.gov/workspace/contract/opp/584d9822a413468ba6f859a7452c6710/view",
  "title": "Post Quantum Cryptography (PQC) Readiness and Validation Status",
  "solicitationNumber": "1106202612072026",
  "type": "Sources Sought",
  "baseType": "Sources Sought",
  "postedDate": "2026-11-06T18:46:35",
  "responseDeadline": "2026-12-07T23:59:00-05:00",
  "archiveDate": "2027-12-07",
  "active": true,
  "department": "GENERAL SERVICES ADMINISTRATION",
  "subTier": "FEDERAL ACQUISITION SERVICE",
  "office": "FC ACQUISITION SOLUTIONS DEV/IDV ACQ MANAGEMENT",
  "naicsCode": "541519",
  "pscCode": null,
  "setAsideCode": null,
  "setAside": null,
  "placeOfPerformance": {
    "city": "Washington",
    "state": "DC",
    "zip": "20405",
    "country": "USA"
  },
  "officeLocation": {
    "city": "Washington",
    "state": "DC",
    "zip": "20415",
    "country": "USA"
  },
  "awardNumber": null,
  "awardDate": null,
  "awardAmount": null,
  "awardee": null,
  "primaryContactName": "Jane Doe",
  "primaryContactEmail": "jane.doe@agency.example.gov",
  "primaryContactPhone": null,
  "secondaryContactName": "Jane Doe",
  "secondaryContactEmail": "jane.doe@agency.example.gov",
  "secondaryContactPhone": null,
  "additionalInfoLink": null,
  "description": "Federal agencies are preparing for the transition from cryptographic algorithms that may be vulnerable to future quantum computing attacks to quantum-resistant cryptographic algorithms standardized by the National Institute of Standards and Technology (NIST). Public key cryptographic algorithms (i.e. asymmetric cryptography) currently used across Federal information systems, products and services …"
}
```

### Pricing

| Event | Free plan | Bronze | Silver | Gold |
|---|---|---|---|---|
| Contract opportunity (`result`) | $0.003 | $0.0027 | $0.0024 | $0.0021 |
| Actor start | $0.003 per run | $0.003 | $0.003 | $0.003 |

Paid Apify plans get automatic discounts (Bronze -10%, Silver -20%, Gold -30%) on results.

**Example:** 1,000 results ≈ $3.00 + $0.003 start fee. Apify platform usage is included in the price.

Benchmark: fortuitous_pirate/sam-gov-scraper (142 users, 32 monthly) and scrapesage/sam-gov-scraper (63 users) lead the niche (Apify Store, 6 Nov 2026); most need your own SAM.gov API key.

### Use via API or MCP

```bash
curl -X POST "https://api.apify.com/v2/acts/devteamdrew~sam-gov-opportunities/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H 'Content-Type: application/json' -d '{"keywords": [], "naicsPrefixes": ["5415"], "lastDays": 7, "maxItems": 20}'
```

AI agents (Claude, Cursor, etc.) can call this actor through the Apify MCP server: add `https://mcp.apify.com/?actors=devteamdrew/sam-gov-opportunities` as an MCP server.

### FAQ

**Do I need a SAM.gov API key?**\
No. The actor reads SAM.gov's official public daily data extract, so there is no API key and no 10-requests-a-day limit.

**How fresh is it?**\
GSA republishes the extract every day (early morning US Eastern), so notices posted yesterday are available today. For same-hour alerts use SAM.gov saved searches.

**Which notices are included?**\
All active Contract Opportunities: solicitations, combined synopsis/solicitations, presolicitations, sources sought, special notices, justifications and award notices. By default only the open-opportunity types are returned.

**Can I get attachments?**\
Each item links to the SAM.gov notice page (`url`), where attachments can be downloaded.

**Can I schedule it?**\
Yes. Use Apify Schedules together with incremental mode to receive only new items.

**Something broke?**\
Open an issue on the actor's Issues tab; we monitor nightly and usually fix within 24 hours.

### Ready-made examples

Open one of these pre-filled tasks and click Try for free:

- [Find SAM.gov cybersecurity contract opportunities](https://apify.com/devteamdrew/sam-gov-opportunities/examples/sam-gov-cybersecurity-contracts)
- [Track small business set-aside IT contracts on SAM.gov](https://apify.com/devteamdrew/sam-gov-opportunities/examples/small-business-set-aside-it-contracts)
- [Find federal construction bids in Texas](https://apify.com/devteamdrew/sam-gov-opportunities/examples/federal-construction-bids-texas)

### Related actors

- [Bluesky Scraper – Posts, Profiles & Search](https://apify.com/devteamdrew/bluesky-scraper)
- [UK Companies House Scraper – Companies & Directors](https://apify.com/devteamdrew/companies-house-scraper)
- [UK Planning Applications Scraper – 400+ Councils & Postcodes](https://apify.com/devteamdrew/uk-planning-applications)
- [Hacker News Scraper – Stories, Comments & Jobs](https://apify.com/devteamdrew/hacker-news-scraper)
- [npm Package Scraper – Downloads & Dependencies](https://apify.com/devteamdrew/npm-package-scraper)
- [GitHub Trending Scraper – Repos, Stars & Developers](https://apify.com/devteamdrew/github-trending-scraper)
- [Mastodon Scraper – Fediverse Hashtags, Accounts & Trends](https://apify.com/devteamdrew/mastodon-scraper)
- [Lemmy Scraper – Posts, Comments & Communities (Fediverse)](https://apify.com/devteamdrew/lemmy-scraper)
- [SEC EDGAR Scraper – 10-K, 8-K & Form D Funding Filings](https://apify.com/devteamdrew/sec-edgar-scraper)
- [arXiv Scraper – Paper Search, Abstracts & Authors](https://apify.com/devteamdrew/arxiv-scraper)
- [UK Government Tenders Scraper – Contracts Finder, Find a Tender](https://apify.com/devteamdrew/uk-public-tenders)
- [UK CQC Care Homes & Providers Scraper – Ratings & Care Leads](https://apify.com/devteamdrew/uk-cqc-care-providers)
- [UK Operator Licence Scraper – HGV & Bus Operators (DVSA VOL)](https://apify.com/devteamdrew/uk-operator-licences)
- [USAspending Federal Awards Scraper – Contracts & Grants](https://apify.com/devteamdrew/usaspending-awards)
- [EU Tenders Scraper – TED Public Procurement Notices](https://apify.com/devteamdrew/eu-ted-tenders)

### Legal and GDPR

This actor only collects publicly available data from official or open APIs and respects their rate limits and terms of use.

Results may contain personal data (e.g. names, handles). You are responsible for having a lawful basis under GDPR/UK GDPR and similar laws to process it, and for using the data in line with the source platform's terms. Do not use it for spam or for profiling individuals.

***

See real sample rows, FAQs and ready-made feeds at [rowsift.co.uk](https://rowsift.co.uk/sam-gov-opportunities/?utm_source=apify\&utm_medium=readme\&utm_campaign=sam-gov-opportunities\&utm_content=footer). Free walkthrough of the official API (no Apify account needed): [SAM.gov Scraper API guide](https://rowsift.co.uk/guides/sam-gov-opportunities-api/?utm_source=apify\&utm_medium=readme\&utm_campaign=sam-gov-opportunities\&utm_content=guide).

# Actor input Schema

## `keywords` (type: `array`):

Keep notices whose title, description or solicitation number contains any of these, e.g. `cybersecurity`, `janitorial`, `drone`. Empty = all.

## `noticeTypes` (type: `array`):

Which SAM.gov notice types to return. Default = open opportunities (solicitations, combined synopsis/solicitations, presolicitations, sources sought). Clear it to get every type.

## `naicsPrefixes` (type: `array`):

Only notices whose NAICS code starts with one of these, e.g. `5415` (computer services), `236` (construction), `561720` (janitorial).

## `pscPrefixes` (type: `array`):

Product Service Code prefixes, e.g. `D3` (IT services), `S2` (housekeeping), `Y1` (construction).

## `agencies` (type: `array`):

Department, sub-tier or office contains any of these, e.g. `Army`, `Veterans Affairs`, `NASA`, `General Services`.

## `setAsides` (type: `array`):

Set-aside code or name contains any of these, e.g. `SBA` (small business), `8A`, `WOSB`, `SDVOSB`, `HZC` (HUBZone).

## `states` (type: `array`):

Two-letter US state of the place of performance or contracting office, e.g. `TX`, `VA`, `CA`.

## `lastDays` (type: `integer`):

Notices posted in the last N days, including today (ignored when dates are set).

## `postedFrom` (type: `string`):

YYYY-MM-DD (optional).

## `postedTo` (type: `string`):

YYYY-MM-DD (optional).

## `openOnly` (type: `boolean`):

Skip notices whose response deadline has passed or is missing.

## `activeOnly` (type: `boolean`):

Skip notices SAM.gov has marked inactive.

## `includeDescription` (type: `boolean`):

Include the notice description text (can be long).

## `maxItems` (type: `integer`):

Maximum number of results to return (and pay for) per run.

## `incremental` (type: `boolean`):

Remember items delivered in previous runs with the same input and skip them. Great for scheduled monitoring runs: you only pay for new results.

## `outputFormat` (type: `string`):

`json` = structured fields; `llm` = id, url and a compact Markdown block ready for LLMs/RAG; `both` = structured fields plus Markdown.

## `requestDelayMs` (type: `integer`):

Polite rate limit between API requests. Retries with backoff on 429/5xx are automatic.

## Actor input object example

```json
{
  "keywords": [
    "software"
  ],
  "noticeTypes": [
    "Solicitation",
    "Combined Synopsis/Solicitation",
    "Presolicitation",
    "Sources Sought"
  ],
  "naicsPrefixes": [],
  "pscPrefixes": [],
  "agencies": [],
  "setAsides": [],
  "states": [],
  "lastDays": 3,
  "openOnly": false,
  "activeOnly": true,
  "includeDescription": true,
  "maxItems": 100,
  "incremental": false,
  "outputFormat": "json",
  "requestDelayMs": 500
}
```

# Actor output Schema

## `results` (type: `string`):

All results in the default dataset (overview view).

## `runSummary` (type: `string`):

Counts of pushed and skipped (already seen) items.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "keywords": [
        "software"
    ],
    "naicsPrefixes": [],
    "pscPrefixes": [],
    "agencies": [],
    "setAsides": [],
    "states": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("devteamdrew/sam-gov-opportunities").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "keywords": ["software"],
    "naicsPrefixes": [],
    "pscPrefixes": [],
    "agencies": [],
    "setAsides": [],
    "states": [],
}

# Run the Actor and wait for it to finish
run = client.actor("devteamdrew/sam-gov-opportunities").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "keywords": [
    "software"
  ],
  "naicsPrefixes": [],
  "pscPrefixes": [],
  "agencies": [],
  "setAsides": [],
  "states": []
}' |
apify call devteamdrew/sam-gov-opportunities --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,devteamdrew/sam-gov-opportunities"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/vsw8mmJLL249S0KdX/builds/6FLbhINz46v3uNQIe/openapi.json
