# Small Business Set-Aside Contracts: SAM.gov 8(a), HUBZone, WOSB (`implementable_antler/small-business-setaside-opportunities`) Actor

Federal contracts set aside for small business (8(a), HUBZone, SDVOSB, WOSB, EDWOSB, total SB) from SAM.gov, with response deadlines, NAICS, agency and place of performance. No API key needed. Optional set-aside award winners from USAspending.gov.

- **URL**: https://apify.com/implementable_antler/small-business-setaside-opportunities.md
- **Developed by:** [Blake Runckel](https://apify.com/implementable_antler) (community)
- **Categories:** Lead generation, Business, Open source
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

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

## Small Business Set-Aside Contracts API: SAM.gov 8(a), HUBZone, SDVOSB, WOSB

Get **open federal contract opportunities set aside for small business** from SAM.gov, filtered by **NAICS code**, **set-aside type** (Total Small Business, **8(a)**, **HUBZone**, **SDVOSB**, **WOSB / EDWOSB**, VOSB, Buy Indian), **agency** (for example **Department of Defense**), place of performance state and keyword. Every row has the **response deadline**, agency, sub-agency, office, NAICS code and description, PSC code, solicitation number and a link to the notice on SAM.gov. Export to CSV, Excel or JSON, or call it as an API.

**No SAM.gov API key and no account needed.** The Actor reads the official SAM.gov Contract Opportunities public data extract that GSA publishes every night. If you have your own SAM.gov API key you can add it to query the live **SAM.gov Get Opportunities API** instead.

There is also an optional **awards** feed with contracts that were already awarded under a set-aside: who won, how much, and when the period of performance ends. That data comes from USAspending.gov.

**Free:** you pay only Apify platform usage (typically well under one cent per run).

### Who it's for

- Small businesses, 8(a) firms, HUBZone firms, SDVOSBs and WOSBs looking for **set-aside contracts in their NAICS codes**
- GovCon business development teams and proposal writers who want a daily **defense contracts by NAICS** feed
- PTAC / APEX Accelerator counselors and SBDCs sending opportunity lists to clients
- Analysts tracking which agencies set work aside, and who wins set-aside awards

### Example output

Input: `{"setAsideTypes": ["SBA","8A","8AN","HZC","SDVOSBC","WOSB","EDWOSB"], "naics": ["541512","236220"], "maxItems": 100}` (run on 2026-10-20)

| postedDate | setAside | title | subAgency | NAICS | state | dueDate |
|---|---|---|---|---|---|---|
| 2026-10-20 | 8A | FCI Three Rivers-Replace Generators, Transformers, and Elect… | Federal Prison System / Bureau of Prisons | 236220 | TX | 2026-11-30 |
| 2026-10-20 | SDVOSBC | Z1DA-- 460-26-004 Wilmington VAMC Roof Replacement | Veterans Affairs | 236220 | DE | 2026-11-04 |
| 2026-10-20 | SDVOSBC | Z2DA--635-21-139 Repair Parking Garage 1 Deficiencies | Veterans Affairs | 236220 | OK | 2026-10-22 |
| 2026-10-20 | SDVOSBC | Z1DZ--Project No. 640A0-27-104, Replace Roof at Building 347 | Veterans Affairs | 236220 | CA | 2026-11-19 |

One full opportunity record:

```json
{
  "recordType": "opportunity",
  "id": "8e499b102f3f43feb9ecb0e430c0e72c",
  "title": "SOURCES SOUGHT FOR INDEFINITE DELIVERY INDEFINITE QUANTITY (IDIQ) MULTIPLE AWARD CONSTRUCTION CONTRACT (MACC) FOR PROJECTS UNDER NAICS 236220 LOCATED WITHIN THE NAVAL FACILITIES ENGINEERING SYSTEMS COMMAND (NAVFAC) NORTHWEST AREA OF RESPONSIBILITY.",
  "description": "This is a Sources Sought Synopsis announcement, a market survey for information to be used for preliminary planning purposes. …",
  "noticeType": "Sources Sought",
  "solicitationNumber": "N44255-27-R-6003",
  "agency": "DEPT OF DEFENSE",
  "subAgency": "DEPT OF THE NAVY",
  "office": "NAVFACSYSCOM NORTHWEST",
  "naicsCode": "236220",
  "naicsDescription": "Commercial and Institutional Building Construction",
  "psc": "Y1JZ",
  "pscDescription": null,
  "setAsideCode": "SBA",
  "setAsideType": "Small Business Set Aside - Total",
  "amount": null,
  "postedDate": "2026-10-20",
  "dueDate": "2026-11-03T14:00:00-08:00",
  "dueDateType": "response_deadline",
  "popCity": "Bremerton",
  "popState": "WA",
  "recipient": null,
  "url": "https://sam.gov/opp/8e499b102f3f43feb9ecb0e430c0e72c/view",
  "source": "SAM.gov Contract Opportunities public extract (GSA)"
}
```

One award record (awards feed, Department of Defense, NAICS 2362; null fields omitted):

```json
{
  "recordType": "award",
  "id": "N6247326F0528",
  "title": "B-175 BARRACKS RENOVATION",
  "noticeType": "Contract award",
  "agency": "Department of Defense",
  "subAgency": "Department of the Navy",
  "naicsCode": "236220",
  "naicsDescription": "Commercial and Institutional Building Construction",
  "psc": "Z2FC",
  "pscDescription": "REPAIR OR ALTERATION OF TROOP HOUSING FACILITIES",
  "setAsideCode": "SBA",
  "setAsideType": "Total Small Business Set-Aside (FAR 19.5)",
  "amount": 1968865.28,
  "postedDate": "2026-07-21",
  "dueDate": "2027-04-02",
  "dueDateType": "period_of_performance_end",
  "popState": "CA",
  "recipient": "DIMENSIONS CONSTRUCTION, INC.",
  "url": "https://www.usaspending.gov/award/CONT_AWD_N6247326F0528_9700_N6247320D1112_9700",
  "source": "USAspending.gov API (Treasury)"
}
```

### Quick start

Defense construction and IT set-asides, open opportunities plus recent set-aside awards:

```json
{
  "feeds": ["opportunities", "awards"],
  "dodOnly": true,
  "naics": ["2362", "541512"],
  "setAsideTypes": ["SBA", "8A", "SDVOSBC"],
  "maxItems": 50
}
```

### Input

| Field | Description |
|---|---|
| `feeds` | `opportunities` (default): open SAM.gov notices. `awards`: set-aside contracts already awarded (USAspending.gov). |
| `setAsideTypes` | SAM.gov set-aside codes: SBA, SBP, 8A, 8AN, HZC, HZS, SDVOSBC, SDVOSBS, WOSB, WOSBSS, EDWOSB, EDWOSBSS, VSA, VSS, ISBEE, IEE, BICiv, LAS. Empty = all. |
| `naics` | 2–6 digit NAICS codes. Shorter codes match as prefixes (`54` = all professional services). |
| `agency` | Department or sub-agency name, e.g. `Department of Defense`, `Veterans Affairs`, `Army`, `Navy`. |
| `dodOnly` | Shortcut for Department of Defense. |
| `states` | Place-of-performance state codes, e.g. `["VA","MD"]`. |
| `keyword` | Matches title or description. |
| `since` | Posted on or after (YYYY-MM-DD). Default: 30 days ago for opportunities, 120 days ago for awards (see FAQ). |
| `openOnly` | Default true: drop notices whose response deadline has passed. |
| `noticeTypes` | Default: Solicitation, Combined Synopsis/Solicitation, Presolicitation, Sources Sought, Special Notice, Amendments. Add `Award Notice` if you want SAM.gov award notices. |
| `latestPerSolicitation` | Default true: SAM.gov posts each amendment as a new notice; keep only the newest per solicitation number. |
| `newAwardsOnly` | Awards feed: only awards first made in the window (skip modifications). |
| `maxItems` | Max records per feed, newest first. |
| `samApiKey` | Optional, secret. Your own SAM.gov public API key. |

### Fields

`recordType` (opportunity / award), `id` (SAM.gov notice ID or award PIID), `title`, `description` (opportunities; first 2,000 characters), `noticeType`, `solicitationNumber`, `agency`, `subAgency`, `office`, `naicsCode`, `naicsDescription`, `psc`, `pscDescription` (awards), `setAsideCode`, `setAsideType`, `amount` (USD; award amount on awards and award notices), `postedDate` (opportunity posted date or award base date), `dueDate`, `dueDateType` (`response_deadline` for opportunities, `period_of_performance_end` for awards), `popCity`, `popState`, `recipient` (awards only), `url`, `source`.

### Opportunities vs. awards

- **Opportunities** are open notices: solicitations, presolicitations, sources sought and special notices that you can still respond to. `dueDate` is the **response deadline** as posted on SAM.gov, with its time zone.
- **Awards** are not open solicitations. They are contracts already awarded under a set-aside, from USAspending.gov. Use them to see who wins set-aside work in your NAICS code, what it pays, and when the current contract ends (`dueDate` = period-of-performance end), which is often when the work is re-competed.

### FAQ

**Do I need a SAM.gov API key?**
No. The default path uses the Contract Opportunities public data extract that GSA publishes for download on SAM.gov (also listed on data.gov). It is refreshed once a day, overnight. If you need notices posted in the last few hours, add your own SAM.gov API key in `samApiKey`. The key is stored as a secret input and is never written to the log. Personal SAM.gov keys can be limited to about 10 requests per day, so the Actor uses at most 10 and falls back to the extract on any error.

**Is this a scraper?**
No. It does not scrape sam.gov pages. SAM.gov's terms prohibit scraping; it uses the official public extract and the official APIs instead.

**Why are recent Department of Defense awards missing?**
USAspending.gov publishes DoD contract data with a delay of about 90 days. So the awards feed looks back 120 days by default. DoD **opportunities** are not delayed.

**Which set-aside codes are which?**
SBA = Total Small Business, SBP = Partial Small Business, 8A = 8(a) competitive, 8AN = 8(a) sole source, HZC/HZS = HUBZone set-aside/sole source, SDVOSBC/SDVOSBS = Service-Disabled Veteran-Owned set-aside/sole source, WOSB/WOSBSS = Women-Owned Small Business, EDWOSB/EDWOSBSS = Economically Disadvantaged WOSB, VSA/VSS = Veteran-Owned (VA only), ISBEE/IEE = Indian Economic Enterprise (Interior), BICiv = Buy Indian (IHS), LAS = Local Area Set-Aside.

**Why are some set-aside notices missing a response deadline?**
Some sources-sought and special notices have no deadline on SAM.gov. They are kept when `openOnly` is on, because they are still active.

**Where are the contracting officer contacts and attachments?**
On the SAM.gov notice page (`url`). This Actor does not copy personal contact details.

**Some award links show "not found" for a day.**
Very new awards can appear in USAspending.gov search a day or so before their detail page is ready.

**How often should I run it?**
Once a day is enough for the free extract. Use Apify Schedules and set `since` to a few days back, or dedupe on `id`.

### Sources and terms

- SAM.gov Contract Opportunities public data extract (GSA): https://sam.gov/data-services/Contract%20Opportunities?privacy=Public and https://catalog.data.gov/dataset/contract-opportunities-from-sam-gov
- SAM.gov Get Opportunities Public API (with your key): https://open.gsa.gov/api/get-opportunities-public-api/
- USAspending.gov API (no key): https://api.usaspending.gov/
- NAICS titles: U.S. Census Bureau 2022 and 2017 NAICS code lists (bundled).

This is U.S. government data. Always confirm deadlines and requirements on the SAM.gov notice before you bid. This is an independent tool by Ledger. It is not affiliated with or endorsed by GSA, SAM.gov, SBA, the U.S. Treasury or USAspending.gov.

### Pricing

Free. You pay only for Apify platform usage.

# Actor input Schema

## `feeds` (type: `array`):

Open opportunities come from SAM.gov. Awards are contracts already awarded under a set-aside (who won, how much, period-of-performance end date); they are not open solicitations.

## `setAsideTypes` (type: `array`):

SAM.gov set-aside codes to include. Empty = all small-business set-aside codes. Notices with no set-aside are never returned.

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

Optional. 2-6 digit NAICS codes; shorter codes match as prefixes (e.g. 2362 = all commercial building construction, 54 = all professional services).

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

Department or sub-agency name, e.g. Department of Defense, Veterans Affairs, Army, Navy, GSA. All words must appear in the department or sub-tier name.

## `dodOnly` (type: `boolean`):

Shortcut for Agency = Department of Defense (ignored if Agency is set).

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

Two-letter state codes, e.g. VA, MD, TX.

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

Case-insensitive match on title or description, e.g. janitorial, cybersecurity, roofing.

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

YYYY-MM-DD. Opportunities posted (or awards made) on or after this date. Default: 30 days ago.

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

Drop opportunities whose response deadline is before today. Notices without a deadline (e.g. some sources-sought and special notices) are kept.

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

SAM.gov notice types to include. Default: solicitations, presolicitations, sources sought, special notices and amendments (no award notices).

## `latestPerSolicitation` (type: `boolean`):

SAM.gov posts each amendment as a new notice. Keep only the newest notice per agency + solicitation number.

## `newAwardsOnly` (type: `boolean`):

Only awards whose base award date is in the window (skips modifications to older contracts).

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

Maximum records per feed, newest first.

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

Optional. Your own SAM.gov public API key queries the live Get Opportunities API instead of the nightly public extract. Personal keys may be limited to ~10 requests/day; the Actor uses at most 10 and falls back to the extract on any error. Never logged.

## Actor input object example

```json
{
  "feeds": [
    "opportunities"
  ],
  "setAsideTypes": [
    "SBA",
    "8A",
    "8AN",
    "HZC",
    "SDVOSBC",
    "WOSB",
    "EDWOSB"
  ],
  "naics": [
    "541512",
    "236220"
  ],
  "dodOnly": false,
  "openOnly": true,
  "noticeTypes": [
    "Solicitation",
    "Combined Synopsis/Solicitation",
    "Presolicitation",
    "Sources Sought",
    "Special Notice",
    "Modification/Amendment/Cancel"
  ],
  "latestPerSolicitation": true,
  "newAwardsOnly": true,
  "maxItems": 100
}
```

# Actor output Schema

## `results` (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 = {
    "feeds": [
        "opportunities"
    ],
    "setAsideTypes": [
        "SBA",
        "8A",
        "8AN",
        "HZC",
        "SDVOSBC",
        "WOSB",
        "EDWOSB"
    ],
    "naics": [
        "541512",
        "236220"
    ],
    "maxItems": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("implementable_antler/small-business-setaside-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 = {
    "feeds": ["opportunities"],
    "setAsideTypes": [
        "SBA",
        "8A",
        "8AN",
        "HZC",
        "SDVOSBC",
        "WOSB",
        "EDWOSB",
    ],
    "naics": [
        "541512",
        "236220",
    ],
    "maxItems": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("implementable_antler/small-business-setaside-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 '{
  "feeds": [
    "opportunities"
  ],
  "setAsideTypes": [
    "SBA",
    "8A",
    "8AN",
    "HZC",
    "SDVOSBC",
    "WOSB",
    "EDWOSB"
  ],
  "naics": [
    "541512",
    "236220"
  ],
  "maxItems": 100
}' |
apify call implementable_antler/small-business-setaside-opportunities --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,implementable_antler/small-business-setaside-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/ZgfVSbNIXk91ggM6z/builds/6iVyJocShRAFaS4L3/openapi.json
