# SAM.gov Contract Opportunities Scraper — US Federal Tenders (`capable_coach/sam-gov-contract-opportunities`) Actor

US federal contract opportunities from SAM.gov's official public data extract (no API key): solicitations, sources sought, presolicitations and award notices with NAICS, PSC, set-aside, agency, deadline, place of performance and award amount. Filter by keyword, NAICS, set-aside, agency, state, date.

- **URL**: https://apify.com/capable_coach/sam-gov-contract-opportunities.md
- **Developed by:** [jules imbert](https://apify.com/capable_coach) (community)
- **Categories:** Lead generation, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.90 / 1,000 contract opportunities

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 Contract Opportunities Scraper: US federal tenders, set-asides and awards

**Get US federal contract opportunities from SAM.gov as clean JSON/CSV/Excel**: solicitations, combined synopsis/solicitations, presolicitations, sources sought, special notices and award notices. Each notice comes with **NAICS, PSC, set-aside, agency/sub-tier/office, response deadline and days left, place of performance, award amount and awardee, and the SAM.gov link**.

The data comes from SAM.gov's **official public data extract** (`ContractOpportunitiesFullCSV`, published by the U.S. General Services Administration and refreshed daily). There's no API key, no login, no browser and no scraping of the website. The roughly 200 MB file is **streamed and filtered on the fly**: it is sorted newest first, so a "last 3 days" run finishes in seconds.

### Use cases

- **Bid alerts for contractors and small businesses**: daily new solicitations for your NAICS codes and set-asides (SBA, 8(a), HUBZone, SDVOSB, WOSB…), sent to Slack, e-mail or a CRM.
- **Capture and BD teams**: pipeline of sources-sought and presolicitation notices to shape opportunities early.
- **GovCon market intelligence**: who is buying what, by agency, NAICS and state; who won (award notices with awardee and amount).
- **Tender aggregators and newsletters**: feed a government-contracts site or a weekly digest.
- **AI agents**: let an assistant search federal opportunities through the Apify MCP server or API.

### How to get SAM.gov opportunities

1. Set **Posted within the last N days** (default 7, prefilled 3).
2. Add filters: **keywords**, **NAICS** or **PSC** prefixes, **set-aside types**, **notice types**, **agencies**, **states**, "response deadline not passed".
3. Click **Start**, then export the dataset or call the Actor via API, Make, Zapier or n8n.
4. For alerts, save a task with **Only new notices since last run** and schedule it daily.

#### Input examples

Small-business IT opportunities still open for response:

```json
{
  "postedWithinDays": 7,
  "naicsCodes": ["5415"],
  "setAsideCodes": ["SBA", "8A", "SDVOSBC"],
  "noticeTypes": ["Solicitation", "Combined Synopsis/Solicitation"],
  "openForResponseOnly": true,
  "maxItems": 500
}
```

Daily janitorial and facilities alerts in Texas and Oklahoma:

```json
{
  "postedWithinDays": 2,
  "keywords": ["janitorial", "custodial", "facility maintenance"],
  "states": ["TX", "OK"],
  "onlyNewSinceLastRun": true,
  "stateKey": "facilities-tx-ok"
}
```

### Output

```json
{
  "noticeId": "34f5c199765542849cee11334d7dcfd8",
  "title": "Pilot Training Transformation Device Support Services IV (PTT DSS IV)",
  "solicitationNumber": "FA300227RDSS4",
  "noticeType": "Combined Synopsis/Solicitation",
  "baseType": "Combined Synopsis/Solicitation",
  "postedDate": "2026-10-26T11:21:41",
  "responseDeadline": "2026-11-25T15:00:00-06:00",
  "daysLeftToRespond": 28,
  "active": true,
  "archiveType": "autocustom",
  "archiveDate": "2027-10-26",
  "department": "DEPT OF DEFENSE",
  "subTier": "DEPT OF THE AIR FORCE",
  "office": "FA3002  338 ESS CC",
  "cgac": "057",
  "fpdsCode": "5700",
  "aacCode": "FA3002",
  "organizationType": "OFFICE",
  "naicsCode": "541519",
  "pscCode": "DB01",
  "setAsideCode": "SBA",
  "setAside": "Small Business Set Aside - Total",
  "placeOfPerformance": { "street": null, "city": null, "state": null, "zip": "78150", "country": null },
  "officeAddress": { "city": "JBSA RANDOLPH", "state": "TX", "zip": "78150-4300", "country": "USA" },
  "award": null,
  "url": "https://sam.gov/workspace/contract/opp/34f5c199765542849cee11334d7dcfd8/view",
  "additionalInfoLink": null,
  "description": "…",
  "source": "SAM.gov Contract Opportunities public data extract (ContractOpportunitiesFullCSV), U.S. General Services Administration",
  "scrapedAt": "2026-10-28T11:04:35.304Z",
  "extractLastModified": "Wed, 28 Oct 2026 03:30:31 GMT"
}
```

Award notices fill `award` with `{ "number", "date", "amountUsd", "awardee" }`. With `includeContacts: true`, a `contacts` array adds the points of contact published on the notice. The dataset has two views, **Overview** and **Awards**. `RUN_STATS` in the key-value store records rows scanned, why the run stopped and the extract's last-modified date.

### Pricing (pay per event)

| Apify plan | Per notice | Per 1,000 |
|---|---|---|
| Free | $0.0015 | $1.50 |
| Starter (Bronze) | $0.00135 | $1.35 |
| Scale (Silver) | $0.001125 | $1.12 |
| Business (Gold) and above | $0.0009 | $0.90 |

Plus **$0.001 per run start**. Discounts apply automatically on paid Apify plans.

So 1,000 notices cost about **$1.50**. Platform usage is included. Rows removed by your filters are never charged. Set **Maximum cost per run** to cap spending.

### Integrations and API

- **API**: run the Actor and read results over HTTP or with the Apify Python and JavaScript clients (see the **API** tab for ready-made code).
- **Schedules**: run it daily or weekly from Apify schedules.
- **Integrations**: send results to Google Sheets, Slack, e-mail, Airtable or a webhook, or connect it to Make, Zapier or n8n.
- **AI agents**: available as a tool through the Apify MCP server.

### FAQ

**Do I need a SAM.gov API key?** No. The public extract is downloadable without a key; the Actor streams it for you.

**How fresh is the data?** SAM.gov regenerates the extract once a day (the run records its `Last-Modified` date). Notices published after that appear in the next day's file. For a minute-by-minute feed you would need the official API with your own key.

**Why is `placeOfPerformance` sometimes empty?** Many notices leave those fields blank in the source; the contracting office address is in `officeAddress`.

**Are descriptions complete?** The description is the text published in the extract. Attachments (RFP PDFs, SOWs) are on the SAM.gov page linked in `url`.

**Can I get the whole history?** Set `postedWithinDays: 0` to scan the whole extract (it also contains older archived notices; slower, about 200 MB).

**Is this legal?** The extract is public U.S. government data provided by GSA for download and reuse. Contacts are excluded by default. Not affiliated with or endorsed by GSA or SAM.gov.

### Other Actors by the same developer

- [France Public Tenders Scraper (BOAMP)](https://apify.com/capable_coach/france-public-tenders): French public procurement notices.
- [France New Companies (BODACC + SIRENE)](https://apify.com/capable_coach/france-new-companies): newly registered French companies.
- [Google Trends Scraper](https://apify.com/capable_coach/google-trends-scraper): interest over time, regions, related queries.

# Actor input Schema

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

Keep notices whose title (and description, see below) contains at least one of these words or phrases, e.g. <code>cybersecurity</code>, <code>janitorial</code>, <code>software</code>. Case insensitive.

## `keywordsInDescription` (type: `boolean`):

If off, keywords are matched against the title only.

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

Keep notices whose NAICS code starts with one of these, e.g. <code>541512</code> (computer systems design) or <code>5415</code> / <code>236</code> for a whole family.

## `pscCodes` (type: `array`):

Product Service Code prefixes, e.g. <code>D3</code> (IT services), <code>R</code> (professional services), <code>Y1</code> (construction).

## `setAsideCodes` (type: `array`):

Keep only these set-asides. Empty = all (including notices without a set-aside).

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

Empty = all types. Pick Solicitation + Combined Synopsis/Solicitation for biddable opportunities, Award Notice for who won.

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

Matched against the department, sub-tier and office names, e.g. <code>defense</code>, <code>veterans affairs</code>, <code>army</code>, <code>NASA</code>.

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

Keep notices whose place of performance or contracting-office state is one of these, e.g. <code>VA</code>, <code>TX</code>.

## `postedWithinDays` (type: `integer`):

Only notices posted in the last N days. The extract is sorted newest first, so small values make runs fast. 0 = the whole extract (slower, ~200 MB).

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

Skip notices SAM.gov flags as inactive.

## `openForResponseOnly` (type: `boolean`):

Keep only notices with a response deadline in the future (drops notices without a deadline, such as most award notices).

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

Include the notice description text published in the extract.

## `includeContacts` (type: `boolean`):

Add the contracting officers' names, e-mails and phones published on the notice. Off by default; only enable it if you have a legitimate use (e.g. responding to the solicitation).

## `onlyNewSinceLastRun` (type: `boolean`):

Remember notice IDs already delivered (named key-value store) and return only new ones. Ideal for daily bid alerts.

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

Name of the memory used by "Only new notices". Use one key per saved task. Leave empty to use the shared default memory. Stored encrypted.

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

Stop after this many matching notices.

## Actor input object example

```json
{
  "keywords": [],
  "keywordsInDescription": true,
  "postedWithinDays": 3,
  "activeOnly": true,
  "openForResponseOnly": false,
  "includeDescription": true,
  "includeContacts": false,
  "onlyNewSinceLastRun": false,
  "maxItems": 100
}
```

# Actor output Schema

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

No description

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

No description

## `runStats` (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": [],
    "postedWithinDays": 3,
    "maxItems": 100
};

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

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

```

## MCP server setup

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