# SAM.gov Scraper (`sleepmodesystems/sam-gov-scraper`) Actor

\[💰 $2.99 / 1K notices] Scrape SAM.gov contract opportunities: all ~44,000 active notices checked in under a minute. Filter by keyword, NAICS, PSC, set-aside, agency, state and deadline. Get descriptions, contacts, attachments and awards. No API key. Export JSON, CSV or Excel.

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

## Pricing

from $2.54 / 1,000 notices

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

**\[💰 $2.99 per 1,000 notices]** The 100 newest notices for a keyword in about 5 seconds; no API key, no SAM.gov account.

The SAM.gov Scraper extracts US federal contract opportunities from SAM.gov (https://sam.gov): solicitations, combined synopsis/solicitations, presolicitations, sources sought, special notices and award notices, with NAICS and PSC codes, set-aside, agency and office, place of performance, contracting officers' emails and phones, the full description, every attachment with a download link, and award amounts with the winner. Every run checks every active notice on SAM.gov against your filters, so nothing is missed, and says how many it found against SAM.gov's own count.

### What does the SAM.gov Scraper extract?

One row per notice. Fill rates over all 44,037 active notices on 2026-11-07:

| Data      | Fields                                                                                     | Filled                                             |
| --------- | ------------------------------------------------------------------------------------------ | -------------------------------------------------- |
| Notice    | `noticeId`, `url`, `title`, `solicitationNumber`, `type`, `postedAt`, `updatedAt`          | 100%                                               |
| Deadline  | `responseDeadline`, `responseTimeZone`, `archiveDate`                                      | 85% (award notices have none)                      |
| Buyer     | `department`, `subTier`, `office`, `officeCode`, `officeLocation`                          | 98%                                                |
| Codes     | `naicsCode` with `naicsTitle`, `pscCode` with `pscTitle`                                   | 95%, 96.5%                                         |
| Set-aside | `setAside` in plain words, `setAsideCode`                                                  | when the notice has one (42%)                      |
| Place     | `placeOfPerformance`: city, state, zip, country                                            | 33% (many notices give none)                       |
| People    | `contacts`: name, title, email, phone of the contracting officers                          | 98.7%                                              |
| Content   | `description` (full text), `attachments` (name, download link, size, date; external links) | 78.5% (empty at the source for most award notices) |
| Award     | `award`: number, date, amount in USD, awardee, awardee UEI                                 | 100% of award notices                              |
| Changes   | `parentNoticeId`, and `changeType` (new or amended) in monitoring runs                     | when it applies                                    |

### Who uses the SAM.gov Scraper?

- **Business development and capture teams** get every new opportunity in their NAICS codes each morning, and decide bid or no-bid with the full text and attachments at hand.
- **Small businesses** filter by their set-aside (8(a), HUBZone, SDVOSB, WOSB) and their state.
- **Subcontractors and teaming partners** read award notices to learn who won what, for how much, and call the winner.
- **Proposal teams** download the statement of work, bid schedule and amendments from one place.
- **Market researchers and analysts** pull every notice of an agency or a code to size a market.
- **GovCon data and lead-generation platforms** feed SAM.gov into their product through the API.
- **AI agents** answer "what opportunities fit my company?" with a call to this actor (see below).

### How much does the SAM.gov Scraper cost?

Pay per event. You pay for each notice written to the dataset, and nothing else: the start fee is a fraction of a cent, and platform usage is included.

| Event                                           | FREE     | BRONZE   | SILVER   | GOLD     |
| ----------------------------------------------- | -------- | -------- | -------- | -------- |
| Notice written to the dataset (per 1,000)       | $2.99    | $2.84    | $2.69    | $2.54    |
| Actor start, per GB of memory (1 GB by default) | $0.00005 | $0.00005 | $0.00005 | $0.00005 |

The tiers are Apify's discount tiers; the PLATINUM and DIAMOND tiers pay the GOLD price.

#### SAM.gov Scraper cost examples

| Scenario                                                  | Notices             | Cost (FREE) | Cost (GOLD) |
| --------------------------------------------------------- | ------------------- | ----------- | ----------- |
| Try it: the 100 newest notices mentioning "software"      | 100                 | $0.30       | $0.25       |
| Award notices of the last 7 days above $1 million         | 161 (2026-11-07)    | $0.48       | $0.41       |
| Every open notice in NAICS 5415 (computer systems design) | 120 (2026-11-07)    | $0.36       | $0.30       |
| Every open opportunity on SAM.gov                         | about 11,000        | $32.89      | $27.94      |
| Every active notice, awards included                      | 44,037 (2026-11-07) | $131.67     | $111.85     |

Set "Maximum notices" to cap a run, and the run's maximum charge in Apify to cap what it can spend: the actor stops cleanly at the limit and says how many notices it delivered.

### How do you use the SAM.gov Scraper with AI agents (Claude, ChatGPT, Cursor)?

The SAM.gov Scraper is a ready tool for AI agents through the [Apify MCP server](https://mcp.apify.com/). Add this server to Claude (desktop, web or Code), ChatGPT, Cursor or any MCP client, and your agent can search federal contract opportunities when you ask:

```
https://mcp.apify.com/?tools=sleepmodesystems/sam-gov-scraper
```

For a client that takes a JSON config:

```json
{
    "mcpServers": {
        "sam-gov": {
            "command": "npx",
            "args": ["-y", "mcp-remote", "https://mcp.apify.com/?tools=sleepmodesystems/sam-gov-scraper"]
        }
    }
}
```

Then ask, for example:

- *"Find open SAM.gov opportunities for cybersecurity services set aside for SDVOSB, and list the deadlines."*
- *"Which janitorial contracts in Texas are still open, and who are the contracting officers?"*
- *"Who won Navy awards over $1 million this week, and for how much?"*

The video shows how to connect Apify to Claude with MCP:

https://www.youtube.com/watch?v=BKu8H91uCTg

#### Why agents should choose the SAM.gov Scraper

- **Complete, and proves it.** Every run checks every active notice against the filters and reports SAM.gov's own count next to the result (`activeOnSamGov`, `matchingYourFilters`, `complete`).
- **Filters an agent can trust.** NAICS, PSC, set-aside, agency, state, dates, deadline and award amount are applied to every notice and covered by tests; codes can be given as plain words ("computer systems design").
- **Never an unexplained empty answer.** When nothing matches, the summary says how many notices each filter removed.
- **Fast enough for a chat.** 100 notices in about 5 seconds; a NAICS search in 4.
- **Errors an agent can act on.** A misspelled agency, state or code stops the run in seconds with "did you mean".
- **Clear price.** $2.99 per 1,000 notices on the FREE tier, $2.54 on GOLD; no API key, no account.

#### Quick reference for AI agents

- **Actor:** `sleepmodesystems/sam-gov-scraper`
- **Does:** returns active SAM.gov contract notices that match filters, one dataset row per notice, newest first.
- **Smallest input:** `{"keywords": ["cybersecurity"], "maxResults": 50}` gives the 50 newest open notices mentioning cybersecurity.
- **By code:** `"naics": ["541512"]` or `"naics": ["computer systems design"]`; `"psc": ["D3"]`.
- **Small business:** `"setAsides": ["SDVOSBC"]` (codes) or plain names via the API: "HUBZone", "8(a)", "WOSB".
- **Awards:** `"noticeTypes": ["award"], "minAwardAmount": 1000000`.
- **Monitoring:** `"onlyNew": true` on a schedule returns only notices no earlier run delivered, amendments marked `changeType: "amended"`.
- **Each row has:** `title`, `solicitationNumber`, `type`, `subTier`, `office`, `responseDeadline`, `naicsCode`, `setAside`, `contacts`, `description`, `attachments`, `award`, `url`.
- **Fields that can be `null`:** `responseDeadline` (awards), `setAside` (none), `placeOfPerformance` (often not given), `description` (empty at the source), `award` (not an award).
- **The run summary** is the `SUMMARY` record in the run's key-value store: `activeOnSamGov`, `matchingYourFilters`, `delivered`, `complete`, `removedByFilter`, `notes`.
- **Zero rows** means no notice matches; `removedByFilter` says which filter removed how many. The run still succeeds.

### How do you configure the SAM.gov Scraper?

Every active SAM.gov notice is checked against your filters. Filters combine: a notice must match all of them. Several values in one filter widen it: NAICS 541512 and 541519 means either.

| Field                                                                      | Type                                                                                                                                                                   | Default                            | Meaning                                                                                 |
| -------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- | --------------------------------------------------------------------------------------- |
| Keywords (`keywords`)                                                      | list of words or phrases                                                                                                                                               | none                               | Searched in the title, full description, solicitation number and agency, as whole words |
| Keyword mode (`keywordMode`)                                               | any, all                                                                                                                                                               | any                                | One keyword is enough, or every keyword must appear                                     |
| Exclude words (`excludeKeywords`)                                          | list of words or phrases                                                                                                                                               | none                               | Leave out notices that mention any of them                                              |
| Keyword list link (`keywordsUrl`)                                          | link                                                                                                                                                                   | none                               | A CSV, a text file or a Google Sheet: every cell becomes a keyword, up to 1,000         |
| NAICS codes (`naics`)                                                      | codes, prefixes, ranges or words                                                                                                                                       | all                                | 541512; 5415 for every code under it; 31-33; "janitorial"                               |
| PSC codes (`psc`)                                                          | codes, prefixes or words                                                                                                                                               | all                                | 7A20; D3 for IT services; "aircraft components"                                         |
| Set-aside (`setAsides`)                                                    | Total Small Business, 8(a), HUBZone, SDVOSB, WOSB, EDWOSB, no set-aside…                                                                                               | all                                | Only notices set aside for these business types                                         |
| Notice types (`noticeTypes`)                                               | Solicitation, Combined synopsis/solicitation, Presolicitation, Sources sought, Special notice, Award notice, Justification, Sale of surplus property, Intent to bundle | the open opportunities (no awards) | Which notices                                                                           |
| Agency (`agencies`)                                                        | names, acronyms or office codes                                                                                                                                        | all                                | "Dept of the Navy", "Veterans Affairs", DoD, N00189                                     |
| Place of performance (`placeOfPerformance`)                                | states or "City, ST"                                                                                                                                                   | all                                | Texas, VA, "San Diego, CA"; the office's place counts when the notice gives none        |
| Posted on or after / before (`postedAfter`, `postedBefore`)                | date                                                                                                                                                                   | none                               | 2026-11-01, or a relative value: 7 days                                                 |
| Response deadline on or after / before (`deadlineAfter`, `deadlineBefore`) | date                                                                                                                                                                   | none                               | 14 days: closing in the next two weeks                                                  |
| Still open for responses (`openOnly`)                                      | true or false                                                                                                                                                          | true                               | Only notices whose deadline has not passed, not canceled                                |
| Award amount (`minAwardAmount`, `maxAwardAmount`)                          | USD                                                                                                                                                                    | none                               | For award notices                                                                       |
| Maximum notices (`maxResults`)                                             | number                                                                                                                                                                 | all (prefilled 100)                | The newest first                                                                        |
| Attachment links (`withAttachments`)                                       | true or false                                                                                                                                                          | true                               | Files with download links, and external links                                           |
| Only new and changed notices (`onlyNew`)                                   | true or false                                                                                                                                                          | false                              | Each run returns only notices no earlier run with the same filters delivered            |
| Monitor name (`monitorName`)                                               | text                                                                                                                                                                   | none                               | Keeps a monitor's memory when you change the filters                                    |
| Notice links (`notices`)                                                   | links or ids                                                                                                                                                           | none                               | Instead of filters: these notices; the newest version is delivered                      |

### How do you find open opportunities in your NAICS codes with the SAM.gov Scraper?

Give your codes, or words from their titles, and keep "Still open" on. 120 open notices matched NAICS 5415 on 2026-11-07, in 4 seconds.

```json
{
    "naics": ["5415"],
    "maxResults": 0
}
```

### How do you get small-business set-aside opportunities with the SAM.gov Scraper?

Pick your set-aside and, if you like, your state. "No set-aside" finds full and open competitions.

```json
{
    "setAsides": ["SDVOSBC", "HZC"],
    "placeOfPerformance": ["Virginia", "Maryland"]
}
```

### How do you see who won federal contracts with the SAM.gov Scraper?

Ask for award notices: each comes with the amount, the awardee and the awardee's Unique Entity ID. 161 awards above $1 million were posted in the 7 days to 2026-11-07.

```json
{
    "noticeTypes": ["award"],
    "minAwardAmount": 1000000,
    "postedAfter": "7 days"
}
```

### How do you find opportunities closing soon with the SAM.gov Scraper?

Set "Response deadline on or before" to a relative value: 14 days gives the notices due in the next two weeks. Add your keywords, all of them required, and the words you never bid on.

```json
{
    "keywords": ["roof", "repair"],
    "keywordMode": "all",
    "excludeKeywords": ["design-build"],
    "deadlineBefore": "14 days"
}
```

A long list of keywords can live in a CSV or a Google Sheet: paste its link in "Keyword list link".

### How do you get new SAM.gov opportunities every day with the SAM.gov Scraper?

Turn on "Only new and changed notices" and schedule the run daily. The first run returns the current notices; each later run returns only what is new since, including new versions of notices you already have (amendments), marked `changeType: "amended"`.

```json
{
    "naics": ["541512", "541519"],
    "onlyNew": true,
    "monitorName": "it-services"
}
```

### Which fields does the SAM.gov Scraper output?

| Field                                                             | Meaning                                                                                    |
| ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
| `noticeId`, `url`                                                 | SAM.gov's id of this version of the notice, and its page                                   |
| `title`, `solicitationNumber`, `type`                             | The notice, its solicitation number (shared by all versions) and type                      |
| `postedAt`, `updatedAt`                                           | When this version was posted, and last changed (UTC)                                       |
| `responseDeadline`, `responseTimeZone`                            | When responses are due, and the time zone the notice states                                |
| `archiveDate`, `canceled`                                         | When SAM.gov archives it; whether it was canceled                                          |
| `department`, `subTier`, `office`, `officeCode`, `officeLocation` | Who buys: DEPT OF DEFENSE, DEPT OF THE NAVY, the contracting office and its code and place |
| `naicsCode`, `naicsTitle`, `naicsCodes`                           | The primary NAICS code with its official title, and every NAICS code of the notice         |
| `pscCode`, `pscTitle`                                             | The product and service code with its official name                                        |
| `setAside`, `setAsideCode`                                        | The set-aside in plain words and as SAM.gov's code                                         |
| `placeOfPerformance`                                              | Street, city, state, zip, country                                                          |
| `contacts`                                                        | The contracting officers: type, name, title, email, phone                                  |
| `description`                                                     | The full description as plain text                                                         |
| `attachments`                                                     | Name, download link, kind (file or link), size, date                                       |
| `award`                                                           | Number, date, amount (USD), awardee, awardee UEI, awardee as SAM.gov writes it             |
| `parentNoticeId`, `changeType`                                    | The notice this one follows; new or amended in monitoring runs                             |
| `scrapedAt`                                                       | When the run read it                                                                       |

#### SAM.gov Scraper output example

```json
{
    "noticeId": "46556e851c3b432b984ba063a9fb7701",
    "url": "https://sam.gov/opp/46556e851c3b432b984ba063a9fb7701/view",
    "title": "Fit Test Machine",
    "solicitationNumber": "FA303027Q0001",
    "type": "Solicitation",
    "postedAt": "2026-11-06T16:36:59+00:00",
    "responseDeadline": "2026-11-18T18:00:00+00:00",
    "responseTimeZone": "America/Chicago",
    "department": "DEPT OF DEFENSE",
    "subTier": "DEPT OF THE AIR FORCE",
    "office": "FA3030 17 CONS CC",
    "officeCode": "FA3030",
    "naicsCode": "334516",
    "naicsTitle": "Analytical Laboratory Instrument Manufacturing",
    "pscCode": "6665",
    "pscTitle": "HAZARD-DETECTING INSTRUMENTS AND APPARATUS",
    "setAside": "Total Small Business",
    "setAsideCode": "SBA",
    "placeOfPerformance": { "street": null, "city": "Goodfellow AFB", "state": "TX", "zip": "76908", "country": "USA" },
    "contacts": [
        { "type": "primary", "name": "Jane Doe", "title": null, "email": "jane.doe@us.af.mil", "phone": "325-000-0000" }
    ],
    "description": "The purpose of this acquisition is to procure five (5) PortaCount Model 8040 Fit Test Machines, inclusive of five-year extended warranties…",
    "attachments": [
        {
            "name": "Statement of Objectives.pdf",
            "url": "https://sam.gov/api/prod/opps/v3/opportunities/resources/files/971ec6e76a4c4999a13476a4b3c02f02/download",
            "kind": "file",
            "sizeBytes": 190342,
            "postedAt": "2026-11-06T16:36:59.284+00:00",
            "description": null
        }
    ],
    "award": null,
    "parentNoticeId": null,
    "scrapedAt": "2026-11-07T20:38:29.000Z"
}
```

Contact names and emails above are placeholders; real rows carry the officers SAM.gov lists.

### How does the SAM.gov Scraper report on its run?

Every run saves a `SUMMARY` record in its key-value store: the active notices SAM.gov lists for the notice types you asked, how many matched your filters, how many were delivered, whether that is complete, and how many notices each filter removed.

```json
{
    "activeOnSamGov": 31732,
    "matchingYourFilters": 0,
    "delivered": 0,
    "complete": true,
    "removedByFilter": {
        "still open (deadline passed)": 20967,
        "NAICS": 10736,
        "set-aside": 29
    },
    "notes": [
        "No notice matched. Of 31,732 active notices of these types, 20,967 by still open (deadline passed), 10,736 by NAICS, 29 by set-aside."
    ]
}
```

That run asked for NAICS 541512 set aside for SDVOSB on 2026-11-07: 29 open notices had the code, none the set-aside. A run with nothing to deliver still succeeds, and says why.

### How does the SAM.gov Scraper compare to other SAM.gov scrapers?

|                                                                              | SAM.gov Scraper | fortuitous_pirate      | scrapesage            |
| ---------------------------------------------------------------------------- | --------------- | ---------------------- | --------------------- |
| Price per 1,000 notices (FREE tier)                                          | $2.99           | $3.00                  | $2.50                 |
| Run success, last 30 days                                                    | new             | 93%                    | 100%                  |
| Checks every active notice, with SAM.gov's own count in the summary          | ✅              | —                      | —                     |
| NAICS, PSC, set-aside, agency, state filters                                 | ✅              | ✅                     | ✅ (no agency, state) |
| NAICS and PSC by words from the official titles                              | ✅              | ❌                     | ❌                    |
| "Still open" by deadline, on by default                                      | ✅              | ❌                     | ❌                    |
| Response deadline window (closing in the next 14 days)                       | ✅              | ✅                     | ✅                    |
| Keywords any or all, excluded words, keyword list from a CSV or Google Sheet | ✅              | ✅ (no excluded words) | —                     |
| Award amount filter                                                          | ✅              | ❌                     | —                     |
| Says which filter removed how many notices                                   | ✅              | —                      | —                     |
| Full description, contacts, attachment links, award amounts                  | ✅              | ✅                     | ✅                    |
| Attachment files downloaded into storage                                     | ❌              | ✅                     | ✅                    |
| Only-new monitor with amendments                                             | ✅              | ✅                     | ❌                    |
| Notice links and solicitation number lookups                                 | ✅              | ✅                     | ✅                    |

Figures read from each actor's public page and input form on 2026-11-07. "—" means the page does not say.

### Things to know about SAM.gov data from the SAM.gov Scraper

- **Many "active" notices are past their deadline.** On 2026-11-07, 20,967 of 31,732 active open-type notices had a deadline that had passed: SAM.gov keeps them until their archive date. "Still open" removes them; turn it off to get them.
- **Every amendment is a new notice version** with its own `noticeId`; the solicitation number stays the same. The actor delivers the latest version, and marks it amended in monitoring runs.
- **Place of performance is often missing** (two notices in three). The place filter then uses the contracting office's place.
- **Some notices carry no description**, mostly award notices; the text is empty on SAM.gov too.
- **NAICS codes from 2017** still appear on some notices; they get their 2017 title.
- **Agency names are written SAM.gov's way:** "DEPT OF THE NAVY", "VETERANS AFFAIRS, DEPARTMENT OF". The agency filter accepts the usual names and acronyms.

### Is it legal to use the SAM.gov Scraper?

SAM.gov is the US government's official site for federal contract opportunities, and its notices are public information, read without logging in. Notices name the contracting officers with their work email and phone, published by the government for vendors to contact: if you store or process them, you are responsible for doing so lawfully, including under the GDPR where it applies. See Apify's [guide to web scraping legality](https://blog.apify.com/is-web-scraping-legal/).

The SAM.gov Scraper is an independent tool by Sleep Mode Systems. It is not affiliated with, endorsed by or sponsored by the U.S. General Services Administration or SAM.gov.

### Frequently asked questions about the SAM.gov Scraper

#### Can I export SAM.gov opportunities to CSV or Excel?

Yes. Every run's dataset downloads as CSV, Excel, JSON or XML from Apify, or through the API.

#### Do I need a SAM.gov account or API key?

No. The actor reads SAM.gov's public notices; there is nothing to register.

#### How often should I run it?

SAM.gov posts about 1,100 to 1,700 notices each weekday. For monitoring, schedule a daily run with "Only new and changed notices"; a run with nothing new costs almost nothing.

#### Does it need proxies?

No. The actor handles access to SAM.gov itself; there is nothing to set up.

#### Can I search by solicitation number?

Yes. Put it in Keywords, or paste the notice's SAM.gov link in "Notice links".

#### Can I schedule it and send results somewhere?

Yes. Use Apify Schedules, and a webhook or integration to send each run's dataset to your CRM, Google Sheets, Slack or email.

#### Does it work with the Apify API and SDK?

Yes. Any Apify client (JavaScript, Python, REST) can start the actor and read the dataset.

#### Can I use the SAM.gov Scraper through an MCP server?

Yes. Add `https://mcp.apify.com/?tools=sleepmodesystems/sam-gov-scraper` to Claude, ChatGPT, Cursor or any MCP client, and ask for opportunities in plain words. The [MCP tab](https://apify.com/sleepmodesystems/sam-gov-scraper/api/mcp) of this actor has the setup for each client. See [How do you use it with AI agents](#how-do-you-use-the-samgov-scraper-with-ai-agents-claude-chatgpt-cursor).

### Other scrapers by Sleep Mode Systems

| Actor                                                            | What it extracts                                                                                 | Price per 1,000, FREE |
| ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | --------------------- |
| [TED EU Tenders Scraper](https://apify.com/sleepmodesystems/ted-eu-tenders-scraper) | EU public tenders and contract awards from TED, CPV by words in any EU language, values in euros | $2.99                 |

### Support for the SAM.gov Scraper

Questions, a missing field, or a custom pipeline on top of this data: write to sleepmodesystems@proton.me. Bugs go in the Issues tab of this actor.

# Actor input Schema

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

Words or phrases searched in the title, the full description, the solicitation number and the agency. A notice matches if it has any of them, as whole words: "cybersecurity", "janitorial services", or a solicitation number such as N0017327Q1301424824.

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

Any: a notice with one of the keywords matches. All: it must have every keyword.

## `excludeKeywords` (type: `array`):

Leave out notices that mention any of these words or phrases: "construction", "brand name".

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

Optional. A link to a CSV, a text file (one keyword per line) or a Google Sheet shared as "Anyone with the link can view": every cell becomes a keyword, added to the ones above. Up to 1,000.

## `naics` (type: `array`):

NAICS codes or the start of one (5415 covers 541511 to 541519), a sector range (31-33), or words from the official titles ("computer systems design", "janitorial"). Older NAICS 2017 codes still on notices work too.

## `psc` (type: `array`):

PSC codes or the start of one (D3 for IT services, 7A20), or words from the official names ("janitorial", "aircraft components").

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

Only notices set aside for these business types. "No set-aside" means full and open competition.

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

Which notices. Empty means the open opportunities: solicitations, combined synopsis/solicitations, presolicitations, sources sought and special notices. Add Award notice for who won and for how much.

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

Department, agency or office, as words or an office code: "Dept of the Navy", "Veterans Affairs", "Army Corps of Engineers", DoD, N00189.

## `placeOfPerformance` (type: `array`):

US states or cities: Texas, VA, "San Diego, CA". Many notices give no place: for those, the contracting office's place counts.

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

Only notices posted on or after this day: 2026-11-01, or a relative value such as 7 days (the last 7 days).

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

Only notices posted on or before this day. With "Posted on or after", a date range.

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

Only notices due on or after this day. Relative values look ahead: 7 days means a week from today.

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

Only notices due on or before this day: 14 days for those closing in the next two weeks.

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

Only notices whose response deadline has not passed, and not canceled. SAM.gov keeps many notices active after their deadline: on 2026-11-07, 21,000 of 32,000. Award notices are not affected.

## `minAwardAmount` (type: `integer`):

For award notices: only awards of at least this many US dollars.

## `maxAwardAmount` (type: `integer`):

For award notices: only awards of at most this many US dollars.

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

The newest notices first. Prefilled with 100 for a quick first test: clear it (or set 0) to get every matching notice.

## `withAttachments` (type: `boolean`):

Each notice's attachments (statement of work, bid schedule, amendments) with a public download link, and its external links.

## `onlyNew` (type: `boolean`):

Each run returns only notices no earlier run with the same filters delivered: new notices, and new versions of notices (amendments, marked changeType: amended).

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

Optional. Give the list of delivered notices a name to keep it when you change the filters, or to keep two monitors of the same filters apart.

## `notices` (type: `array`):

Instead of filters: SAM.gov notice links or ids, such as https://sam.gov/opp/69dc1973eab9446398b008db158cc001/view. When a notice has a newer version, the newest is delivered. Filters are not used with links.

## `minItems` (type: `integer`):

Fail the run if fewer notices were found. 0 by default: a search may rightly find nothing, and the run summary then says which filter removed the notices.

## Actor input object example

```json
{
  "keywords": [
    "software"
  ],
  "keywordMode": "any",
  "excludeKeywords": [],
  "naics": [],
  "psc": [],
  "setAsides": [],
  "noticeTypes": [],
  "agencies": [],
  "placeOfPerformance": [],
  "openOnly": true,
  "maxResults": 100,
  "withAttachments": true,
  "onlyNew": false,
  "notices": [],
  "minItems": 0
}
```

# 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": [
        "software"
    ],
    "maxResults": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("sleepmodesystems/sam-gov-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": ["software"],
    "maxResults": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("sleepmodesystems/sam-gov-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": [
    "software"
  ],
  "maxResults": 100
}' |
apify call sleepmodesystems/sam-gov-scraper --silent --output-dataset

```

## MCP server setup

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