# SAM.gov Tenders Scraper (`piotrv1001/sam-gov-tenders-scraper`) Actor

The SAM.gov Tenders Scraper exports U.S. federal contract opportunities without an API key, capturing agency, deadlines, NAICS, PSC, set-aside, award amount and awardee, public attachment links and optional full amendment history — ideal for government contractors and bid teams.

- **URL**: https://apify.com/piotrv1001/sam-gov-tenders-scraper.md
- **Developed by:** [FalconScrape](https://apify.com/piotrv1001) (community)
- **Categories:** Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 tenders

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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 Tenders Scraper

Search U.S. federal contract opportunities on SAM.gov and export them with their full amendment history. The **SAM.gov Tenders Scraper** collects solicitations, presolicitations, sources sought, special notices and award notices. Each comes with agency, deadlines, NAICS and PSC codes, set-aside, place of performance, award details, description and attachment links. **No SAM.gov API key needed.**

### ✨ Features

- 🔑 **No API key**: Nothing to register or paste. Just run it.
- 🏛️ **Rich notice data**: Department, agency and office, solicitation number, posted and response dates with time zone, NAICS, PSC, set-aside, place of performance and archive date.
- 🏆 **Award details**: Award number, date, amount, awardee name, UEI and CAGE code on award notices.
- 📝 **Amendment history**: Every version of a notice (the original and each amendment) with its date, plus the linked notices of the same procurement, e.g. the presolicitation that came before a solicitation.
- 📎 **Attachments**: Name, size, date and a permanent download link for every public file. Restricted and export-controlled files are listed and marked, never downloaded.
- 🔍 **Filters**: Keywords, notice types, NAICS codes, posted dates and active notices only.
- 🔒 **No personal contacts**: Contact names, emails and phone numbers are not included. They are also removed from the notice text.

### 🛠️ How It Works

1. **Search**: Enter keywords (e.g. `drone`) and/or pick notice types, NAICS codes and posted dates.
2. **Choose the depth**: Turn on **Include amendment history** to add every version of each notice.
3. **Run the scraper**: Get one row per notice, newest first, ready to export as JSON, CSV or Excel.

### 💰 Pricing

| Event             | Price  | When                                                                                       |
| ----------------- | ------ | ------------------------------------------------------------------------------------------ |
| Tender            | $0.002 | Each notice saved                                                                          |
| Amendment history | $0.001 | Each notice saved with its version history (only when **Include amendment history** is on) |

1,000 notices cost $2, or $3 with amendment history.

### 📊 Sample Output Data

With **Include amendment history** on (description shortened):

```json
[
    {
        "noticeId": "63cbb165d7ef42bab58aeea4a850378f",
        "url": "https://sam.gov/opp/63cbb165d7ef42bab58aeea4a850378f/view",
        "title": "Rendezvous, Proximity Operations (RPO) Threat Response (RTR) VICTUS Responsive Launch Space Vehicle (SV)",
        "noticeType": "Sources Sought",
        "solicitationNumber": "SYD89-26-RPO-RLSV",
        "department": "DEPT OF DEFENSE",
        "agency": "DEPT OF THE AIR FORCE",
        "office": "FA8819  SPECIAL PROGRAMS DIR SMC SP",
        "officeCode": "FA8819",
        "postedDate": "2026-09-23T17:45:53.966+00:00",
        "modifiedDate": "2026-09-23T17:45:53+00:00",
        "responseDeadline": "2026-10-19T12:00:00-07:00",
        "responseTimeZone": "America/Los_Angeles",
        "naicsCode": "541715",
        "naicsCodes": ["541715"],
        "pscCode": "1555",
        "setAside": "NONE",
        "placeOfPerformance": {
            "city": null,
            "state": "CA",
            "country": "USA",
            "zip": "90245"
        },
        "awardNumber": null,
        "awardDate": null,
        "awardAmount": null,
        "awardee": null,
        "awardeeUei": null,
        "awardeeCageCode": null,
        "active": true,
        "cancelled": false,
        "archiveDate": "2026-10-20",
        "amendments": 2,
        "description": "The purpose of this RFI is to conduct market research and identify capable industry partners, innovative approaches, and potential solutions for Rendezvous, Proximity Operations, a…",
        "attachments": [
            {
                "name": "RFI for future RPO Threat Response VICTUS Responsive Launch SV_v2-4.pdf",
                "type": "file",
                "sizeBytes": 256874,
                "postedDate": "2026-09-23T17:45:53.966+00:00",
                "access": "public",
                "exportControlled": false,
                "url": "https://sam.gov/api/prod/opps/v3/opportunities/resources/files/157545f9f40e4dedb88c59690307c5bc/download"
            }
        ],
        "versions": [
            {
                "versionId": "7bbab86ed1964f9aa2aae104e8d327fb",
                "url": "https://sam.gov/opp/7bbab86ed1964f9aa2aae104e8d327fb/view",
                "postedDate": "2026-09-18T17:50:45.317+00:00",
                "action": "original",
                "latest": false,
                "cancelled": false,
                "deleted": false
            },
            {
                "versionId": "62446f1684754112be95a66fff02eee3",
                "url": "https://sam.gov/opp/62446f1684754112be95a66fff02eee3/view",
                "postedDate": "2026-09-18T18:14:56.866+00:00",
                "action": "amendment",
                "latest": false,
                "cancelled": false,
                "deleted": false
            },
            {
                "versionId": "63cbb165d7ef42bab58aeea4a850378f",
                "url": "https://sam.gov/opp/63cbb165d7ef42bab58aeea4a850378f/view",
                "postedDate": "2026-09-23T17:45:53.966+00:00",
                "action": "amendment",
                "latest": true,
                "cancelled": false,
                "deleted": false
            }
        ],
        "relatedNotices": [],
        "scrapedAt": "2026-09-24T16:39:19.901Z"
    }
]
```

### ❓ Good to Know

- **SAM.gov returns at most 10,000 notices per search.** For bigger exports, run it several times with different **Posted from/to** dates.
- **`amendments`** counts the changes made to a notice after it was first posted. `versions` lists all of them, oldest first. The last one has `latest: true`.
- **Attachment links** download the file from SAM.gov. Files marked `restricted` require a SAM.gov login and have no link.
- **Set-aside codes** are SAM.gov codes, e.g. `SBA` (total small business), `8A`, `SDVOSBC`, `WOSB`, `HZC`, `NONE`.
- **Archived notices** are skipped unless you turn off **Active notices only**.

Find and track federal contract opportunities with the **SAM.gov Tenders Scraper** today! 🚀

# Actor input Schema

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

Search words, e.g. `drone` or `cybersecurity`. Leave empty to list the newest notices matching the filters below.

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

Only save these notice types. Leave empty for all.

## `naicsCodes` (type: `array`):

Only save notices with these NAICS codes, e.g. `541715`. Leave empty for all.

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

Only save notices posted on or after this date.

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

Only save notices posted on or before this date.

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

Skip archived and inactive notices.

## `includeHistory` (type: `boolean`):

Also save every version of each notice (original and amendments, with dates) and the linked notices of the same procurement, e.g. the presolicitation before a solicitation. Charged as an extra event per notice.

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

Maximum number of notices to save, newest first. One search returns at most 10,000 notices; use dates to split larger exports.

## `proxyConfiguration` (type: `object`):

Proxy servers used to reach SAM.gov.

## Actor input object example

```json
{
  "keywords": "drone",
  "activeOnly": true,
  "includeHistory": false,
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

No description

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

No description

# 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": "drone",
    "maxItems": 50,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("piotrv1001/sam-gov-tenders-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 = {
    "keywords": "drone",
    "maxItems": 50,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("piotrv1001/sam-gov-tenders-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 '{
  "keywords": "drone",
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call piotrv1001/sam-gov-tenders-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,piotrv1001/sam-gov-tenders-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/1pMFNSPQH8Z3ttw5u/builds/cuggkLA0pdt02akFf/openapi.json
