# Grants.gov Federal Grants Scraper (`hamsmoothie/grants-gov-opportunities`) Actor

Search open and forecasted US federal grants on Grants.gov by keyword, agency, status and category. Clean JSON/CSV with deadlines and links.

- **URL**: https://apify.com/hamsmoothie/grants-gov-opportunities.md
- **Developed by:** [Maybe Quark](https://apify.com/hamsmoothie) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00 / 1,000 result rows

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/running/actors-in-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

## Grants.gov Search API: Find Federal Grant Opportunities by Keyword

**Grants.gov Funding Opportunities** searches the official Grants.gov search service and returns open and forecasted US federal grants as clean rows: title, opportunity number, agency and agency code, status, open and close dates, document type, CFDA / Assistance Listing numbers and a direct link. Filter by keyword, agency, status and funding category, run it on a schedule, and export JSON, CSV or Excel. No login or API key is needed.

### Input

All fields are optional. This example looks for open or forecasted rural health grants:

```json
{
  "keyword": "rural health",
  "statuses": ["posted", "forecasted"],
  "agencies": ["HHS"],
  "fundingCategories": ["HL"],
  "maxResults": 150
}
```

- `keyword`: free text such as `water infrastructure`, `rural health`, `STEM education`.
- `statuses`: any of `posted`, `forecasted`, `closed`, `archived` (default `["posted", "forecasted"]`).
- `agencies`: agency codes such as `EPA`, `HHS`, `USDA`. Empty means all agencies.
- `fundingCategories`: Grants.gov category codes such as `HL` (Health), `ED` (Education), `EN` (Energy). Empty means all.
- `maxResults`: stop after this many grants (default 200).

### Output

One row per funding opportunity, newest open date first. Example row:

```json
{
  "title": "Genesis Mission Graduate Fellowship Pilot",
  "opportunityNumber": "DE-FOA-0003673",
  "agency": "Office of Science",
  "agencyCode": "PAMS-SC",
  "status": "posted",
  "openDate": "2026-10-08",
  "closeDate": "2027-01-12",
  "documentType": "synopsis",
  "cfda": ["81.049"],
  "url": "https://www.grants.gov/search-results-detail/364033",
  "opportunityId": "364033"
}
```

### Use cases

Search phrases this actor is built for:

- **"Search federal grants by keyword"**: enter a topic in `keyword` and get every matching opportunity with its deadline.
- **"Grants.gov open funding opportunities"**: keep `statuses` at `posted` to list grants that are open now.
- **"Federal grants by agency"** or **"find forecasted federal grants"**: set `agencies` and `statuses: ["forecasted"]` to see funding before it opens.

Typical users are nonprofits, universities, municipalities and grant writers who track funding across agencies. Schedule a weekly run and send new rows to a spreadsheet or inbox, deduplicating on `opportunityNumber`.

### Pricing

Pay per result: each grant row returned is one billable result, listed at $0.005 per row ($5 per 1,000). Set a maximum charge on the run for a hard ceiling.

### Limits

- Data is whatever Grants.gov's public search service returns; this actor does not add eligibility or award-likelihood judgments.
- `maxResults` is capped at 5,000 per run.
- It returns opportunity listings and links, not application documents. Open the `url` for the full notice.
- Requests are retried a few times if Grants.gov is slow; if it stays down the run fails with a clear message and can be retried.

### FAQ

**Does it need an API key or login?** No. It uses Grants.gov's public search service.

**Can I search by agency?** Yes. Use agency codes such as `EPA`, `HHS` or `USDA` in `agencies`.

**Does it include closed grants?** Only if you add `closed` or `archived` to `statuses`; the default is posted and forecasted.

# Actor input Schema

## `keyword` (type: `string`):

e.g. water infrastructure, rural health, STEM education.

## `statuses` (type: `array`):

posted, forecasted, closed, archived.

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

e.g. EPA, HHS, USDA. Leave empty for all.

## `fundingCategories` (type: `array`):

Grants.gov category codes, e.g. HL (Health), ED (Education), EN (Energy). Leave empty for all.

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

Stop after this many grants.

## Actor input object example

```json
{
  "keyword": "rural health",
  "statuses": [
    "posted",
    "forecasted"
  ],
  "agencies": [],
  "fundingCategories": [],
  "maxResults": 200
}
```

# Actor output Schema

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

All grants found, one row each; download as JSON, CSV or Excel.

# 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 = {
    "keyword": "rural health"
};

// Run the Actor and wait for it to finish
const run = await client.actor("hamsmoothie/grants-gov-opportunities").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 = { "keyword": "rural health" }

# Run the Actor and wait for it to finish
run = client.actor("hamsmoothie/grants-gov-opportunities").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 '{
  "keyword": "rural health"
}' |
apify call hamsmoothie/grants-gov-opportunities --silent --output-dataset

```

## MCP server setup

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

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/7jwldiIILpw4dbwcX/builds/rFMjAOcS6O2lCatPu/openapi.json
