# SAM.gov Federal Contract Opportunities (No API Key) (`agentready/sam-gov-opportunities`) Actor

Every US federal contract opportunity from SAM.gov: solicitations, sources sought, presolicitations and awards. Filter by keyword, NAICS, PSC, set-aside, agency, state and deadline, or get only new notices since your last run. No SAM.gov API key or quota needed.

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

## Pricing

from $1.90 / 1,000 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 Federal Contract Opportunities (No API Key)

Get **every US federal contract opportunity** posted on **SAM.gov**: solicitations, sources sought (RFIs), presolicitations, award notices and more, in one clean, flat format. Filter by keyword, NAICS, PSC, set-aside, agency, state and deadline, or turn on **"only new notices"** to get just what was posted since your last run.

**No SAM.gov API key needed and no daily quota.** A personal SAM.gov key allows only about 10 requests a day. This Actor instead reads SAM.gov's official public data extract, which covers every public opportunity, is refreshed nightly, and includes full descriptions.

### What you can do with it

- **Find contracts to bid on:** open small-business IT solicitations in Virginia and Maryland, every morning.
- **Track set-asides:** all SDVOSB, 8(a), HUBZone or WOSB opportunities in your NAICS codes.
- **Research the market:** award notices show who won, when and for how much.
- **Feed an AI agent, CRM or Slack channel** with structured records that include deadlines and points of contact.

### Quick start

Open small-business IT opportunities you can still respond to, posted in the last 7 days:

```json
{
  "naicsCodes": ["5415"],
  "setAsides": ["SBA"],
  "onlyOpenForBids": true
}
```

#### Daily feed of new opportunities

Schedule this every morning. The first run returns everything that matches; after that, only new notices appear, and **you only pay for those**.

```json
{
  "keywords": ["cybersecurity", "zero trust"],
  "noticeTypes": ["solicitation", "sources_sought"],
  "states": ["VA", "MD", "DC"],
  "postedWithinDays": 3,
  "onlyNewNotices": true,
  "stateKey": "dmv-cyber"
}
```

### Input

| Field | What it does |
| --- | --- |
| `keywords` | Whole-word match in the title and (by default) the full description. |
| `naicsCodes` | Industry codes; prefixes work (`5415` matches `541511`, `541512`...). |
| `pscCodes` | Product/Service Codes; prefixes work (`D3`, `R4`, `Y1`...). |
| `noticeTypes` | `solicitation`, `presolicitation`, `sources_sought`, `award`, `special`, `justification`, `other`. Default: the first three (ones you can respond to). |
| `setAsides` | `SBA`, `8A`, `HZC`, `SDVOSBC`, `WOSB`, `EDWOSB`, `NONE` and more. |
| `agencies` | Match department, sub-tier or office names, e.g. `Army`, `Veterans Affairs`. |
| `states` | Place-of-performance state codes. |
| `postedWithinDays` | Default 7. `0` reads the full history back to 2008. |
| `onlyOpenForBids` | Only notices whose response deadline hasn't passed. |
| `includeDescription` / `includeContacts` | Turn off for smaller output. |
| `maxResults` | Default 500. |
| `onlyNewNotices` / `stateKey` | Output only notices not returned in earlier runs under the same key. |

### Output

One record per notice, always with the same fields. Missing values are `null`.

```json
{
  "id": "sam:de6f165e39cf4002a1405eef143fd63c",
  "noticeId": "de6f165e39cf4002a1405eef143fd63c",
  "title": "Y1DA--Drop Ceiling Demo, Disinfect and Replace at the Brooklyn VA Medical Center",
  "solicitationNumber": "36C24226Q0853_0",
  "noticeType": "Combined Synopsis/Solicitation",
  "baseType": "Combined Synopsis/Solicitation",
  "department": "VETERANS AFFAIRS, DEPARTMENT OF",
  "subTier": "VETERANS AFFAIRS, DEPARTMENT OF",
  "office": "242-NETWORK CONTRACT OFFICE 02 (36C242)",
  "officeCode": "36C242",
  "postedAt": "2026-09-28T08:02:39",
  "responseDeadline": "2026-10-05T11:00:00-04:00",
  "archiveDate": "2026-11-30",
  "active": true,
  "setAside": { "code": "SDVOSBC", "name": "Service-Disabled Veteran-Owned Small Business (SDVOSB) Set-Aside (FAR 19.14)" },
  "naicsCode": "236220",
  "pscCode": "Y1DA",
  "placeOfPerformance": { "street": "...800 Poly Place", "city": "Brooklyn", "state": "NY", "zip": "11209", "country": "USA" },
  "award": null,
  "primaryContact": { "title": "Contracting Officer", "name": "...", "email": "...@va.gov", "phone": null },
  "secondaryContact": null,
  "officeAddress": { "city": "ALBANY", "state": "NY", "zip": "12208", "country": "USA" },
  "url": "https://sam.gov/opp/de6f165e39cf4002a1405eef143fd63c/view",
  "additionalInfoLink": null,
  "description": "Amendment 0003... This is a combined synopsis/solicitation for commercial products...",
  "scrapedAt": "2026-09-29T12:00:00Z"
}
```

