# SAM.gov Federal Contract Opportunities & Awards API (`practicalmodules/sam-gov-opportunities`) Actor

Search US federal contract opportunities, solicitations, RFPs, sources sought and award notices from SAM.gov. Filter by keyword, NAICS, PSC, set-aside, agency and state. No login or API key. Monitor mode returns only new notices.

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

## Pricing

$2.50 / 1,000 notice delivereds

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 Federal Contract Opportunities & Awards API

Search every US federal contract opportunity published on **SAM.gov** — solicitations, RFPs, RFQs, sources sought, presolicitations, special notices and award notices — and get them back as clean, flat JSON, CSV or Excel.

No SAM.gov login, no API key, no browser. The Actor streams the official public daily extract straight from GSA, so a default run finishes in a few seconds.

```json
{
  "keywords": ["cybersecurity"],
  "naicsCodes": ["5415"],
  "states": ["VA", "MD", "DC"],
  "activeOnly": true,
  "maxResults": 100
}
```

### Why use it

- **Everything SAM publishes, in one flat row per notice.** 39 documented fields: agency, office, NAICS, PSC, set-aside, place of performance, deadline, archive date, award number, awardee and amount.
- **Codes you can actually read.** Every notice carries `naicsSector` and `pscCategory` labels next to the raw codes, so "Q201" arrives as "Medical Services" and you can group results without a lookup table.
- **Real filters, applied before you pay.** Keyword and exclude-keyword, NAICS and PSC prefixes, set-aside programs, agency, US state, notice category, minimum award amount.
- **Amendments are collapsed.** Agencies re-post an amended notice under a new notice ID with the same solicitation number. By default you get the current version only, instead of paying three times for the same tender.
- **Monitor mode.** `onlyNew` remembers what earlier runs with the same filters returned and delivers only what is new, so a daily schedule costs you only new notices.
- **No personal data.** The official solicitation email is included so you can ask questions and submit. Contracting officer names, phone and fax numbers are deliberately not extracted.

### Use cases

- **Bid pipeline:** a daily feed of new solicitations matching your NAICS codes and set-aside eligibility.
- **Competitor and market research:** pull award notices to see who wins what, for how much, at which agency.
- **Capture planning:** track sources sought and presolicitations months before the RFP drops.
- **Teaming:** find prime opportunities in your state and PSC category.
- **Feed an AI agent or CRM:** a stable, documented schema with one source URL per notice.

### Ready-made searches

Run one of these presets as-is, or open it and change the filters:

