# SAM.gov Contract Opportunities – No API Key, NAICS & Delta (`knobby_woodworker_aig/sam-gov-contract-opportunities`) Actor

Federal contract opportunities and awards from the official SAM.gov daily extract – no API key, no rate limits. Filter by NAICS, PSC, set-aside, state, agency, keywords, open-only. Adds NAICS titles, SBA size standards, PSC categories, days to deadline. Only-new mode. No officer PII.

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

## Pricing

from $1.50 / 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.

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 – No API Key, NAICS & Delta

Pull **US federal contract opportunities and award notices** from the **official SAM.gov Contract Opportunities data extract**. That's the same daily public file published by GSA. **No SAM.gov API key, no 10-requests-per-day limit, no browser, no proxies.**

### Why this exists: common complaints about SAM.gov tools

| Complaint | How this Actor handles it |
|---|---|
| "You need your own SAM.gov API key", and non-federal keys are limited to about 10 requests/day | Uses the public bulk extract. No key and no daily cap |
| Scrapers break whenever the SAM.gov website changes | Reads the official CSV extract, not the web UI |
| Raw NAICS/PSC codes are meaningless to sales teams | Adds **NAICS titles, NAICS sector, SBA size standard** (e.g. "$34M receipts"), **PSC category** and product/service flag |
| Set-aside text has dozens of variants | `setAsideGroup` normalizes them to small_business / sdvosb / vosb / wosb / hubzone / 8a / indian_economic_enterprise / none |
| Daily runs return the same notices again | **Only-new mode** remembers notice IDs, so you can schedule it daily and get only fresh bids |
| Output is full of contracting officers' personal names, emails and phones | **Contact PII is removed.** Only the agency email domain (e.g. `va.gov`) is kept, for routing |
| Hard to tell what is still biddable | `daysUntilDeadline`, `deadlineStatus` (open / closing_soon / closed) and an `openOnly` filter |

### Filters

- Posted date window (`daysBack` or `postedFrom`/`postedTo`)
- Notice type
- NAICS prefix and PSC prefix
- Set-aside group
- Place-of-performance state
- Agency text
- Keywords
- Active-only and open-only
- Minimum award amount

### Output fields

- **Notice:** `noticeId`, `title`, `solicitationNumber`, `noticeType`, `postedDate`, `responseDeadline`, `daysUntilDeadline`, `deadlineStatus`
- **Agency:** `department`, `subTier`, `office`, agency codes and office location
- **Classification:** `naicsCode`, `naicsTitle`, `naicsSector`, `sbaSizeStandard`, `pscCode`, `pscCategory`, `productOrService`
- **Set-aside:** `setAside`, `setAsideGroup`
- **Place of performance:** city, state, ZIP, country
- **Awards:** `awardNumber`, `awardDate`, `awardAmountUsd`, `awardee` (company), `awardeeState`
- **Links and text:** `samUrl`, `additionalInfoLink`, `description` (optional, truncatable), `descriptionLength`

### Example: daily small-business IT bids in Virginia/Maryland

```json
{ "naicsCodes": ["5415"], "setAsides": ["small_business", "sdvosb"], "states": ["VA", "MD"], "openOnly": true, "onlyNew": true, "daysBack": 3 }
```

### Example: all federal awards over $10M in the extract

```json
{ "daysBack": 0, "noticeTypes": ["Award Notice"], "minAwardUsd": 10000000, "activeOnly": false, "maxItems": 100000 }
```

### Notes

- The source extract is refreshed by SAM.gov once a day (overnight US time). It contains all active notices plus recently archived ones (about 70k rows).
- Speed: the file is ordered newest first, so a 3-day window finishes in seconds.
- The run summary is saved in the `RUN_SUMMARY` record.

### Pricing

Pay per result. You only pay for notices delivered.

# Actor input Schema

## `daysBack` (type: `integer`):

Notices posted in the last N days. 0 = everything in the extract (all active notices plus recent archives).

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

YYYY-MM-DD (overrides Days back).

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

YYYY-MM-DD.

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

Leave empty for all.

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

e.g. 541512, or 5415 for all computer services, 23 for all construction.

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

Product Service Codes, e.g. D3 (IT services), R4, Z2, 70.

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

Leave empty for all.

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

2-letter codes, e.g. VA, MD, TX.

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

Matched against department, sub-tier and office, e.g. VETERANS, NAVY, NASA.

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

Title or description contains any of these (case-insensitive).

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

Skip archived/inactive notices.

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

Keep only opportunities you can still bid on.

## `minAwardUsd` (type: `integer`):

For award notices. Rows without an amount are dropped when set.

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

Full notice description text.

## `maxDescriptionChars` (type: `integer`):

Longer descriptions are truncated; descriptionLength shows the full length.

## `fullScan` (type: `boolean`):

The extract is ordered newest first, so the Actor stops reading once it passes your date window. Turn on to force a full scan.

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

Remember notice IDs between runs and output only notices not seen before. Ideal for daily bid alerts.

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

Named key-value store for delta mode; use one per saved search.

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

Stop after this many rows.

## Actor input object example

```json
{
  "daysBack": 3,
  "naicsCodes": [
    "5415"
  ],
  "activeOnly": true,
  "openOnly": false,
  "includeDescription": true,
  "maxDescriptionChars": 5000,
  "fullScan": false,
  "onlyNew": false,
  "stateStoreName": "sam-gov-opportunities-state",
  "maxItems": 200
}
```

# Actor output Schema

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

No description

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

No description

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

No description

## `all` (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 = {
    "naicsCodes": [
        "5415"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("knobby_woodworker_aig/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 = { "naicsCodes": ["5415"] }

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

```

## MCP server setup

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