# Gov Opportunities Watch: SAM.gov Contracts & Grants.gov (`volutiontech/gov-opportunities-watch`) Actor

New US federal contract bids (SAM.gov) and grants (Grants.gov) in one clean feed, with a new-since-last-run mode for daily alerts. Official APIs; bring your own free SAM.gov key.

- **URL**: https://apify.com/volutiontech/gov-opportunities-watch.md
- **Developed by:** [Ali Murad](https://apify.com/volutiontech) (community)
- **Categories:** Lead generation, Automation, Other
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 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/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

## Gov Opportunities Watch: SAM.gov Contracts & Grants.gov

New US federal **contract opportunities** (SAM.gov) and **grant opportunities** (Grants.gov) in one clean feed. Filter by keyword, NAICS code, agency, set-aside, state and deadline. Schedule it and get only what is **new since your last run**.

**You get:** one row per opportunity with title, agency, type, number, posted date, deadline and days left, set-aside, NAICS, PSC, place of performance, contact, award info (award notices) and a link. Same columns for contracts and grants, so a spreadsheet, CRM or alert flow reads them the same way.

**Price:** $0.005 per opportunity row (pay per event). No rows, no charge. A failed search is free.

**Try it:** leave the prefilled keywords, add your SAM.gov API key (or remove "sam" from Sources to try Grants.gov with no key) and press **Start**.

### Who it is for

Small contractors, GovCon consultants, proposal writers, grant writers and lead-gen agencies who want a daily list of new bids and grants for their niche without paying for a bid-alert subscription.

### Bring your own SAM.gov API key (free)

SAM.gov's Opportunities API needs a personal API key. You make it yourself, it costs nothing:

1. Sign in at sam.gov (free account).
2. Open **Account Details** and find **API Key** (request or view the key).
3. Paste it into the **SAM.gov API key** input. It is a secret field: it is only sent to `api.sam.gov` for your own searches, never saved and never written to logs or output.

SAM.gov limits requests per key and per day (free personal keys have a small daily quota; keys of accounts with a role get a higher one). Each keyword x NAICS search costs one request per 1,000 results. The Actor stops cleanly with a plain message when SAM.gov says the quota is used up, and still returns Grants.gov rows. **Grants.gov needs no key.**

### Input

| Field | What it does |
|---|---|
| Sources | `sam`, `grants` or both |
| SAM.gov API key | Your own key (secret) |
| Keywords | One search per keyword. SAM.gov matches the notice title, Grants.gov title and description |
| NAICS codes | SAM.gov only. One search per code |
| Agency contains | Words in the agency name, either source (Army, Veterans, Health, NASA) |
| Set-aside codes | SAM.gov: SBA, 8A, HZC, SDVOSBC, WOSB, EDWOSB and so on |
| Notice types | SAM.gov: solicitation, presolicitation, sources-sought, award-notice and others |
| States | SAM.gov place of performance, two-letter codes |
| Grant statuses | Grants.gov: posted, forecasted, closed, archived (default posted + forecasted) |
| Posted within the last (days) | 1 to 360, default 7 |
| Deadline within (days) | Keep only opportunities due soon. Ones with no deadline are kept |
| Hide expired | Default on |
| Only new since last run | Return (and pay for) only ids not seen by an earlier run of the same search |
| Max results per search | Cost limit, default 200 |

NAICS, set-aside, state and notice-type filters apply to SAM.gov only; grants have none of those fields.

```json
{
  "sources": ["sam", "grants"],
  "samApiKey": "YOUR-OWN-KEY",
  "keywords": ["cybersecurity", "cloud migration"],
  "naicsCodes": ["541512"],
  "setAsides": ["SBA", "SDVOSBC"],
  "postedWithinDays": 7,
  "onlyNew": true
}
```

### Output

```json
{
  "type": "opportunity",
  "source": "sam",
  "id": "a1b2c3d4e5f60718293a4b5c6d7e8f90",
  "number": "W912DR-26-R-0042",
  "title": "Cybersecurity Assessment Services",
  "kind": "Combined Synopsis/Solicitation",
  "agency": "DEPT OF DEFENSE > DEPT OF THE ARMY > USACE > BALTIMORE DISTRICT",
  "postedDate": "2026-12-03",
  "deadline": "2026-12-19T14:00:00-05:00",
  "daysLeft": 14,
  "setAside": "Total Small Business Set-Aside (FAR 19.5)",
  "setAsideCode": "SBA",
  "naics": "541512",
  "psc": "D302",
  "state": "MD",
  "city": "Baltimore",
  "contact": { "name": "Jane Doe", "email": "jane.doe@usace.army.mil", "phone": "4105551234" },
  "url": "https://sam.gov/opp/a1b2c3d4e5f60718293a4b5c6d7e8f90/view",
  "isNew": true,
  "checkedAt": "2026-12-05T10:00:00.000Z"
}
```

Grant rows have `source: "grants"`, `cfda` (Assistance Listing numbers), `status` (posted/forecasted) and a Grants.gov link. `isNew` is `null` on the first run of a search, then `true` or `false`. Award notices carry `award` (amount, awardee, date).

### Schedule it as an alert

1. Save your input with **Only new since last run** on.
2. Add a daily schedule (Schedules tab).
3. Connect an integration (Email, Slack, Google Sheets, Make, Zapier, n8n) to "run succeeded", reading the dataset.

"New" memory is kept per search in a named key-value store in your own account, so different searches never mix, and nothing is shared with us.

### Data, terms and limits

- Data comes from the official **SAM.gov Opportunities API** and the public **Grants.gov search API**. No scraping, no login to anything but your own key.
- Listings are public US government information; this Actor is not affiliated with or endorsed by GSA, SAM.gov, HHS or Grants.gov. Check the notice on the official site before you bid or apply.
- SAM.gov posted-date windows are limited to one year, so "posted within" stops at 360 days. SAM.gov description text is a separate link (`descriptionUrl`) and needs your key to open; it is not fetched.
- Contact details appear only when SAM.gov publishes them in the notice.

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

Add the Actor in the Apify MCP server and ask for "new small-business cybersecurity solicitations posted this week". The agent passes the input above and reads the dataset rows.

### FAQ

**Do I need a SAM.gov key for grants?** No. Remove `sam` from Sources.

**Why do I get fewer SAM.gov results than on the website?** SAM.gov's `title` search matches notice titles only. Use NAICS codes, or several keywords, for wider coverage.

**What happens when the SAM.gov quota runs out?** You get a warning in the log, SAM.gov rows stop, and Grants.gov rows still arrive. Nothing is charged for failed searches.

**Is my key safe?** It is a secret input, sent only to api.sam.gov, and never logged or stored. You can revoke it in SAM.gov at any time.

# Actor input Schema

## `sources` (type: `array`):

Where to look: sam (federal contract opportunities, needs your SAM.gov API key) and grants (Grants.gov grant opportunities, no key).

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

Your own free SAM.gov API key (SAM.gov account, Account Details, API Key). It is only sent to api.sam.gov and is never saved or logged. Not needed for Grants.gov only.

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

One search per keyword. SAM.gov matches the notice title; Grants.gov matches title and description. Empty means everything in the date range. Up to 20.

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

2 to 6 digit NAICS codes, for example 541512 (computer systems design) or 238220. One search per code (and keyword). SAM.gov only.

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

Keep only opportunities whose agency name contains one of these words, for example Army, Veterans, Health, NASA. Not case-sensitive.

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

SAM.gov set-aside codes, for example SBA (small business), 8A, HZC (HUBZone), SDVOSBC (service-disabled veteran), WOSB, EDWOSB. Several are matched after the search.

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

Keep only these kinds of SAM.gov notices. Empty means all.

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

Two-letter state codes, for example VA, TX, DC.

## `grantStatuses` (type: `array`):

Which grant opportunities to include.

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

Only opportunities posted in this window. 1 to 360.

## `closingWithinDays` (type: `integer`):

Keep only opportunities whose response deadline is within this many days. Opportunities without a deadline are kept. Leave empty for no limit.

## `hideExpired` (type: `boolean`):

Drop opportunities whose deadline has already passed.

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

For scheduled runs: return (and pay for) only opportunities not returned by an earlier run of the same search. The first run of a search returns everything and flags nothing as new.

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

Upper bound per keyword/NAICS search and source. Also limits your cost.

## Actor input object example

```json
{
  "sources": [
    "sam",
    "grants"
  ],
  "keywords": [
    "cybersecurity",
    "cloud migration"
  ],
  "grantStatuses": [
    "posted",
    "forecasted"
  ],
  "postedWithinDays": 7,
  "hideExpired": true,
  "onlyNew": false,
  "maxResults": 200
}
```

# Actor output Schema

## `opportunities` (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 = {
    "sources": [
        "sam",
        "grants"
    ],
    "keywords": [
        "cybersecurity",
        "cloud migration"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("volutiontech/gov-opportunities-watch").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 = {
    "sources": [
        "sam",
        "grants",
    ],
    "keywords": [
        "cybersecurity",
        "cloud migration",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("volutiontech/gov-opportunities-watch").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 '{
  "sources": [
    "sam",
    "grants"
  ],
  "keywords": [
    "cybersecurity",
    "cloud migration"
  ]
}' |
apify call volutiontech/gov-opportunities-watch --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,volutiontech/gov-opportunities-watch"
        }
    }
}
```

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/Oh8MTEnLx9UCEvk9Z/builds/dZQ7pHyWIBv9ntHje/openapi.json
