# SAM.gov Scraper, USAspending & Grants.gov API + MCP (No Key) (`data-goose/us-sam-gov-contracts-grants-mcp`) Actor

Pure-HTTP 256MB Hybrid Actor unifying US federal SAM.gov contract RFPs/sources sought, USAspending.gov prime contract awards, and Grants.gov federal funding opportunities via Batch PPE, Multi-Tenant REST API, and MCP (no SAM API key required).

- **URL**: https://apify.com/data-goose/us-sam-gov-contracts-grants-mcp.md
- **Developed by:** [Data Goose](https://apify.com/data-goose) (community)
- **Categories:** Lead generation, Business, MCP servers
- **Features:** Limited permissions, Multi-tenant, Server interface
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 us federal contract / grant records

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

## SAM.gov Scraper, USAspending Awards & Grants.gov API + MCP (No API Key Required)

Extract live **US federal contract solicitations (SAM.gov RFPs, Sources Sought, Presolicitations)**, **USAspending.gov prime contract awards**, and **Grants.gov federal funding opportunities** into clean structured JSON, REST API endpoints, or a Streamable-HTTP **MCP server** running in **256 MB** pure HTTP with **no SAM.gov API key required**.

***

### Why Govt Contractors & AI Agents Choose This Actor

| Capability | `us-sam-gov-contracts-grants-mcp` | Legacy SAM.gov Scrapers |
|---|---|---|
| **SAM.gov API Key Required?** | ✅ **Zero API key needed** (works out of the box) | ❌ Requires personal SAM.gov account & rotating API keys |
| **3 Federal Sources Unified** | ✅ **SAM.gov + USAspending.gov + Grants.gov** | ❌ Single portal only |
| **Memory & Speed** | ✅ **256 MB pure HTTP** (`httpx`), seconds per run | ❌ Slow headless browsers |
| **Built-In Standby REST & MCP** | ✅ `/mcp` (Claude, Cursor, OpenAI Agents) + `/v1/*` REST endpoints | ❌ Batch export only |
| **Pricing** | ✅ **$5.00 / 1k records** (`$0.005 / record`) | ❌ $5-$15 / 1k + proxy fees |

***

### Extraction Modes & Search Filters

| Input Field | Type | Description | Example |
|---|---|---|---|
| `mode` | string | `"sam_opportunities"`, `"usaspending_awards"`, or `"grants"` | `"sam_opportunities"` |
| `query` | string | Full-text keyword across title, synopsis, or scope | `"cybersecurity"` |
| `agency` | string | Federal department or sub-agency name | `"Department of Defense"` |
| `naics` | string | 2 to 6-digit NAICS industry classification code | `"541512"` |
| `daysBack` | integer | Lookback window in days (`1` to `365`, default `30`) | `30` |
| `minAwardUsd` | number | Minimum contract dollar floor (`usaspending_awards` mode) | `250000` |
| `activeOnly` | boolean | Return active/posted opportunities only (`true` default) | `true` |
| `maxItems` | integer | Max records to emit (`1` to `200`, default `25`) | `25` |

***

### Example Input & Output

#### Input JSON (Live SAM.gov Cybersecurity & Cloud Solicitations)

```json
{
  "mode": "sam_opportunities",
  "query": "cloud zero trust",
  "naics": "541512",
  "activeOnly": true,
  "maxItems": 25
}
```

#### Sample Output Record

```json
{
  "record_type": "sam_opportunity",
  "opportunity_id": "a1b2c3d4e5f6",
  "solicitation_number": "W519TC-26-R-0042",
  "title": "Zero Trust Cloud Security Engineering Support",
  "notice_type": "Solicitation",
  "agency": "Department of Defense",
  "sub_agency": "Department of the Army",
  "publish_date": "2026-11-28",
  "response_deadline": "2026-12-19",
  "is_active": true,
  "naics_codes": ["541512"],
  "set_aside": "Total Small Business Set-Aside (SBA)",
  "point_of_contact": ["jane.contracting@army.mil"],
  "source_url": "https://sam.gov/opp/a1b2c3d4e5f6/view"
}
```

***

### Quick Integration: Claude / Cursor MCP, Standby REST & Python

#### 1. Claude Desktop / Cursor MCP Server (`/mcp`)

```json
{
  "mcpServers": {
    "us-govcon-sam": {
      "type": "streamable-http",
      "url": "https://data-goose--us-sam-gov-contracts-grants-mcp.apify.actor/mcp",
      "headers": {
        "Authorization": "Bearer <APIFY_TOKEN>"
      }
    }
  }
}
```

Exposed MCP tools: `search_sam_gov_opportunities`, `get_sam_gov_opportunity`, `search_usaspending_awards`, `search_federal_grants`.

#### 2. Multi-Tenant Standby REST API (`httpx`)

- `GET /v1/sam/opportunities`
- `GET /v1/sam/opportunities/{opportunity_id}`
- `GET /v1/usaspending/awards`
- `GET /v1/grants`

```python
import httpx

r = httpx.get(
    "https://data-goose--us-sam-gov-contracts-grants-mcp.apify.actor/v1/sam/opportunities",
    headers={"Authorization": "Bearer <APIFY_TOKEN>"},
    params={"query": "artificial intelligence", "naics": "541512", "limit": 10},
    timeout=30.0,
)
print(r.json()["items"])
```

#### 3. Batch Run (`apify-client`)

```python
from apify_client import ApifyClient

client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("data-goose/us-sam-gov-contracts-grants-mcp").call(
    run_input={"mode": "usaspending_awards", "naics": "541512", "minAwardUsd": 500000, "maxItems": 25}
)
awards = list(client.dataset(run["defaultDatasetId"]).iterate_items())
```

***

### Use Cases

- **GovCon BD & Proposal Pipelines:** Monitor daily new SAM.gov Sources Sought and 8(a)/HUBZone/SDVOSB set-aside RFPs into Slack, HubSpot, or n8n.
- **Prime-Subcontractor Partnering:** Pull awarded contracts via `usaspending_awards` to spot primes winning `$1M+` awards who need subcontractor support.
- **Non-Dilutive R\&D & Grant Discovery:** Track open Grants.gov SBIR, NSF, NIH, and DOE funding calls by agency and `cfda_list`.

***

### Pricing (Pay-Per-Event)

- `govcon-record`: **$0.005** per returned SAM.gov opportunity, USAspending award, or Grants.gov grant (`$5.00 / 1k`).
- `govcon-query`: **$0.002** per empty lookup / zero-result check.
- `apify-actor-start`: **$0.005** one-time batch run startup event.

### FAQ

- **Do I need a SAM.gov Public API key?** No. All three modes run without requiring any SAM.gov or Grants.gov credentials.
- **Does it work in n8n and Make?** Yes, either via the standard Apify Batch Actor integration or direct HTTP calls to the Standby REST endpoints.

***

### More B2B Data APIs & MCP Servers by data-goose

| Actor | Use Case | Standby / MCP Endpoint |
|---|---|---|
| [UK Public Tenders OCDS](https://apify.com/data-goose/uk-public-tenders-ocds-mcp) | Contracts Finder + Find a Tender UK procurement | `https://data-goose--uk-public-tenders-ocds-mcp.apify.actor/mcp` |
| [SEC EDGAR Funding & Insider](https://apify.com/data-goose/sec-edgar-funding-insider-mcp) | Startup Form D raises & Form 4 insider buys | `https://data-goose--sec-edgar-funding-insider-mcp.apify.actor/mcp` |
| [US Building Permits Scraper](https://apify.com/data-goose/us-building-permits-scraper) | 201 US cities construction permits & contractors | Batch Actor (`munimcp.com` engine) |
| [Polymarket & Kalshi Odds](https://apify.com/data-goose/prediction-markets-odds-mcp) | Live prediction market odds & spread scanner | `https://data-goose--prediction-markets-odds-mcp.apify.actor/mcp` |
| [Substack Markdown RAG](https://apify.com/data-goose/substack-markdown-rag-mcp) | Substack newsletters, Markdown posts & search | `https://data-goose--substack-markdown-rag-mcp.apify.actor/mcp` |

# Actor input Schema

## `mode` (type: `string`):

Select US federal procurement source: live SAM.gov contract opportunities, USAspending.gov prime awards, or Grants.gov funding opportunities.

## `query` (type: `string`):

Optional search keywords (e.g. 'cybersecurity', 'artificial intelligence', 'cloud infrastructure').

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

Optional federal agency filter (e.g. 'Department of Defense', 'Veterans Affairs', 'NSF').

## `naics` (type: `string`):

Optional 2-6 digit NAICS code filter (e.g. '541512' for Computer Systems Design).

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

Number of days back for USAspending.gov award start/action window (1-365).

## `minAwardUsd` (type: `number`):

Optional minimum contract award value in USD when mode='usaspending_awards'.

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

Restrict SAM.gov solicitations and Grants.gov opportunities to active/posted notices.

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

Maximum federal procurement or grant records to return (1-200).

## Actor input object example

```json
{
  "mode": "sam_opportunities",
  "daysBack": 30,
  "activeOnly": true,
  "maxItems": 25
}
```

# Actor output Schema

## `records` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("data-goose/us-sam-gov-contracts-grants-mcp").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("data-goose/us-sam-gov-contracts-grants-mcp").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 '{}' |
apify call data-goose/us-sam-gov-contracts-grants-mcp --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,data-goose/us-sam-gov-contracts-grants-mcp"
        }
    }
}
```

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/hRZqdMLumzsYxKqYm/builds/wOwbUYu5QyuzQFYJJ/openapi.json
