# Grants.gov API (`soilair/grants-gov-api`) Actor

Search and enrich official U.S. federal grant opportunities from Grants.gov with normalized agencies, dates, funding details, Assistance Listings, and synopsis data.

- **URL**: https://apify.com/soilair/grants-gov-api.md
- **Developed by:** [Salih Can Kurnaz](https://apify.com/soilair) (community)
- **Categories:** Business, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 grant results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## Grants.gov API

Search, normalize, and enrich U.S. federal funding opportunities from the official Grants.gov APIs. This Actor is designed for grant discovery, recurring funding monitoring, research pipelines, business-development workflows, and AI agents that need structured federal opportunity data without manually navigating Grants.gov.

The Actor uses the official Grants.gov `search2` endpoint for discovery and, when `enrichDetails` is enabled, the official `fetchOpportunity` endpoint for each unique opportunity. This lets the output include fields that are often sparse in search results alone, such as agency details, synopsis text, Assistance Listing numbers, award floor and ceiling, cost-sharing information, and posting metadata.

### What you can search

Provide one or more keywords such as `health`, `education`, `energy`, `climate`, or a phrase relevant to your organization. The Actor searches each keyword independently and deduplicates overlapping opportunities by their Grants.gov opportunity ID. The `matchedKeywords` field shows which input searches matched each final row.

You can also choose which Grants.gov statuses to search. The default includes both forecasted and posted opportunities. Forecasts may not yet have a closing date, so a missing close date should not automatically be interpreted as a data error.

### Detail enrichment

`enrichDetails=true` is the recommended mode. Every unique opportunity is resolved through the official opportunity-detail endpoint. The Actor uses several official agency fields as fallbacks so that agency names remain useful even when the search response is sparse.

### Privacy and contacts

Public agency contact information is **disabled by default**. Set `includeContact=true` only when your workflow genuinely needs the public contact name or email published with an opportunity. The Actor does not require a Grants.gov account, login session, browser, proxy, or third-party API key.

### Output

Each Dataset row represents one unique Grants.gov opportunity. Core fields include opportunity ID and number, title, agency, status, dates, Assistance Listings, award information, synopsis, matched keywords, and a source marker. The Actor also writes a structured `SUMMARY` record and a human-readable `REPORT` to the default key-value store.

The Actor does **not claim to predict grant eligibility, award probability, or funding outcomes**. It returns and normalizes information published by Grants.gov. Always verify deadlines, eligibility rules, and application requirements in the authoritative opportunity notice before making funding decisions.

### Pricing

The Actor uses pay-per-event billing. A `grant-result` event is charged only when a grant opportunity is successfully delivered to the default Dataset. The platform also applies the standard Actor-start event configured in the Actor pricing.

### Example input

```json
{
  "keywords": ["health", "education"],
  "rowsPerKeyword": 25,
  "statuses": "forecasted|posted",
  "enrichDetails": true,
  "includeContact": false,
  "verifyStability": false
}
```

For recurring monitoring, schedule the Actor with focused keywords and compare opportunity IDs between runs in your own downstream workflow.

# Actor input Schema

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

One or more Grants.gov opportunity search keywords.

## `rowsPerKeyword` (type: `integer`):

Maximum search results requested per keyword.

## `statuses` (type: `string`):

Pipe-separated Grants.gov statuses.

## `enrichDetails` (type: `boolean`):

Fetch official detail for every unique opportunity to add agency, funding, ALN and synopsis fields.

## `includeContact` (type: `boolean`):

Persist public agency contact name/email. Disabled by default.

## `verifyStability` (type: `boolean`):

Repeat each search and compare opportunity IDs. Intended for benchmark/preflight.

## Actor input object example

```json
{
  "keywords": [
    "health"
  ],
  "rowsPerKeyword": 25,
  "statuses": "forecasted|posted",
  "enrichDetails": true,
  "includeContact": false,
  "verifyStability": false
}
```

# Actor output Schema

## `results` (type: `string`):

Default Dataset containing normalized grant opportunities.

## `summary` (type: `string`):

Structured run metrics and quality gates.

## `report` (type: `string`):

Human-readable run report.

# 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("soilair/grants-gov-api").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("soilair/grants-gov-api").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 soilair/grants-gov-api --silent --output-dataset

```

## MCP server setup

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

```

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/uwNAOy9QcbWmRAiCV/builds/C0a0bmBfuwQmIW61R/openapi.json
