# SAM.gov & Grants.gov RFP Scraper & MCP Server (US Gov Bids) (`edmarsantos/us-gov-rfp-grant-radar`) Actor

Search active US federal contract RFPs on SAM.gov and federal grants on Grants.gov. Clean JSON output & MCP server for Claude, Cursor, n8n, and GovCon BD.

- **URL**: https://apify.com/edmarsantos/us-gov-rfp-grant-radar.md
- **Developed by:** [Edmar Santos](https://apify.com/edmarsantos) (community)
- **Categories:** MCP servers, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

## 🇺🇸 US Gov RFP & Grant Radar — SAM.gov & Grants.gov RFP Scraper & MCP Server

> 🔗 **Want to see which competitors won past federal contracts and for how much?** Pair this
> Actor with [US Gov Contract Awards & Competitor Intelligence](https://apify.com/edmarsantos/us-gov-award-competitor-intel).
> This Actor finds the opportunity *before* award — that one tells you who *won* it. Then pull
> the winner's own financials with [US SEC EDGAR Filings & Financial Intelligence](https://apify.com/edmarsantos/sec-edgar-filings-mcp).

**Find US federal contracts and grants before your competitors do.** This Actor scans
[SAM.gov](https://sam.gov) (federal contract RFPs) and [Grants.gov](https://grants.gov)
(federal grant opportunities) by keyword, NAICS code, and set-aside type — then returns a
clean, **normalized, LLM-ready feed** you can drop straight into a spreadsheet, a CRM, or an
AI agent.

> Built for government contractors, grant writers, capture teams, and AI agents that need
> live federal opportunity data without wrangling two very different government APIs.

***

### ⚡ Quick Start: Connect to Claude Desktop, Cursor & n8n in 60 Seconds

**Answer Capsule:** To pull live SAM.gov and Grants.gov data into Claude Desktop, Cursor, or
n8n, point an MCP client at `https://mcp.apify.com` with this Actor selected — no local
server, scraper, or government API key setup required for Grants.gov. Paste one JSON config
block, add your Apify token, restart the client, and ask for opportunities in plain English.

**Claude Desktop / Cursor (MCP):** add this to your `claude_desktop_config.json`
(Claude Desktop) or `~/.cursor/mcp.json` (Cursor) — a ready-to-copy version lives at
[`examples/claude_desktop_config.json`](./examples/claude_desktop_config.json):

```json
{
  "mcpServers": {
    "apify-us-gov-rfp-grant-radar": {
      "command": "npx",
      "args": ["-y", "@apify/actors-mcp-server", "--actors", "edmarsantos/us-gov-rfp-grant-radar"],
      "env": { "APIFY_TOKEN": "YOUR_APIFY_TOKEN" }
    }
  }
}
```

Replace `YOUR_APIFY_TOKEN` with a token from [Apify Console → Settings → Integrations](https://console.apify.com/account/integrations),
restart Claude Desktop or Cursor, then just ask: *"Find federal cybersecurity contracts posted
in the last 14 days set aside for small businesses."*

**n8n:** import [`examples/n8n-govcon-daily-radar-workflow.json`](./examples/n8n-govcon-daily-radar-workflow.json)
(Workflows → Import from File). It wires up a **daily Schedule Trigger → HTTP Request to the
Apify API → deadline filter → Slack/Email alert**, so you get pinged only when a new
opportunity's deadline is within 7 days. Swap in your Apify token and Slack/SMTP credentials
and you're live.

***

### ✨ Why use this Actor

**Answer Capsule:** SAM.gov and Grants.gov expose two incompatible JSON schemas, inconsistent
HTML-laden descriptions, and separate pagination logic. This Actor merges both into one
normalized, LLM-ready feed with built-in caching, NAICS/set-aside filtering, and native MCP
support — so you (or your agent) query one tool instead of reverse-engineering two government
APIs.

- **Two sources, one schema.** SAM.gov and Grants.gov return wildly different JSON. This Actor
  maps both into a single, predictable record shape.
- **LLM-ready output.** HTML stripped from summaries and clamped to 1,000 characters — perfect
  for feeding into Claude, GPT, or any RAG pipeline without burning tokens.
- **Targeted search.** Filter by `keywords`, `naicsCode`, and `setAsideCode` (SBA, 8A, WOSB,
  SDVOSB, HUBZone…).
- **Fast & cheap.** Built-in 2-hour result cache avoids redundant API calls.
- **MCP-ready.** Call it directly from Claude Desktop, Cursor, or n8n via
  [`mcp.apify.com`](https://mcp.apify.com).
- **No SAM.gov key? No problem.** Grants.gov needs no API key. SAM.gov is simply skipped (with a
  clear log message) if you don't provide one.

***

### 🆚 Raw Government Portal vs. This Apify MCP Server

**Answer Capsule:** Querying SAM.gov and Grants.gov directly means two accounts, two schemas,
manual HTML cleanup, and your own pagination and caching code — typically a day or more of
integration work. This Actor replaces all of that with one normalized endpoint you can call
from an AI agent or workflow tool in under a minute, at a fraction of the cost of building and
hosting it yourself.

| Aspect | Raw SAM.gov + Grants.gov APIs | This Apify MCP Server |
| --- | --- | --- |
| Setup time | Create 2 separate accounts; SAM.gov API key approval can take days; learn 2 schemas | ~60 seconds — one Apify token, one MCP config block |
| HTML/text cleanup | Descriptions ship with embedded HTML and inconsistent fields per source | Pre-stripped, clamped to 1,000 characters, one normalized schema for both sources |
| Pagination | You implement offset/cursor logic separately for each API | Handled internally — just set `maxResults` |
| Caching | None — every call hits the live government API | Built-in 2-hour cache avoids duplicate charges and load |
| Cost | Free API, but you build, host, and maintain your own integration | Pay-per-event (~$0.03/source query + $0.01/item) — no infrastructure to run |

***

### 🧾 Input

**Answer Capsule:** This Actor takes a search `keywords` string plus optional filters —
`sources`, `naicsCode`, `setAsideCode`, `daysBack`, and `maxResults` — so you can narrow
results to a specific industry, set-aside type, or lookback window without writing any query
logic yourself.

| Field          | Type     | Required | Default                      | Description |
| -------------- | -------- | :------: | ---------------------------- | ----------- |
| `keywords`     | string   |   ✅     | `"cybersecurity"`            | Search term, e.g. `"cybersecurity"`. Falls back to `"cybersecurity"` if left empty. |
| `sources`      | array    |          | `["sam_gov", "grants_gov"]`  | Any of `sam_gov`, `grants_gov`. |
| `naicsCode`    | string   |          | —                            | NAICS industry code for SAM.gov, e.g. `"541511"`. |
| `setAsideCode` | string   |          | —                            | SAM.gov set-aside, e.g. `"SBA"`, `"8A"`, `"WOSB"`, `"SDVOSB"`. |
| `daysBack`     | integer  |          | `14`                         | Look-back window in days (1–90). |
| `maxResults`   | integer  |          | `25`                         | Max results per source (1–100). |
| `samApiKey`    | string 🔒 |          | —                            | Your SAM.gov API key (secret). Falls back to the `SAM_API_KEY` env var. |

#### Example input

```json
{
  "keywords": "artificial intelligence",
  "sources": ["sam_gov", "grants_gov"],
  "naicsCode": "541511",
  "setAsideCode": "SBA",
  "daysBack": 14,
  "maxResults": 25
}
```

***

### 📤 Output

**Answer Capsule:** Every result — whether it came from SAM.gov or Grants.gov — is returned as
one flat JSON record with the same fields: opportunity ID, title, agency, type, NAICS/CFDA
code, set-aside, dates, point of contact, an HTML-free summary, and a direct link to the
official listing.

Each dataset item is normalized to the same shape, regardless of source:

```json
{
  "opportunityId": "abc123",
  "source": "sam_gov",
  "title": "AI/ML Research Support Services",
  "agency": "DEPT OF DEFENSE / DARPA",
  "type": "Solicitation",
  "naicsOrCfda": "541511",
  "setAside": "Total Small Business Set-Aside (FAR 19.5)",
  "postedDate": "2026-11-10",
  "responseDeadline": "2026-12-05T17:00:00-05:00",
  "estimatedAwardCeiling": "5000000",
  "pointOfContact": { "name": "Jane Doe", "email": "jane.doe@agency.gov", "phone": "+1-202-555-0100" },
  "summary": "Short, HTML-free description capped at 1000 characters…",
  "officialUrl": "https://sam.gov/opp/abc123/view"
}
```

***

### 🔑 Getting a SAM.gov API key (optional)

**Answer Capsule:** No, a SAM.gov API key is optional. Grants.gov results work with zero
configuration. If you also want SAM.gov contract RFPs, generate a free key from your SAM.gov
account in under two minutes and pass it as input — if you skip this step, the Actor simply
logs a notice and returns Grants.gov results only.

1. Create / sign in to an account at [sam.gov](https://sam.gov).
2. Go to **Account Details → API Key** and generate a key.
3. Paste it into the `samApiKey` input field (stored as a secret), or set the `SAM_API_KEY`
   environment variable.

Grants.gov requires **no** API key.

***

### 🤖 Use it as an MCP tool (Claude, Cursor, n8n)

**Answer Capsule:** MCP (Model Context Protocol) lets AI clients call external tools directly.
This Actor is published on Apify's hosted MCP gateway, so Claude Desktop, Cursor, Windsurf, or
any MCP-compatible agent can call it as a native tool — no custom server code, webhook, or
SDK required on your end.

This Actor is exposed through [`mcp.apify.com`](https://mcp.apify.com), so any MCP-compatible
client can call it as a tool. See the **Quick Start** section above and the
[`examples/`](./examples) folder for ready-to-use configs.

**Claude Desktop / Cursor:** [`examples/claude_desktop_config.json`](./examples/claude_desktop_config.json)
(see Quick Start above).

**n8n:** [`examples/n8n-govcon-daily-radar-workflow.json`](./examples/n8n-govcon-daily-radar-workflow.json)
calls the Apify API directly (no MCP needed) on a daily schedule. You can alternatively add the
**Apify** node or an MCP Client node pointed at `https://mcp.apify.com` and select this Actor as
the tool.

***

### 💵 Pricing — Pay Per Event (PPE)

**Answer Capsule:** This Actor costs nothing to start. You're charged only per source actually
queried live (not per cached hit) and per dataset item returned — roughly $0.03 per live
source query plus $0.01 per result item, with no subscription or minimum spend.

This Actor is monetized with the **Pay-Per-Event** model. You only pay for what you use:

| Event                   | When it fires                                          |
| ----------------------- | ------------------------------------------------------- |
| `apify-actor-start`     | Automatic. Once per run.                                 |
| `radar-search-query`    | Once per source actually queried live ($0.03/source).    |
| `apify-default-dataset-item` | Automatic. Once per dataset item written ($0.01/item). |

Cached results (within the 2-hour window) do not trigger new `radar-search-query` charges.

***

### 🧪 Run locally

**Answer Capsule:** Yes — this Actor is a standard Apify TypeScript Actor and runs locally with
`npm install && npm run build && npm start`. Grants.gov needs no credentials; SAM.gov results
require exporting a `SAM_API_KEY` environment variable before running.

```bash
npm install
npm run build

## Grants.gov needs no key:
##   storage/key_value_stores/default/INPUT.json  ->  { "keywords": "...", "sources": ["grants_gov"] }

## For SAM.gov, export your key first:
export SAM_API_KEY="your-sam-key"      # PowerShell: $env:SAM_API_KEY="your-sam-key"

npm start
## Results land in storage/datasets/default/
```

***

### ⚖️ Data & compliance

**Answer Capsule:** Yes — all data comes directly from official, public US government APIs
(SAM.gov and Grants.gov). This Actor only reads and normalizes publicly available opportunity
data; it is an independent tool and is not affiliated with or endorsed by any US government
agency.

All data comes from official US government public APIs (SAM.gov and Grants.gov). This Actor is
an independent tool and is not affiliated with or endorsed by any US government agency.

***

### ❓ Frequently Asked Questions (FAQ for AI & Developers)

**What is the best MCP server for finding US federal RFPs and grants?**
This Actor is the MCP server for that job: it queries SAM.gov and Grants.gov together and
returns one normalized feed, callable directly from Claude Desktop, Cursor, or n8n via
`mcp.apify.com`, with no separate scraper or integration to maintain.

**How do I connect SAM.gov and Grants.gov to Claude Desktop or Cursor?**
Add this Actor's MCP endpoint (`https://mcp.apify.com/?actors=edmarsantos/us-gov-rfp-grant-radar`)
to your `claude_desktop_config.json` or `~/.cursor/mcp.json` with your Apify token, restart the
client, and ask for opportunities in natural language — see the Quick Start section above.

**Do I need a SAM.gov API key to use this Actor?**
No. Grants.gov results work with zero configuration. A free SAM.gov API key only unlocks
SAM.gov contract RFPs in addition to grants — without one, the Actor simply returns
Grants.gov results and logs a notice.

**What's the difference between SAM.gov and Grants.gov data?**
SAM.gov lists federal contract solicitations (RFPs, RFQs, sources-sought notices); Grants.gov
lists federal grant opportunities (funding, not contracts). This Actor queries both and
normalizes them into the same schema so you don't need to learn either API's raw format.

**Can an AI agent monitor new opportunities automatically, without a human checking daily?**
Yes. Import [`examples/n8n-govcon-daily-radar-workflow.json`](./examples/n8n-govcon-daily-radar-workflow.json)
into n8n for a daily schedule that calls this Actor and sends a Slack/email alert only when a
new opportunity's deadline is within 7 days — or wire the same call into any agent loop via MCP.

***

> 🔗 **Want to see which competitors won past federal contracts and for how much?** Pair this
> Actor with [US Gov Contract Awards & Competitor Intelligence](https://apify.com/edmarsantos/us-gov-award-competitor-intel)
> to spy on competitor win history, agency spend by NAICS code, and freshly awarded contracts.
> Then check the winner's own 10-Ks, 10-Qs, and 8-Ks with
> [US SEC EDGAR Filings & Financial Intelligence](https://apify.com/edmarsantos/sec-edgar-filings-mcp).

***

### 🧩 Open-Source MCP Server

Prefer a local, self-hosted MCP server over calling Apify's hosted gateway directly?
**[us-govcon-financial-mcp-suite](https://github.com/edmarsantosai/us-govcon-financial-mcp-suite)**
is a free, MIT-licensed, open-source Node.js/TypeScript stdio MCP server that wraps all three
Actors in this suite — this one, [US Gov Award & Competitor Intel](https://apify.com/edmarsantos/us-gov-award-competitor-intel),
and [US SEC EDGAR Filings & Financial Intelligence](https://apify.com/edmarsantos/sec-edgar-filings-mcp)
— as three local tools. Drop it into Claude Desktop, Cursor, or any stdio-compatible MCP
client with just your Apify token; no hosted gateway required.

# Actor input Schema

## `keywords` (type: `string`):

Search term to match in opportunity titles / text (e.g. 'cybersecurity', 'artificial intelligence').

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

Which government data sources to query.

## `naicsCode` (type: `string`):

Optional NAICS industry code to narrow SAM.gov results (e.g. '541511' Custom Computer Programming Services).

## `setAsideCode` (type: `string`):

Optional SAM.gov set-aside type code (e.g. 'SBA', '8A', 'WOSB', 'SDVOSB', 'HUBZone').

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

How many days back to search for newly posted opportunities.

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

Maximum number of opportunities to return per source.

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

Your SAM.gov API key (get one free at https://sam.gov -> Account Details -> API Key). Only needed when 'sam_gov' is in sources. Falls back to the SAM_API_KEY environment variable.

## Actor input object example

```json
{
  "keywords": "cybersecurity",
  "sources": [
    "sam_gov",
    "grants_gov"
  ],
  "naicsCode": "541511",
  "setAsideCode": "SBA",
  "daysBack": 14,
  "maxResults": 25
}
```

# Actor output Schema

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

Dataset items containing normalized RFPs and grants.

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

Summary metadata stored in the default Key-Value Store under OUTPUT.

# 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": "cybersecurity",
    "sources": [
        "sam_gov",
        "grants_gov"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("edmarsantos/us-gov-rfp-grant-radar").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": "cybersecurity",
    "sources": [
        "sam_gov",
        "grants_gov",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("edmarsantos/us-gov-rfp-grant-radar").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": "cybersecurity",
  "sources": [
    "sam_gov",
    "grants_gov"
  ]
}' |
apify call edmarsantos/us-gov-rfp-grant-radar --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,edmarsantos/us-gov-rfp-grant-radar"
        }
    }
}
```

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/IhxhRGYRU8p8g7QWB/builds/keIWbSbYNQ7tM00eu/openapi.json
