# Grants.gov Scraper: Federal Grant Opportunities Feed (`finaldynamics/grants-gov-opportunity-feed`) Actor

Federal grant database from Grants.gov: grant opportunities by keyword, agency and eligibility, with full details and new grant alerts for nonprofits.

- **URL**: https://apify.com/finaldynamics/grants-gov-opportunity-feed.md
- **Developed by:** [Final Dynamics](https://apify.com/finaldynamics) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 opportunities

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 Scraper: Federal Grant Opportunities Feed

Every federal grant the US government opens for applications is posted on Grants.gov, the federal
grant database nonprofits, schools and local governments search. This actor pulls those
opportunities for the keywords and filters you choose and gives you one row per opportunity: who is
offering it, when it opens and closes, and, if you want them, the full description, the award
ceiling and floor, the estimated total funding, who is eligible and the program contact. Run it on a
schedule with the "new only" mode and each run delivers just the opportunities you have not seen,
plus, when you read the details, any whose posting changed.

Built for grant writers and consultants watching a field, nonprofits and universities tracking their
funders, city and county staff who need the opportunities open to local governments, newsletter and
alert publishers, and anyone who is tired of reading the Grants.gov search page by hand every week.

### What you get

One row per opportunity. Every field is flat, so the dataset drops straight into Google Sheets,
Airtable or a CRM.

| Field                                | Example                                                                 |
| ------------------------------------ | ----------------------------------------------------------------------- |
| `opportunityId`, `opportunityNumber` | `363868`, `O-NIJ-2026-172757`                                           |
| `title`                              | `NIJ FY 2026 Invited to Apply - Adolescent Brain Cognitive Development` |
| `agencyCode`, `agencyName`           | `USDOJ-OJP-NIJ`, `National Institute of Justice`                        |
| `status`, `docType`                  | `posted` or `forecasted`; `synopsis` or `forecast`                      |
| `openDate`, `closeDate`              | `2026-09-16`, `2026-09-18`                                              |
| `cfdaNumbers`                        | `16.560` (Assistance Listing numbers, joined with `;`)                  |
| `url`                                | Direct link to the opportunity on Grants.gov                            |
| `isNewSinceLastRun`, `isUpdate`      | Set in the "new only" mode                                              |
| `scrapedAt`                          | UTC timestamp                                                           |

With `includeDetails` on, each row also carries:

| Field                                                                                          | Example                                                                                                         |
| ---------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| `description`                                                                                  | The full synopsis as plain text                                                                                 |
| `awardCeilingUsd`, `awardFloorUsd`, `estimatedFundingUsd`                                      | `1900000`, `0`, `1900000`                                                                                       |
| `expectedAwards`, `costSharing`                                                                | `3`, `false`                                                                                                    |
| `applicantTypes`, `eligibilityDescription`                                                     | `County governments; City or township governments`, plus notes                                                  |
| `fundingCategories`, `fundingInstruments`                                                      | `Science and Technology and other Research and Development`, `Grant`                                            |
| `contactName`, `contactEmail`, `contactPhone`                                                  | The program contact as published                                                                                |
| `postedDate`, `lastUpdatedDate`, `version`                                                     | When it was posted and last changed                                                                             |
| `forecastPostingDate`, `forecastResponseDate`, `forecastAwardDate`, `forecastProjectStartDate` | Estimated dates on forecasted opportunities                                                                     |
| `detailFetchFailed`                                                                            | `true` when the details could not be read after retries; the row is still delivered and not charged for details |

Anything Grants.gov does not publish is `null`.

### How to use it

Pick a keyword and filters, or none, and run. The default delivers everything posted in the last 7
days.

```json
{
  "keyword": "rural broadband",
  "statuses": ["posted"],
  "postedWithinDays": 30,
  "includeDetails": true,
  "maxResults": 200
}
```

**A weekly feed of new and changed opportunities:** set `postedWithinDays: 14`, `newOnly: true`,
`includeDetails: true`, create a key-value store in Apify Console and select it as `stateStoreId`,
then schedule the task weekly. Each run delivers opportunities you have not seen, and any you have
seen whose posting changed (new close date, new funding, revised text), marked `isUpdate: true`.
Rows a run delivers are remembered even when it stops at `maxResults` or a spending cap; a run that
fails remembers nothing. Change detection reads the details of opportunities it has already
delivered to see whether they changed, so those reads are charged even when nothing is delivered.

**Only what your organisation can apply for:** filter by applicant type, for example
`"eligibilities": ["01", "02"]` for county and city governments, `["12"]` for nonprofits with
501(c)(3) status, `["25"]` for others. Filter by field with `fundingCategories` (`ED` education,
`EN` energy, `HL` health, `AG` agriculture, `CD` community development, `ST` science and technology
and so on) and by funder with `agencyCodes` (`HHS-NIH11`, `USDA-NIFA`, `DOE-ARPAE`...). The codes
are the ones Grants.gov uses in its own search; any combination works, and empty lists mean no
filter.

**Forecasts too:** add `"forecasted"` to `statuses` to see opportunities agencies plan to post, with
their estimated posting, response and award dates, months before they open.

**Any Grants.gov search, as a table:** leave the filters empty, set `postedWithinDays: 0` and
`maxResults` to what you need. Results come newest first.

### Quick start

No code needed; about two minutes from input to spreadsheet. For a longer walkthrough with example
output, read the guide
[Build a federal grant tracker with new grant alerts](https://finaldynamics.com/grants-gov-guide.html).

1. Open the example "New federal grant opportunities, last 14 days" on this actor's page, or paste
   one of the inputs above into the input form.
2. Click **Start** and wait until the run shows **Succeeded**.
3. Open the **Output** tab to see the opportunities as a table.
4. Click **Export**, choose CSV or Excel, and download the file.
5. In Google Sheets, choose **File > Import > Upload** and select the file.

### Automate it

**A weekly grant feed:** keep `postedWithinDays` in the task (for example 14). Click **Save as a new
task**, then add a schedule for that task under **Schedules** in Apify Console (for example every
Monday at 07:00). To get only new and changed opportunities, turn on `newOnly` and select a
key-value store as `stateStoreId`, as described above.

**Into Google Sheets with n8n:** add the **Apify** node with the **On new Apify Event** trigger,
choose your task and the succeeded event, then add an **Apify** node with **Get Dataset Items**
using the run's `defaultDatasetId`, and finish with a **Google Sheets** node that appends the rows.
Every scheduled run then adds its opportunities to the same sheet. Make and Zapier have Apify
integrations that work the same way.

### Pricing

Pay per event. There are no platform usage charges on top.

| Event                |  Price | When                                                  |
| -------------------- | -----: | ----------------------------------------------------- |
| `actor-start`        |  $0.01 | Once per run                                          |
| `opportunity`        | $0.004 | Per opportunity row delivered                         |
| `opportunity-detail` | $0.003 | Per opportunity page read, only with `includeDetails` |

Examples: a week of new opportunities (about 40) without details costs $0.17; with details $0.29. A
run that finds nothing costs $0.01.

Set a maximum charge on the run if you want a hard ceiling; the actor stops cleanly at the cap.

### Good to know

- The source is the official Grants.gov search API, the same one behind the public site, so what you
  get matches grants.gov exactly, including agencies' own typos.
- Grants.gov lists federal opportunities only. State, foundation and corporate funding are not on
  it.
- Dates are Grants.gov's own calendar dates (US Eastern). `postedWithinDays` counts those days, so a
  run at any hour sees the same window as the site.
- Descriptions are plain text with the formatting removed; attachments are not downloaded. The `url`
  opens the full posting with its documents.
- Closed and archived opportunities are searchable with `"statuses": ["closed"]` and
  `"statuses": ["archived"]`, useful for seeing what a funder offered last year.
- The actor is not affiliated with Grants.gov or any federal agency. Postings can be corrected or
  withdrawn after publication; the "new only" mode reports changes it can see.

### FAQ

**How do nonprofits find federal grants?**

Set `eligibilities` to `["12"]` for 501(c)(3) nonprofits, add a keyword for your field, and run.
Schedule it with `newOnly` to receive new opportunities each week.

**Does it include state or foundation grants?**

No. Grants.gov lists federal opportunities only.

**Can I get alerts for new grant opportunities?**

Yes. Turn on `newOnly`, select a key-value store as `stateStoreId`, and schedule the task. Each run
delivers opportunities you have not seen, and changed postings when you read details.

Questions or a search that does not behave? Open an issue on the actor page and include the input
you used.

# Actor input Schema

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

Words to search for, as in the Grants.gov search box. Leave empty to include all opportunities.

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

One or more of posted, forecasted, closed or archived. Unknown values are rejected before charging.

## `agencyCodes` (type: `array`):

Grants.gov agency codes, such as USDOJ-OJP-NIJ or HHS-NIH. Passed through without checking the agency list.

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

Grants.gov category codes, such as EN (Energy), ENV (Environment), ED (Education) or HL (Health).

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

Grants.gov applicant type codes: 01 county governments, 02 city or township governments, 25 others, and other published codes.

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

Grants.gov instrument codes: G grant, CA cooperative agreement, O other or PC procurement contract.

## `postedWithinDays` (type: `integer`):

Keep opportunities opened in the last N US Eastern calendar days, including today. Future-dated rows are retained. Zero disables the date filter; undated rows are dropped only while it is active.

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

Maximum rows delivered. Reaching this limit marks the run truncated. Values above 5000 are capped at 5000.

## `includeDetails` (type: `boolean`):

Include description, funding, eligibility, contact and forecast dates. Each successful detail fetch costs $0.003, including unchanged comparisons; failed detail requests are uncharged. Detail requests, including retries, are capped at 2 \* maxResults + 50 per run.

## `newOnly` (type: `boolean`):

First run delivers all matches. Later runs deliver unseen IDs or changed fingerprints. With details, compare version and full lastUpdatedDate; unchanged comparisons pay only for successful detail fetches. Without details, compare status, close date and title. Switching schemes compares stored search parts without false updates. Truncated and failed runs do not advance state.

## `stateStoreId` (type: `string`):

Needed for "only new and changed" on Apify: create a key-value store in Apify Console and select it here. The actor remembers what it has delivered for 400 days.

## Actor input object example

```json
{
  "keyword": "",
  "statuses": [
    "posted"
  ],
  "agencyCodes": [],
  "fundingCategories": [],
  "eligibilities": [],
  "fundingInstruments": [],
  "postedWithinDays": 7,
  "maxResults": 200,
  "includeDetails": false,
  "newOnly": false,
  "stateStoreId": ""
}
```

# Actor output Schema

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

Delivered federal grant opportunities, including optional synopsis details and new or changed opportunity flags.

## `files` (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 = {
    "keyword": "",
    "statuses": [
        "posted"
    ],
    "agencyCodes": [],
    "fundingCategories": [],
    "eligibilities": [],
    "fundingInstruments": [],
    "postedWithinDays": 7,
    "maxResults": 200,
    "includeDetails": false,
    "newOnly": false,
    "stateStoreId": ""
};

// Run the Actor and wait for it to finish
const run = await client.actor("finaldynamics/grants-gov-opportunity-feed").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": "",
    "statuses": ["posted"],
    "agencyCodes": [],
    "fundingCategories": [],
    "eligibilities": [],
    "fundingInstruments": [],
    "postedWithinDays": 7,
    "maxResults": 200,
    "includeDetails": False,
    "newOnly": False,
    "stateStoreId": "",
}

# Run the Actor and wait for it to finish
run = client.actor("finaldynamics/grants-gov-opportunity-feed").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": "",
  "statuses": [
    "posted"
  ],
  "agencyCodes": [],
  "fundingCategories": [],
  "eligibilities": [],
  "fundingInstruments": [],
  "postedWithinDays": 7,
  "maxResults": 200,
  "includeDetails": false,
  "newOnly": false,
  "stateStoreId": ""
}' |
apify call finaldynamics/grants-gov-opportunity-feed --silent --output-dataset

```

## MCP server setup

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

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/RvYAXvhXVzaok3UEz/builds/iEHaJObR1zgZ772lf/openapi.json