- `award` holds `{number, date, amount, awardee}` for award notices; `amount` is in US dollars.
- `responseDeadline` keeps the time zone SAM.gov publishes; `postedAt` has no time zone because SAM.gov doesn't give one.
- `primaryContact` and `secondaryContact` are the government points of contact published on the notice. Turn them off with `includeContacts: false`.

Each run also saves a **`RUN_SUMMARY`** record with how many notices were scanned, matched and output, plus the date window used.

### Using it from an AI agent (MCP)

This Actor works as a tool in Claude, Cursor and other MCP clients through [Apify's MCP server](https://mcp.apify.com). For example: *"Use SAM.gov Opportunities to find open SDVOSB construction solicitations in New York."* Keep `maxResults` small and consider `includeDescription: false` for chat use.

### Pricing

You pay **per notice returned**, with no monthly fee and no SAM.gov key. Set a **maximum charge** on any run and the Actor stops cleanly when it's reached.

### Good to know

- SAM.gov refreshes the extract once a night (about 03:30 UTC), so notices posted today appear the next morning. For a same-day feed, run the Actor after 04:00 UTC.
- Attachments (PDFs) aren't included. Use each notice's `url` to open them on SAM.gov.
- A few old notices mix text encodings; the Actor repairs the common cases.

### Data source

Data comes from SAM.gov's public [Contract Opportunities data extract](https://sam.gov/data-services/Contract%20Opportunities/datagov?privacy=Public), published by the U.S. General Services Administration. US federal government data is public. This Actor is not affiliated with or endorsed by GSA or SAM.gov.

### Support

Found a problem or want a field added? Open an issue on the Actor's **Issues** tab.

# Actor input Schema

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

Keep notices whose title (and description, see below) contains any of these words or phrases. Whole words, case-insensitive.

## `searchInDescription` (type: `boolean`):

Match keywords in the full notice description as well as the title.

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

Industry codes. Prefixes work: 5415 matches 541511, 541512 and so on.

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

Product/Service Codes. Prefixes work: D3 matches all IT services codes starting with D3.

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

Which kinds of notice to return. Default: the ones you can respond to.

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

Keep only notices with these set-asides. Leave empty for all.

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

Keep notices whose department, sub-tier or office contains any of these (case-insensitive), e.g. 'Army', 'Veterans Affairs', 'NASA'.

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

2-letter US state codes, e.g. VA, MD, TX. Notices without a place of performance are excluded when this is set.

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

Only notices posted in the last N days. 0 reads the entire history back to 2008 (slower).

## `onlyOpenForBids` (type: `boolean`):

Keep only notices whose response deadline is in the future. Notices without a deadline are excluded.

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

Include the full notice description. Turn off for smaller output.

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

Include the contracting officer contact details published on each notice.

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

Stop after this many notices. 0 means up to 50,000. You can also cap cost with the run's maximum charge.

## `onlyNewNotices` (type: `boolean`):

Remember which notices this account already received and output only new ones. Ideal for scheduled daily runs; you pay only for new notices.

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

Keeps separate 'already seen' lists for different searches. Use a different name for each scheduled search.

## Actor input object example

```json
{
  "keywords": [
    "software"
  ],
  "searchInDescription": true,
  "noticeTypes": [
    "solicitation",
    "presolicitation",
    "sources_sought"
  ],
  "postedWithinDays": 7,
  "onlyOpenForBids": false,
  "includeDescription": true,
  "includeContacts": true,
  "maxResults": 500,
  "onlyNewNotices": false,
  "stateKey": "default"
}
```

# Actor output Schema

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

Every SAM.gov contract opportunity returned by this run, one record per notice.

## `runSummary` (type: `string`):

How many notices were scanned, matched and output, and the date window used.

# 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("agentready/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("agentready/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 agentready/sam-gov-opportunities --silent --output-dataset

```

## MCP server setup

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