# US Government Grants & Contract Opportunities Monitor (`schmarta/us-government-grants-contracts-monitor`) Actor

Search and monitor US federal grants (Grants.gov) and contract opportunities (SAM.gov) in one normalized feed. Keyword/agency/NAICS filters, award amounts, LLM-ready descriptions, delta-only monitoring. Works as an MCP server for AI agents.

- **URL**: https://apify.com/schmarta/us-government-grants-contracts-monitor.md
- **Developed by:** [Lucas Marta](https://apify.com/schmarta) (community)
- **Categories:** Lead generation, Automation
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 opportunity records

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## US Government Grants & Contract Opportunities Monitor

Search and monitor **US federal grants (Grants.gov)** and **contract opportunities (SAM.gov)** in one normalized feed. Filter by keyword, agency, status, NAICS code, and posted date; pull award ceilings, deadlines, and eligibility; extract full descriptions as clean, **LLM-ready markdown**; and run delta-only on a Schedule to get alerted the moment new funding is posted.

Nothing else — on Apify or the open web — merges grants and contracts into one cheap, normalized, monitorable API.

### How to find government grants and contracts

1. Add keywords (`broadband`, `rural health`, `cybersecurity`, `AI`) — each is searched separately.
2. Filter by status (posted / forecasted / closed), agency (`NSF`, `NIH`, `USDA`), funding category, and posted-date range.
3. Optionally enable **full details** — award ceiling/floor, eligibility, and the complete description as markdown.
4. Optionally enable **SAM.gov contract opportunities** (free API key, 2-minute signup) with NAICS-code filtering.

Grants.gov works out of the box with **zero API keys**.

### How to monitor new funding opportunities automatically

Turn on **Delta only**, create an Apify Schedule (e.g. daily at 8am), and every run returns only opportunities that are new since the last run. Wire the dataset into Slack, email, Google Sheets, or your CRM with Apify integrations. Typical uses:

- Grant writers & consultants — never miss a new opportunity matching your clients' profiles
- Universities & nonprofits — daily digest of new funding in your field
- GovCon business development — new contract opportunities by NAICS code, set-aside, and agency
- AI agents — query live federal funding data via MCP

### Output

Each opportunity is one dataset item in a unified schema across both sources:

| Field | Description |
|---|---|
| `source` | `grants-gov` or `sam-gov` |
| `opportunityId` | Grants.gov id / SAM.gov notice id |
| `title`, `agency` | What and who |
| `postedDate`, `closeDate` | Deadlines |
| `awardCeiling`, `awardFloor` | Funding range (grants, when published) |
| `naicsCodes`, `setAside` | Contract targeting (SAM.gov) |
| `eligibility` | Who can apply (when details enabled) |
| `descriptionMarkdown` | Full description as clean markdown (when details enabled) |
| `url` | Link to the official listing |
| `isNew` | Whether this opportunity is new since the last run |

### Use as an MCP server (AI agents)

The Actor runs in Standby mode as a streamable-HTTP MCP server via [mcp.apify.com](https://mcp.apify.com):

- `search_funding_opportunities` — grants + contracts with keyword/date filters
- `get_opportunity_details` — full description, award range, and eligibility for any grant

### Pricing

Pay per event — you only pay for what you extract:

| Event | Price |
|---|---|
| Actor start | $0.005 |
| Opportunity record | $0.002 |
| Full details (markdown) | $0.008 |

A daily delta-only monitor typically costs **a few cents per run**.

### FAQ

**Do I need any API keys?** No — Grants.gov is completely open. Only the optional SAM.gov contracts module needs a free key (sam.gov → Account Details → API Key).

**Why do my SAM.gov results stop after a few pages?** Keys without a SAM role are limited to 10 requests/day by SAM.gov. The Actor batches queries and returns everything it got. With a (free) SAM role on your account the limit is 1,000/day.

**Is this data legal to use?** Yes — both sources are official US-government public-domain data with documented public APIs.

**Can I search closed or forecasted opportunities?** Yes — set `oppStatuses` to any mix of `posted`, `forecasted`, `closed`.

# Actor input Schema

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

Search terms, each searched separately (e.g. `broadband`, `rural health`, `cybersecurity`). Empty = all opportunities.
## `oppStatuses` (type: `array`):

Grants.gov opportunity statuses to include.
## `postedFrom` (type: `string`):

YYYY-MM-DD.
## `postedTo` (type: `string`):

YYYY-MM-DD. Empty = today.
## `includeDetails` (type: `boolean`):

Fetch each grant's full description, award ceiling/floor, and eligibility as clean markdown. Charged per opportunity.
## `deltaOnly` (type: `boolean`):

Return only opportunities not seen in previous runs with the same filters. Ideal on a Schedule — a clean feed of newly posted funding.
## `includeSamOpportunities` (type: `boolean`):

Also search federal contract opportunities on SAM.gov. Requires a free SAM.gov API key (2-minute signup — see README).
## `samApiKey` (type: `string`):

Free key from sam.gov → Account Details → API Key. Roleless keys allow 10 requests/day; with a SAM role you get 1,000/day.
## `samNaicsCodes` (type: `array`):

Limit SAM.gov results to these NAICS codes (e.g. `541511`).
## `fundingCategories` (type: `array`):

Grants.gov funding category codes (e.g. `HL` health, `ED` education, `ST` science).
## `agencies` (type: `array`):

Grants.gov agency codes (e.g. `NSF`, `NIH`, `USDA`).
## `eligibilities` (type: `array`):

Grants.gov applicant eligibility codes (e.g. `25` = others, `06` = public/state institutions).
## `maxResults` (type: `integer`):

Maximum opportunities per run.

## Actor input object example

```json
{
  "keywords": [
    "artificial intelligence"
  ],
  "oppStatuses": [
    "posted"
  ],
  "includeDetails": false,
  "deltaOnly": false,
  "includeSamOpportunities": false,
  "samNaicsCodes": [],
  "fundingCategories": [],
  "agencies": [],
  "eligibilities": [],
  "maxResults": 200
}
````

# 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": [
        "artificial intelligence"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("schmarta/us-government-grants-contracts-monitor").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": ["artificial intelligence"] }

# Run the Actor and wait for it to finish
run = client.actor("schmarta/us-government-grants-contracts-monitor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": [
    "artificial intelligence"
  ]
}' |
apify call schmarta/us-government-grants-contracts-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=schmarta/us-government-grants-contracts-monitor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "US Government Grants & Contract Opportunities Monitor",
        "description": "Search and monitor US federal grants (Grants.gov) and contract opportunities (SAM.gov) in one normalized feed. Keyword/agency/NAICS filters, award amounts, LLM-ready descriptions, delta-only monitoring. Works as an MCP server for AI agents.",
        "version": "0.1",
        "x-build-id": "BANprC4nFpEipTM75"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/schmarta~us-government-grants-contracts-monitor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-schmarta-us-government-grants-contracts-monitor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/schmarta~us-government-grants-contracts-monitor/runs": {
            "post": {
                "operationId": "runs-sync-schmarta-us-government-grants-contracts-monitor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/schmarta~us-government-grants-contracts-monitor/run-sync": {
            "post": {
                "operationId": "run-sync-schmarta-us-government-grants-contracts-monitor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "keywords": {
                        "title": "🔎 Keywords",
                        "type": "array",
                        "description": "Search terms, each searched separately (e.g. `broadband`, `rural health`, `cybersecurity`). Empty = all opportunities.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "oppStatuses": {
                        "title": "📋 Opportunity status",
                        "type": "array",
                        "description": "Grants.gov opportunity statuses to include.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "forecasted",
                                "posted",
                                "closed"
                            ],
                            "enumTitles": [
                                "Forecasted",
                                "Posted (open)",
                                "Closed"
                            ]
                        },
                        "default": [
                            "posted"
                        ]
                    },
                    "postedFrom": {
                        "title": "📅 Posted after",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                        "type": "string",
                        "description": "YYYY-MM-DD."
                    },
                    "postedTo": {
                        "title": "📅 Posted before",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                        "type": "string",
                        "description": "YYYY-MM-DD. Empty = today."
                    },
                    "includeDetails": {
                        "title": "🤖 Fetch full details (LLM-ready markdown)",
                        "type": "boolean",
                        "description": "Fetch each grant's full description, award ceiling/floor, and eligibility as clean markdown. Charged per opportunity.",
                        "default": false
                    },
                    "deltaOnly": {
                        "title": "🔔 Delta only (monitoring mode)",
                        "type": "boolean",
                        "description": "Return only opportunities not seen in previous runs with the same filters. Ideal on a Schedule — a clean feed of newly posted funding.",
                        "default": false
                    },
                    "includeSamOpportunities": {
                        "title": "🏛️ Include SAM.gov contract opportunities",
                        "type": "boolean",
                        "description": "Also search federal contract opportunities on SAM.gov. Requires a free SAM.gov API key (2-minute signup — see README).",
                        "default": false
                    },
                    "samApiKey": {
                        "title": "SAM.gov API key",
                        "type": "string",
                        "description": "Free key from sam.gov → Account Details → API Key. Roleless keys allow 10 requests/day; with a SAM role you get 1,000/day."
                    },
                    "samNaicsCodes": {
                        "title": "NAICS codes",
                        "type": "array",
                        "description": "Limit SAM.gov results to these NAICS codes (e.g. `541511`).",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "fundingCategories": {
                        "title": "Funding categories",
                        "type": "array",
                        "description": "Grants.gov funding category codes (e.g. `HL` health, `ED` education, `ST` science).",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "agencies": {
                        "title": "Agencies",
                        "type": "array",
                        "description": "Grants.gov agency codes (e.g. `NSF`, `NIH`, `USDA`).",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "eligibilities": {
                        "title": "Eligibility codes",
                        "type": "array",
                        "description": "Grants.gov applicant eligibility codes (e.g. `25` = others, `06` = public/state institutions).",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxResults": {
                        "title": "Max results",
                        "maximum": 2000,
                        "type": "integer",
                        "description": "Maximum opportunities per run.",
                        "default": 200
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
