# SAM.gov Scraper \[Only $1.5/1K💰] | RFPs | GovCon Leads (`ahmed_jasarevic/sam-scraper`) Actor

Scrape US federal contract opportunities, RFPs & award notices from SAM.gov - no API key. NAICS codes, set-asides, deadlines, agency contacts & descriptions for GovCon lead generation and proposal pipelines. Pay per result.

- **URL**: https://apify.com/ahmed\_jasarevic/sam-scraper.md
- **Developed by:** [Ahmed Jasarevic](https://apify.com/ahmed_jasarevic) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.47 / 1,000 results

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## SAM.gov Scraper — Federal Contract Opportunities, RFPs & GovCon Leads (No API Key)

Scrape US federal contract opportunities, solicitations, RFPs, sources sought, and award notices from **SAM.gov** using its public internal JSON API — **no API key required**. Extract NAICS/PSC codes, set-asides, agency contacts (name, email, phone), response deadlines, place of performance, and full descriptions for **government contracting, business development, and GovCon lead generation**.

### Main Use Cases

- **GovCon lead generation** — monitor solicitations, RFPs, and sources sought matching your capabilities
- **Small business set-aside tracking** — filter 8(a), SBA, WOSB, SDVOSB, HUBZone opportunities
- **Competitive intelligence** — track which agencies are awarding contracts and to whom
- **NAICS-based market research** — study federal demand by industry code and region
- **Proposal pipeline management** — collect deadlines, agencies, contacts, and descriptions for BD teams
- **Federal procurement datasets** — build structured exports (JSON, CSV, Excel) for analysis

### How It Works

SAM.gov is a Drupal-based portal whose search frontend talks to internal JSON endpoints. This actor calls those same public endpoints directly:

- Search: `GET /api/prod/sgs/v1/search` (with `Accept: application/hal+json`)
- Details: `GET /api/prod/opps/v2/opportunities/{id}`

Both return structured JSON with no API key, no anti-bot wall, and no browser rendering — making this the cheapest and most reliable way to pull SAM.gov data at scale. Free users get 10 items per run; paid users can scrape up to 10,000 items per run.

### Track Federal Contract Opportunities Without an Official API Key

SAM.gov's official "Get Opportunities" API exists but requires registering for a free API key and is rate-limited (as low as 10 requests/day on a basic account). This actor bypasses that entirely: it reads the same public JSON endpoints the SAM.gov website itself uses, so you can filter and export contract data immediately — no registration, no key management.

### Input

| Field | Type | Required | Default | Notes |
|-------|------|----------|---------|-------|
| `keywords` | string | no | — | Full-text search on title/description, e.g. "IT services" |
| `noticeType` | string | no | — | Notice type code: `o` solicitation, `p` presolicitation, `k` combined synopsis, `a` award, `r` sources sought, `g` sale of surplus, `s` special notice, `i` intent to bundle |
| `naicsCode` | string | no | — | NAICS industry code, e.g. `541512` |
| `state` | string | no | — | Place of performance state code, e.g. `VA` |
| `country` | string | no | — | Place of performance country |
| `setAside` | string | no | — | Set-aside type: `SBA`, `8A`, `WOSB`, `SDVOSBC`, `HZC` etc. |
| `maxResults` | integer | no | `25` | Max results — free: 10, paid: up to 10,000 |
| `fetchDetails` | boolean | no | `true` | Fetch full detail per opportunity (extra API call per item) |

### Output

Each scraped opportunity includes: `_id`, `title`, `type`/`typeCode` (Solicitation, Presolicitation, Award Notice…), `solicitationNumber`, `responseDate`, `publishDate`, `modifiedDate`, `department`, `agency`, `office`, `naicsCodes`, `setAside`, `setAsideDescription`, `placeOfPerformance` (city/state/country), `contactInfo` (name, email, phone), `descriptionShort`, `descriptionFull` (HTML), and `url` (direct SAM.gov link). See `output_schema.json` for the complete field list.

Download the dataset as JSON, CSV, Excel, or HTML, or stream it via the Apify API.

### Example Input

```json
{
  "keywords": "IT services",
  "noticeType": "o",
  "naicsCode": "541512",
  "maxResults": 50
}
```

Small business set-aside monitor:

```json
{
  "naicsCode": "541611",
  "setAside": "SDVOSBC",
  "state": "VA",
  "maxResults": 100
}
```

### Example Output

```json
{
  "_id": "e5f8a1b2c3d4e5f6a7b8c9d0",
  "title": "Enterprise Software Licensing and Support",
  "type": "Solicitation",
  "typeCode": "o",
  "solicitationNumber": "W1234-26-R-0001",
  "department": "DEPT OF DEFENSE",
  "agency": "DEPT OF THE ARMY",
  "naicsCodes": ["541511"],
  "setAside": "SBA",
  "setAsideDescription": "Total Small Business Set-Aside (FAR 19.5)",
  "placeOfPerformance": "Arlington, VA, USA",
  "responseDate": "2026-08-14T17:00:00-04:00",
  "publishDate": "2026-07-15T10:04:00-04:00",
  "contactInfo": [{ "name": "Jane Doe", "email": "jane.doe@army.mil", "phone": "703-555-0123" }],
  "descriptionShort": "Enterprise software licensing...",
  "descriptionFull": "<p>Full solicitation description...</p>",
  "url": "https://sam.gov/opp/e5f8a1b2c3d4e5f6a7b8c9d0/view"
}
```

### Integrations & Automation

- **Apify API** — call from your BD tools, CRM, or AI agents
- **Apify Schedules** — run daily to catch new solicitations in your NAICS/state/set-aside filters
- **Webhooks** — push new opportunities to CRM, Slack, or email as they post
- **Export** — JSON, CSV, Excel, HTML, XML

**Recommended schedule:** daily monitoring of `keywords` + `setAside` + `state`; the `responseDate` field feeds a prioritized action queue.

### Related Actors

- [SAM.gov Scraper](https://apify.com/jungle_synthesizer/samgov-scraper) — the most-used SAM.gov actor on the Store
- [SAM.gov Contracts Scraper](https://apify.com/themineworks/sam-gov-contracts) — 26-field SAM.gov export, MCP-ready (requires a free API key)
- [SAM.gov Government Contracts Scraper](https://apify.com/automation-lab/samgov-government-contracts-scraper) — agencies, NAICS, contacts, deadlines
- [SAM.gov Scraper - Opportunities & Contacts](https://apify.com/scrapesage/sam-gov-scraper) — full details with attachments
- [Federal Contracts Search](https://apify.com/fortuitous_pirate/sam-gov-scraper) — SAM.gov federal contract opportunities

### FAQ

**Does SAM.gov have an official API?**
Yes — the Get Opportunities Public API (api.sam.gov) requires a free API key and has strict rate limits (as low as 10 requests/day on a basic account). This actor uses SAM.gov's public internal JSON endpoints directly instead, so no API key is needed.

**Why use this actor instead of the "Get Opportunities" API?**
The official API needs registration, an API key, and paginated calls with tight rate limits. This actor hits the same public data the SAM.gov website uses — plain HTTP, no key, no browser — and adds filters (keyword, NAICS, state, set-aside) plus full-detail enrichment in one run.

**What is a set-aside, and which codes exist?**
Set-asides reserve contracts for small-business categories: `SBA`/`SBP` (small business), `8A` (8(a) program), `HZC`/`HZS` (HUBZone), `SDVOSBC`/`SDVOSBS` (service-disabled veteran-owned), `WOSB`/`WOSBSS` (women-owned), `EDWOSB` (economically disadvantaged WOSB), and others (FAR 19.x).

**How do I find federal contract opportunities for my NAICS code?**
Set `naicsCode` to your 6-digit code (e.g. `541512` for IT services) and optionally add `state` and `setAside`. The output includes `responseDate` so you can prioritize upcoming deadlines.

**What is the difference between notice types?**
`o` Solicitation (open call for bids), `p` Presolicitation, `k` Combined Synopsis/Solicitation, `r` Sources Sought (market research), `a` Award Notice (contract awarded), `g` Sale of Surplus Property, `s` Special Notice, `i` Intent to Bundle.

**Where does the data come from?**
All data is read from SAM.gov's public pages and JSON endpoints. SAM.gov is the official U.S. government System for Award Management for federal contracting opportunities.

**How much does it cost?**
Pay-per-result at $1.50 per 1,000 results plus $0.0005 per run start. Free users are capped at 10 items per run; paid users can pull up to 10,000 per run. `fetchDetails` adds one API call per item (slower but with richer data).

### For AI Agents & LLM Apps

**Purpose:** Given optional keyword/NAICS/state/set-aside filters, returns US federal contract opportunities from SAM.gov (title, type, solicitation number, deadlines, agency, contacts, descriptions, URL) — no API key needed.

**Minimal working input:**

```json
{ "maxResults": 10 }
```

**Variant inputs:**

- Keyword search: `{ "keywords": "cybersecurity", "noticeType": "o", "maxResults": 25 }`
- Set-aside + state: `{ "naicsCode": "541611", "setAside": "SDVOSBC", "state": "VA", "maxResults": 50 }`

**Output fields:** `_id`, `title`, `type`, `typeCode`, `solicitationNumber`, `responseDate`, `publishDate`, `modifiedDate`, `department`, `agency`, `office`, `naicsCodes`, `setAside`, `setAsideDescription`, `placeOfPerformance`, `contactInfo` (name/email/phone), `descriptionShort`, `descriptionFull`, `url`.

**Behaviors an agent should know:**

- Free-tier runs are capped at 10 items; set `maxResults` accordingly or note that paid runs are needed above 10
- `fetchDetails: true` (default) adds one API call per opportunity — set it to `false` for faster, cheaper list-only runs
- `noticeType` uses single-letter codes (`o`, `p`, `r`, `a`, `k`, `s`, `g`, `i`) — use the code, not the full name
- Set-aside filters use short codes (`SBA`, `8A`, `WOSB`, `SDVOSBC`, `HZC`) — not descriptions
- `responseDate` is the deadline to prioritize; `publishDate` is when it was posted
- No API key or authentication is required

**Billing:** pay-per-result — $0.0015 per result pushed to the dataset, plus $0.0005 per run start.

### Competitive Positioning

Compared with other SAM.gov actors, verified differences:

| Capability | Other SAM.gov actors | This actor |
|---|---|---|
| API key required | Many (e.g. themineworks/sam-gov-contracts, jungle\_synthesizer) require a free SAM.gov API key | **No API key — uses SAM.gov's public internal JSON API** |
| Free-tier results per run | Often 10–25 | 10 |
| Full detail enrichment | Varies | Optional `fetchDetails` per opportunity |
| Rate limits | Subject to official API limits (10–1,000/day) | Plain HTTP, no official key quota |

### Legal & Compliance Disclaimer

This actor is an independent tool and is not affiliated with, endorsed by, or sponsored by the U.S. General Services Administration, SAM.gov, or the U.S. government. It accesses only publicly available data on SAM.gov — no credentialed access, no private entity data, no login. Output may include public point-of-contact names, emails, and phone numbers published by contracting agencies; this data should not be used for unsolicited commercial outreach in violation of applicable law (e.g. CAN-SPAM, GDPR, TCPA). Users are responsible for complying with SAM.gov's terms of use and applicable law when using or redistributing scraped data.

### SEO Keywords

sam.gov scraper, federal contract opportunities, government contracts leads, sam.gov api alternative, scrape sam.gov, rfp database, federal solicitations, sources sought, award notice scraping, naics code search, set aside contracts, 8(a) set aside, hubzone opportunities, sdvosb contracts, wosb set aside, government procurement data, govcon lead generation, federal rfp monitoring, contracting office data, proposal pipeline data, federal contract dataset, sam.gov public api, business development leads, government contractor outreach, federal opportunities export

# Actor input Schema

## `keywords` (type: `string`):

Search keywords to filter opportunities (e.g., 'IT services', 'construction').

## `noticeType` (type: `string`):

Filter by notice type code: o=Solicitation, p=Presolicitation, k=Combined Synopsis/Solicitation, a=Award Notice, r=Sources Sought, g=Sale of Government Property, s=Special Notice.

## `naicsCode` (type: `string`):

Filter by NAICS code (e.g., '541512' for Computer Systems Design).

## `state` (type: `string`):

Filter by place of performance state (US state code, e.g., 'VA', 'CA').

## `country` (type: `string`):

Filter by place of performance country (e.g., 'USA', 'GBR').

## `setAside` (type: `string`):

Filter by small business set-aside type: SBP=Small Business, SBSB=Small Disadvantaged Business, WOSB=Women-Owned, SDVOSB=Service-Disabled Veteran-Owned, HUB=HUBZone, 8A=8(a).

## `maxResults` (type: `integer`):

Maximum number of opportunities to scrape (free users: max 10).

## `fetchDetails` (type: `boolean`):

If enabled, fetches full details for each opportunity (NAICS, contacts, place of performance). Slower but more complete.

## Actor input object example

```json
{
  "keywords": "",
  "noticeType": "",
  "naicsCode": "",
  "state": "",
  "country": "",
  "setAside": "",
  "maxResults": 25,
  "fetchDetails": true
}
```

# Actor output Schema

## `_id` (type: `string`):

Unique opportunity identifier from SAM.gov

## `title` (type: `string`):

Opportunity title

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

Human-readable notice type

## `typeCode` (type: `string`):

SAM.gov notice type code

## `solicitationNumber` (type: `string`):

Official solicitation or opportunity number

## `responseDate` (type: `string`):

Date/time when responses are due

## `publishDate` (type: `string`):

Date the opportunity was published on SAM.gov

## `modifiedDate` (type: `string`):

Last modified date on SAM.gov

## `department` (type: `string`):

Federal department

## `agency` (type: `string`):

Federal agency

## `office` (type: `string`):

Specific contracting office within the agency

## `url` (type: `string`):

Direct link to the opportunity on SAM.gov

## `isActive` (type: `string`):

Whether the opportunity is currently active

## `descriptionShort` (type: `string`):

Truncated description from the search result

## `descriptionFull` (type: `string`):

Complete opportunity description

## `awardee` (type: `string`):

Name of the awarded contractor, if applicable

## `naicsCodes` (type: `string`):

Comma-separated NAICS industry codes

## `naicsTypes` (type: `string`):

NAICS codes annotated with their type

## `setAside` (type: `string`):

Set-aside eligibility code

## `setAsideDescription` (type: `string`):

Human-readable set-aside type

## `responseDateDetail` (type: `string`):

Response deadline from the full detail API

## `responseTimeZone` (type: `string`):

Time zone for the response deadline

## `contactInfo` (type: `string`):

Point-of-contact details

## `primaryContact` (type: `string`):

Primary point of contact details

## `placeOfPerformance` (type: `string`):

Comma-separated location

## `placeOfPerformanceCity` (type: `string`):

Place of performance city

## `placeOfPerformanceState` (type: `string`):

Place of performance state

## `placeOfPerformanceCountry` (type: `string`):

Place of performance country

## `classificationCode` (type: `string`):

Product/Service Classification code

## `additionalReporting` (type: `string`):

Additional reporting requirements

## `status` (type: `string`):

Opportunity status from SAM.gov

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("ahmed_jasarevic/sam-scraper").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("ahmed_jasarevic/sam-scraper").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 '{}' |
apify call ahmed_jasarevic/sam-scraper --silent --output-dataset

```

## MCP server setup

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

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/FENR9KKsLpMMofr2V/builds/cQtgw4OqNuxxZt3sn/openapi.json
