# Grants.gov Scraper · Grant Opportunities, Agencies & Awards (`reapx/grants-gov-scraper`) Actor

Scrape US federal grant opportunities, funding announcements, and agency award notices from Grants.gov by keyword, agency, category, eligibility, and status.

- **URL**: https://apify.com/reapx/grants-gov-scraper.md
- **Developed by:** [Tarek Etman](https://apify.com/reapx) (community)
- **Categories:** Business, Other, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.30 / 1,000 grant opportunity returneds

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

![reapX — public sources in, addressable records out](https://reapx.dev/reapx.gif)

## Grants.gov Scraper · Grant Opportunities, Agencies & Awards

The **Grants.gov Scraper** extracts structured public federal grant opportunities, Notice of Funding Opportunity (NOFO) announcements, agency award listings, and eligibility criteria directly from the official U.S. federal Grants.gov database. Designed for high performance, reliability, and entity resolution, it aggregates funding notices by awarding federal agency and delivers structured JSON output optimized for analytical workflows, grant intelligence, competitive research, and automated lead generation.

> Maintained by **reapX**. Every row cites the Apify run that produced it — nothing is
> inferred, modelled or filled in, and a field absent from the source is absent from the row.
> The extracted archive for this source is browsable at
> [reapx.dev/data/grants-gov-scraper/](https://reapx.dev/data/grants-gov-scraper/) and mirrored as an open dataset on
> [Hugging Face](https://huggingface.co/datasets/reapxdev/grants-gov-scraper) and
> [Kaggle](https://www.kaggle.com/datasets/reapxdev/grants-gov-scraper). Questions: reapxdev@proton.me

***

### Features & Capabilities

- **Direct JSON API Access**: Queries official U.S. federal Grants.gov webservices over HTTP without headless browser overhead, achieving fast execution and minimal resource consumption.
- **Entity Page Resolution**: Automatically maps every grant opportunity to its awarding agency via `companyName`, enabling entity-level aggregation across departments and bureaus.
- **Granular Filter Options**: Search by keyword, federal agency code (e.g. `HHS`, `DOD`, `NSF`, `EPA`), funding category, applicant eligibility, award instrument type, date window, and opportunity status.
- **Pay-Per-Event Pricing**: Transparent per-record event pricing (`grant-returned`) with tiered volume discounts from Free to Diamond tiers. Blocked or zero-result requests are never charged.
- **50 Pre-configured Tasks**: Includes 50 ready-to-run task configurations covering defense, healthcare, agriculture, STEM education, small business innovation, and climate resilience.

***

### ⬇️ Input

The actor accepts structured JSON input specifying search parameters, filtering options, and capacity limits.

#### Input Parameters Table

| Field Name | Type | Default / Prefill | Description |
| :--- | :--- | :--- | :--- |
| `keyword` | String | `"health"` | Keyword search term to filter grant opportunity titles and descriptions. Leave empty to search across all topics. |
| `agencies` | String | `""` | Filter by federal agency abbreviation or code (e.g. `DOD`, `NSF`, `DOI`, `EPA`, `NASA`). Leave empty for all agencies. |
| `oppStatuses` | Array | `["forecasted", "posted"]` | Opportunity lifecycle statuses: `forecasted`, `posted`, `closed`, `archived`. |
| `fundingCategories` | Array | `[]` | Funding sector categories: `HL` (Health), `ED` (Education), `ST` (Science/Tech), `ENV` (Environment), `AG` (Agriculture), `EN` (Energy). |
| `eligibilities` | Array | `[]` | Applicant eligibility codes: `12` (501c3 Nonprofits), `06` (State Higher Ed), `23` (Small Business), `07` (Tribal Gov), `00` (State Gov). |
| `fundingInstruments` | Array | `[]` | Award instrument types: `G` (Grant), `CA` (Cooperative Agreement), `PC` (Procurement Contract). |
| `dateRange` | Integer | `None` | Filter grants posted or modified within the past N days (e.g. `30`, `60`, `90`, `365`). |
| `sortBy` | String | `"openDate|desc"` | Sort order: `openDate|desc`, `openDate|asc`, `closeDate|desc`, `closeDate|asc`. |
| `maxItems` | Integer | `100` | Capacity limit for total grant records to scrape. Max 10,000 items per run. |

#### Example Input JSON

```json
{
  "keyword": "climate resilience",
  "agencies": "EPA",
  "oppStatuses": ["forecasted", "posted"],
  "fundingCategories": ["ENV", "ST"],
  "eligibilities": ["06", "12", "23"],
  "sortBy": "openDate|desc",
  "maxItems": 100
}
```

***

### ⬆️ Output

The actor stores all scraped records in its default dataset. Each record represents a single federal grant opportunity.

#### Output Field Schema

| Field Name | Data Type | Description | Example Value |
| :--- | :--- | :--- | :--- |
| `companyName` | String | Primary entity identifier. Awarding federal agency or department name. | `"National Institutes of Health"` |
| `agencyCode` | String | Sub-agency code or departmental acronym. | `"HHS-NIH11"` |
| `opportunityId` | String | Federal grant opportunity funding announcement number. | `"FOR-MD-25-003"` |
| `grantsGovId` | String | Grants.gov internal numerical database identifier. | `"359138"` |
| `title` | String | Full descriptive title of the grant opportunity notice. | `"Notice of Funding Opportunity Announcement for Health Disparities"` |
| `openDate` | String | Date the grant opportunity opened for applications (MM/DD/YYYY). | `"05/27/2025"` |
| `closeDate` | String | Application closing date or submission deadline (MM/DD/YYYY). | `"01/11/2027"` |
| `oppStatus` | String | Current status (`forecasted`, `posted`, `closed`, `archived`). | `"posted"` |
| `docType` | String | Document notice type (`synopsis`, `forecast`). | `"synopsis"` |
| `cfdaList` | Array | Catalog of Federal Domestic Assistance (CFDA) numbers. | `["93.307"]` |

#### Sample Output Row

```json
{
  "companyName": "National Institutes of Health",
  "agencyCode": "HHS-NIH11",
  "opportunityId": "FOR-MD-25-003",
  "grantsGovId": "359138",
  "title": "Notice of Funding Opportunity Announcement for Addressing Determinants of Health Disparities Among Rural Populations (R01 - Clinical Trial Optional)",
  "openDate": "05/27/2025",
  "closeDate": "01/11/2027",
  "oppStatus": "posted",
  "docType": "synopsis",
  "cfdaList": [
    "93.307"
  ]
}
```

***

### How it works

1. **HTTP JSON Request**: The scraper issues structured POST requests directly to `https://api.grants.gov/v1/api/search2` with payload filters for keywords, agencies, categories, eligibility, and statuses.
2. **Entity Mapping**: The scraper extracts the federal agency name and maps it to `companyName`. If `agency` is empty, it falls back to `agencyCode` or `U.S. Federal Government`. Long agency names are normalized to 80 characters max to guarantee compatibility with `growth.entity_pages`.
3. **Streamed Pushes**: Results are pushed to the Apify default dataset incrementally as they are fetched from the API.
4. **Retry & Backoff**: Handles rate limits (HTTP 429) and server errors (HTTP 5xx) with exponential backoff and automatic retries.
5. **Pay-Per-Event Charging**: Charges per delivered row via `grant-returned`. If a query yields zero items or encounters a terminal HTTP error, zero charges are incurred.

***

### Use Cases & Integration Examples

#### Python Integration Example

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

run_input = {
    "keyword": "renewable energy",
    "agencies": "DOE",
    "oppStatuses": ["forecasted", "posted"],
    "maxItems": 50
}

run = client.actor("reapx/grants-gov-scraper").call(run_input=run_input)

dataset_items = client.dataset(run["defaultDatasetId"]).list_items().items
for item in dataset_items:
    print(f"[{item['companyName']}] {item['opportunityId']}: {item['title']}")
```

#### JavaScript / Node.js Integration Example

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });

const input = {
  keyword: 'artificial intelligence',
  agencies: 'NSF',
  maxItems: 50
};

const run = await client.actor('reapx/grants-gov-scraper').call(input);
const { items } = await client.dataset(run.defaultDatasetId).listItems();

items.forEach((item) => {
  console.log(`Agency: ${item.companyName} | ID: ${item.opportunityId} | Title: ${item.title}`);
});
```

***

### 50 Pre-configured Tasks

The scraper includes 50 task configurations stored in `TASKS.json`. Key task subsets include:

- **Agency Collections**: `dod-defense-grants`, `nsf-science-awards`, `epa-environmental-funding`, `nasa-space-science-grants`, `usda-agriculture-rural`, `doe-clean-energy-grants`, `ed-education-innovations`.
- **Category Deep Dives**: `category-health-grants`, `category-science-tech`, `category-environment`, `category-energy-grants`, `category-agriculture`, `category-business-commerce`.
- **Applicant Eligibility Tasks**: `eligibility-nonprofits-501c3`, `eligibility-higher-ed`, `eligibility-small-business`, `eligibility-tribal-governments`, `eligibility-state-governments`.
- **Targeted Topic Searches**: `topic-climate-change`, `topic-cybersecurity`, `topic-ai-machine-learning`, `topic-cancer-research`, `topic-clean-water`, `topic-broadband-telecom`.
- **Date & Lifecycle Windows**: `recent-30days-posted`, `forecasted-upcoming-grants`, `closing-soon-grants`, `historical-archived-grants`.

***

### ❓ FAQ

#### Q: Does this scraper require a Grants.gov API key?

No. The scraper accesses public search endpoints on Grants.gov without requiring user-provided API credentials.

#### Q: What is the entity identifier used for entity pages?

The scraper outputs `companyName` holding the federal awarding agency name. This allows `growth.entity_pages` to aggregate opportunities by agency department (e.g. National Institutes of Health, National Science Foundation).

#### Q: How frequently is Grants.gov data updated?

Grants.gov updates opportunity listings continuously throughout the business day. Running the scraper with `dateRange: 30` or sorting by `openDate|desc` captures the latest funding releases.

#### Q: What applicant eligibility codes are supported?

Supported eligibility codes include `12` (501c3 Nonprofits), `06` (Public Higher Ed), `20` (Private Higher Ed), `23` (Small Businesses), `07` (Tribal Governments), `00` (State Governments), `01` (County Governments), `02` (City/Township), `05` (School Districts), `08` (Housing Authorities), and `22` (For-profit entities).

#### Q: Can I scrape historical or closed grants?

Yes. Set `oppStatuses` to include `["closed", "archived"]` to retrieve historical funding notices.

***

### 💬 Your feedback

We actively maintain this actor. If you encounter missing fields, API updates, or want new filter capabilities added, please contact us at **reapxdev@proton.me**.

***

Unofficial - not affiliated with Grants.gov or the U.S. Federal Government. Collects public data only. reapx. Contact reapxdev@proton.me.

### 🧪 Example input

A real, runnable configuration — this is an actual input this Actor has run with.

```json
{
  "agencies": "DOD",
  "oppStatuses": [
    "forecasted",
    "posted"
  ],
  "maxItems": 100
}
```

### 📄 Sample output

One real row from a real run of this Actor, unedited.

```json
{
  "companyName": "National Park Service",
  "agencyCode": "DOI-NPS",
  "opportunityId": "P12AC10113",
  "grantsGovId": "141593",
  "title": "Vegetation Interns",
  "openDate": "01/30/2012",
  "closeDate": "",
  "oppStatus": "posted",
  "docType": "synopsis",
  "cfdaList": [
    "15.931"
  ]
}
```

### ⚠️ Run outcomes and error handling

This Actor reports what happened in the run's **status message**, and it always keeps whatever it collected. These are the outcomes you can get and what each one means.

| Outcome | What it means |
|---|---|
| **Success** | Rows were returned and you were charged `grant-returned` at $0.002 per row. |
| **No matches** | The source returned nothing for your filters. **Nothing is charged.** Widen the date window or drop a filter. |

#### What is guaranteed either way

- **Every row is pushed as it is built**, not buffered to the end of the run. Anything that buffers output loses everything to a timeout, a block or a migration; this does not.
- **A field absent from the source is absent from the row.** Nothing is inferred, modelled or filled in to make a row look complete.

# Actor input Schema

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

Filter grant opportunities by search term or topic (e.g. <code>health</code>, <code>climate</code>, <code>research</code>). <br><br><b>Consequence:</b> Entering a keyword narrows results to matching grants. Leave empty to search across all grant opportunities.

## `agencies` (type: `string`):

Filter grant opportunities by federal agency code (e.g. <code>HHS</code>, <code>DOD</code>, <code>NSF</code>, <code>EPA</code>). <br><br><b>Consequence:</b> Restricts the search to funding opportunities issued by the specified federal agency. Leave empty to return grants across all federal agencies.

## `oppStatuses` (type: `array`):

Select opportunity status categories to include: <code>forecasted</code>, <code>posted</code>, <code>closed</code>, <code>archived</code>. <br><br><b>Consequence:</b> Filtering by status narrows results to grants in those lifecycle stages. Leave empty to search forecasted and posted grants.

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

Filter by funding category codes (e.g. <code>HL</code> for Health, <code>ED</code> for Education, <code>ST</code> for Science/Tech, <code>ENV</code> for Environment). <br><br><b>Consequence:</b> Restricts returned grants to specific federal funding sectors. Leave empty to search all funding categories.

## `eligibilities` (type: `array`):

Filter by eligible applicant type codes (e.g. <code>12</code> for 501(c)(3) Nonprofits, <code>06</code> for State Higher Ed, <code>23</code> for Small Businesses). <br><br><b>Consequence:</b> Filters grants to opportunities open to specified applicant types. Leave empty to include all applicant types.

## `fundingInstruments` (type: `array`):

Filter by funding instrument type codes: <code>G</code> (Grant), <code>CA</code> (Cooperative Agreement), <code>PC</code> (Procurement Contract). <br><br><b>Consequence:</b> Narrows search to specified award mechanism types. Leave empty to return all instrument types.

## `dateRange` (type: `integer`):

Filter grants posted or updated within the last N days (e.g. <code>30</code>, <code>90</code>, <code>365</code>). <br><br><b>Consequence:</b> Restricts results to recent funding announcements. Leave empty to search across all historical dates.

## `sortBy` (type: `string`):

Order results by opening or closing date: <code>openDate|desc</code>, <code>openDate|asc</code>, <code>closeDate|desc</code>, <code>closeDate|asc</code>. <br><br><b>Consequence:</b> Controls the sort order of returned opportunities. Defaults to newest open date first.

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

Maximum total number of federal grant opportunity records to scrape and deliver in this run. <br><br><b>Consequence:</b> The higher the number, the longer the run takes and the more items are billed. Defaults to 100 items.<br><br>The higher the number, the longer the run takes and the more you are charged, because you pay per row returned.

## Actor input object example

```json
{
  "keyword": "health",
  "oppStatuses": [
    "forecasted",
    "posted"
  ],
  "fundingCategories": [],
  "eligibilities": [],
  "fundingInstruments": [],
  "sortBy": "openDate|desc",
  "maxItems": 100
}
```

# Actor output Schema

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

Every federal grant opportunity or funding notice record found by this run, one row per item, in the default dataset.

# 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": "health",
    "agencies": "",
    "oppStatuses": [
        "forecasted",
        "posted"
    ],
    "fundingCategories": [],
    "eligibilities": [],
    "fundingInstruments": [],
    "sortBy": "openDate|desc",
    "maxItems": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("reapx/grants-gov-scraper").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": "health",
    "agencies": "",
    "oppStatuses": [
        "forecasted",
        "posted",
    ],
    "fundingCategories": [],
    "eligibilities": [],
    "fundingInstruments": [],
    "sortBy": "openDate|desc",
    "maxItems": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("reapx/grants-gov-scraper").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": "health",
  "agencies": "",
  "oppStatuses": [
    "forecasted",
    "posted"
  ],
  "fundingCategories": [],
  "eligibilities": [],
  "fundingInstruments": [],
  "sortBy": "openDate|desc",
  "maxItems": 100
}' |
apify call reapx/grants-gov-scraper --silent --output-dataset

```

## MCP server setup

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

```

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/E5LxihFRbVWYzcXfl/builds/iSzYI2Kfc2C90udMh/openapi.json