| Preset | What it returns |
|---|---|
| [Federal IT & software contracts](https://apify.com/practicalmodules/sam-gov-opportunities/federal-it-software-contracts) | Software, IT services, cloud and cybersecurity — solicitations plus sources sought (NAICS 5112, 5182, 5415) |
| [Small business set-aside contracts](https://apify.com/practicalmodules/sam-gov-opportunities/small-business-set-aside-contracts) | Opportunities reserved for small business, 8(a), HUBZone, SDVOSB, WOSB and EDWOSB |
| [Federal construction contracts](https://apify.com/practicalmodules/sam-gov-opportunities/federal-construction-contracts) | Construction, renovation and facilities work (NAICS 236–238, PSC Y and Z) |
| [Federal contract awards](https://apify.com/practicalmodules/sam-gov-opportunities/federal-contract-awards) | Who won, contract number, dollar amount and award date, over the last 30 days |

### Input examples

**Run with defaults** — the 100 newest active solicitations from the last 3 days:

```json
{}
```

**IT services for a small business in the DC area:**

```json
{
  "naicsCodes": ["5415", "5182"],
  "pscCodes": ["D"],
  "states": ["VA", "MD", "DC"],
  "onlySetAside": true,
  "postedWithinDays": 7,
  "maxResults": 200
}
```

**Daily monitor for construction opportunities, on a schedule:**

```json
{
  "naicsCodes": ["236", "237", "238"],
  "noticeCategories": ["opportunity", "planning"],
  "postedWithinDays": 2,
  "onlyNew": true,
  "maxResults": 500
}
```

**Who won what at the VA, over $1M:**

```json
{
  "noticeCategories": ["award"],
  "agencies": ["VETERANS AFFAIRS"],
  "minAwardAmount": 1000000,
  "postedWithinDays": 90,
  "activeOnly": false,
  "maxResults": 1000
}
```

#### All inputs

| Input | Type | Default | What it does |
|---|---|---|---|
| `keywords` | array | – | Title or description contains any of these words |
| `excludeKeywords` | array | – | Drop notices mentioning any of these words |
| `naicsCodes` | array | – | NAICS codes or prefixes; `541` includes `541511` |
| `pscCodes` | array | – | PSC/FSC codes or prefixes; `D` = all IT services |
| `noticeCategories` | array | `["opportunity"]` | `opportunity`, `planning`, `award`, `other` |
| `postedWithinDays` | integer | `3` | How far back to search, 1–365 |
| `activeOnly` | boolean | `true` | Drop archived notices and passed deadlines |
| `onlySetAside` | boolean | `false` | Only small-business and similar set-asides |
| `setAsideCodes` | array | – | Exact codes, e.g. `SBA`, `8A`, `HZC`, `SDVOSBC`, `WOSB` |
| `agencies` | array | – | Substring match on department, sub-tier or office |
| `states` | array | – | 2-letter state codes; place of performance, else office |
| `minAwardAmount` | integer | – | Awards only: skip anything below this USD amount |
| `latestPerSolicitation` | boolean | `true` | Collapse amended re-posts to the newest version |
| `onlyNew` | boolean | `false` | Monitor mode: only notices not seen in earlier runs |
| `maxResults` | integer | `100` | Stop after this many notices |

### Output

One flat object per notice. Example:

```json
{
  "noticeId": "bd9a807967684cbfac5c529dbfda8738",
  "solicitationNumber": "36C24426Q0950",
  "title": "Q201--Post-Op Medical Companion Services at VA Pittsburgh Healthcare Center",
  "description": "Please see amendment 0004.",
  "noticeType": "Combined Synopsis/Solicitation",
  "noticeCategory": "opportunity",
  "baseType": "Combined Synopsis/Solicitation",
  "isActive": true,
  "department": "VETERANS AFFAIRS, DEPARTMENT OF",
  "subTier": "VETERANS AFFAIRS, DEPARTMENT OF",
  "office": "244-NETWORK CONTRACT OFFICE 4 (36C244)",
  "organizationType": "OFFICE",
  "officeCity": "PITTSBURGH",
  "officeState": "PA",
  "officeZip": "15215",
  "officeCountry": "USA",
  "naicsCode": "621610",
  "naicsSector": "Health Care and Social Assistance",
  "pscCode": "Q201",
  "pscCategory": "Medical Services",
  "setAsideCode": "SDVOSBC",
  "setAside": "Service-Disabled Veteran-Owned Small Business (SDVOSB) Set-Aside (FAR 19.14)",
  "isSetAside": true,
  "placeOfPerformance": null,
  "placeOfPerformanceState": null,
  "placeOfPerformanceCountry": null,
  "postedDate": "2026-09-27",
  "responseDeadline": "2026-09-29T23:59:00-04:00",
  "daysUntilDeadline": 1,
  "archiveDate": "2026-11-28",
  "archiveType": "autocustom",
  "awardNumber": null,
  "awardDate": null,
  "awardAmount": null,
  "awardee": null,
  "buyerContactEmail": "eleanor.robbins@va.gov",
  "url": "https://sam.gov/opp/bd9a807967684cbfac5c529dbfda8738/view",
  "additionalInfoLink": null,
  "scrapedAt": "2026-09-28T22:15:46.445Z"
}
```

Every field is documented in the dataset schema, and the dataset has two ready-made views: **Opportunities** and **Awards** (winner, contract number, amount). Download as JSON, CSV, Excel or HTML, or fetch through the Apify API.

### Pricing

You pay **per notice delivered**, with no subscription. In monitor mode you pay only for notices that are new to you, and amendments of a notice you already have are free because they are collapsed. Set *Maximum results* or a maximum cost per run to cap spending.

### Data source & licence

Data comes from the **SAM.gov Contract Opportunities public data extract**, published by the US General Services Administration at [sam.gov/data-services](https://sam.gov/data-services/Contract%20Opportunities/datagov) and mirrored on data.gov. It is a public, unauthenticated file: no login, no API key, no rate limit, and no terms restricting reuse.

Works of the US federal government are not subject to copyright in the United States (17 U.S.C. § 105) and are in the public domain, so commercial reuse is permitted. Checked 2026-09-28: the extract carries no additional licence or non-commercial restriction.

This Actor is not affiliated with, endorsed by or sponsored by SAM.gov, GSA or any US government agency. Always check the official notice on SAM.gov before bidding.

### FAQ

**How fresh is the data?** SAM.gov rebuilds the public extract every morning (US Eastern time), so notices appear within a day of being posted. `postedDate` tells you exactly when each one went up.

**Do I need a SAM.gov account or API key?** No. This uses the public extract, so there is nothing to register, no key to rotate and no rate limit to hit.

**Why is `placeOfPerformance` often empty?** Most agencies leave those columns blank in the extract. When they do, the `states` filter falls back to the contracting office's state, and `officeState` is always populated.

**Why is `awardAmount` null on an award notice?** Some agencies publish the award without a dollar figure. Placeholder values of $1 or less are treated as unpublished.

**Are attachments included?** Attachment files are not in the public extract. `url` links to the notice page on SAM.gov where the attachments live, and `additionalInfoLink` holds any extra link the agency published.

**Does this cover state and local contracts?** No, SAM.gov is federal. For EU, UK and a merged US feed, see our [Government Tenders API](https://apify.com/practicalmodules/eu-uk-tenders).

**Why don't you return contracting officer names and phone numbers?** Deliberate policy: we publish the official solicitation email, which is the channel agencies ask you to use, but we don't harvest individuals' personal contact details.

**Something broke or a field is missing?** Open an issue on the Issues tab. Issues are answered quickly.

# Actor input Schema

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

Return notices that mention any of these words in the title or description, e.g. "cybersecurity", "janitorial", "drone". Leave empty for all notices.

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

Drop notices that mention any of these words, e.g. "ammunition", "classified". Useful for cutting noise out of a broad keyword search.

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

NAICS industry codes or prefixes. Sub-codes are included, e.g. "541" = all professional/scientific/technical services, "541511" = custom computer programming, "236" = building construction, "561720" = janitorial services.

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

Product Service Codes or prefixes. Letters are services, numbers are products, e.g. "D" = all IT and telecom services, "D307" = IT systems development, "R" = professional support, "70" = IT equipment, "Y" = construction. Combines with NAICS using AND, so a notice must match both when you set both.

## `noticeCategories` (type: `array`):

Which kinds of notice to return. Opportunities are Solicitations and Combined Synopsis/Solicitations - the ones you can bid on today. Planning covers Presolicitation, Sources Sought and Special Notices. Awards show who won and for how much.

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

How far back to search. For a daily schedule use 2 together with "Only new notices".

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

Keep only notices SAM.gov still flags as active, and drop any whose response deadline has already passed.

## `onlySetAside` (type: `boolean`):

Keep only notices reserved for small business, 8(a), HUBZone, SDVOSB, WOSB and similar programs. Turn off to include full and open competitions.

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

Exact SAM.gov set-aside codes, e.g. SBA (total small business), 8A, 8AN, HZC/HZS (HUBZone), SDVOSBC/SDVOSBS, WOSB, EDWOSB, VSA/VSS (veteran-owned, VA). Leave empty for any.

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

Match part of the department, sub-tier or office name, e.g. "VETERANS AFFAIRS", "NAVY", "GENERAL SERVICES". Case-insensitive, any match wins.

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

2-letter state codes, e.g. TX, CA, VA. Matches the place of performance or, when that is missing, the contracting office's state.

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

Only relevant for awards: skip awards below this dollar amount. Notices with no published amount are skipped when this is set.

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

Agencies re-post an amended notice under a new notice ID but the same solicitation number. Keep only the most recent version of each solicitation, so you don't pay for the same tender several times.

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

Remember which notices earlier runs with the same filters returned, and deliver only ones you have not seen. Ideal for a daily schedule - you only pay for new notices.

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

Stop after this many notices. You pay per notice delivered.

## Actor input object example

```json
{
  "keywords": [
    "software"
  ],
  "noticeCategories": [
    "opportunity"
  ],
  "postedWithinDays": 3,
  "activeOnly": true,
  "onlySetAside": false,
  "latestPerSolicitation": true,
  "onlyNew": false,
  "maxResults": 100
}
```

# Actor output Schema

## `opportunities` (type: `string`):

All delivered notices in a table: posted date, deadline, title, agency, NAICS, PSC category, set-aside, state and link.

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

The same notices with the winning company, contract number and dollar amount. Most useful with the 'award' notice category.

# 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"
    ]
};

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

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

```

## MCP server setup

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