# Grants.gov Scraper: Federal Grants, Forecasts & Deadlines (`mrslm_data/grants-gov-opportunities`) Actor

Scrape open and forecasted US federal grants from Grants.gov: agency, deadline, award ceiling, total funding, eligibility. Filter for nonprofits. CSV/JSON.

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

## Pricing

from $0.80 / 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.
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?

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 Grants, Forecasts & Deadlines

**Open and forecasted US federal grant opportunities from Grants.gov: agency, deadlines, award ceiling and floor, total funding, eligibility and category. $1.00 per 1,000 opportunities.**

This Grants.gov scraper turns the official Grants.gov search into a spreadsheet-ready feed. Search by keyword, filter by agency, applicant type (for example 501(c)(3) nonprofits or small businesses) and posting date, and export deadlines, award ceilings, total funding and eligibility notes to CSV, Excel or JSON. It needs no Grants.gov login or API key.

Grants.gov lists every US federal grant, cooperative agreement and funding opportunity, plus forecasts of upcoming ones. This Actor gives you a clean, filterable feed with the money details you need to qualify each one.

### Quick start

1. Press **Start**. The form is already filled with this example input, so the first run returns real rows in under a minute:

```json
{
  "keywords": [
    "artificial intelligence",
    "broadband"
  ],
  "maxResults": 30
}
```

2. Swap in your own values, or call the Actor through the Apify API, Make, Zapier, n8n or the Python/JS clients with the same JSON.
3. Download the results as JSON, CSV or Excel from the **Output** tab, or schedule the run to repeat.

**Full guide: How to Find Federal Grants for Nonprofits on Grants.gov, Including Forecasts (Real Run: Youth Programs)**

### What the Grants.gov scraper does

The Actor reads the official Grants.gov public API (api.grants.gov), the same back end the Grants.gov website uses. It runs one search per keyword you give it, applies the filters you choose (status, agency, eligibility, funding category, funding instrument, assistance listing and posting date), and saves each opportunity as one row.

With **Include funding details** on (the default), it also fetches each opportunity's detail record, which adds the fields you actually qualify a grant on: the description, award ceiling and floor, estimated total funding, expected number of awards, cost-sharing flag, eligible applicant types and eligibility notes, funding categories and instruments, assistance listings, and for forecasts the estimated post, close and award dates and fiscal year. Every row links back to the opportunity page on Grants.gov.

- Open (posted) and forecasted opportunities, plus closed and archived ones if you ask for them.
- Money and eligibility details on every row, not just the title.
- Contact names, e-mails and phone numbers of grantor staff are never output, and free-text fields are scrubbed of contact details.

### Who it is for

- **Nonprofits** that want a short, sorted list of federal opportunities they are actually eligible for, with deadlines, instead of a weekly trawl through search results.
- **Grant writers and consultants** who track opportunities for several clients and need the pipeline in a spreadsheet or CRM.
- **Universities and research offices** that follow NIH, NSF or CDC funding opportunity announcements by topic.
- **Small businesses and for-profits** looking for the minority of federal grants open to them (eligibility codes 22 and 23).
- **Policy analysts and journalists** who follow how much money agencies plan to put into a topic, using the forecasts.

### Real example: youth grants open to 501(c)(3) nonprofits

Say you write grants for a youth-services nonprofit. You want every federal opportunity that mentions youth, that is either open now or forecast, and that lists 501(c)(3) nonprofits as eligible applicants. You want the money and deadline fields so you can decide quickly which ones are worth a proposal, and you cap the first run at 25 rows.

#### Step 1: Enter the input

Open the [Grants.gov scraper](https://apify.com/mrslm_data/grants-gov-opportunities) in Apify Console, switch the input form to **JSON** and paste this. It is the exact input used for the run in this guide:

```json
{
    "keywords": [
        "youth"
    ],
    "statuses": [
        "posted",
        "forecasted"
    ],
    "eligibilities": [
        "12"
    ],
    "includeDetails": true,
    "maxResults": 25
}
```

What each setting does:

- `keywords`: `youth`. One full-text search runs per keyword, so `["youth", "mentoring"]` would run two searches and merge them without duplicates.
- `statuses`: `posted` (open for applications) and `forecasted` (announced as coming). This is also the default when you leave the field empty. Add `closed` or `archived` to research past opportunities.
- `eligibilities`: `12`, the Grants.gov code for "Nonprofits having a 501(c)(3) status with the IRS". Other useful codes: `13` nonprofits without 501(c)(3), `06` public and state universities, `20` private universities, `23` small businesses, `22` other for-profits, `07` tribal governments, `00` states, `01` counties, `02` cities, `05` school districts and `99` unrestricted. The input form shows them by name.
- `includeDetails`: `true`, so each row gets the award amounts, eligibility list, forecast dates and description. It costs one extra API call per row, but no extra charge.
- `maxResults`: `25`, a safety cap on rows saved, and therefore on cost.

Fields this example does not use, all from the input form:

- `agencies`: Grants.gov agency codes such as `HHS-NIH11`, `DOE`, `NSF` or `USDA-NIFA`.
- `fundingCategories`: activity categories such as `HL` (health), `ED` (education), `CD` (community development) or `ST` (science, technology and R\&D).
- `fundingInstruments`: `G` grant, `CA` cooperative agreement, `PC` procurement contract, `O` other.
- `assistanceListings`: CFDA / Assistance Listing numbers, for example `93.243` or `16.726`.
- `postedWithinDays`: only opportunities posted in the last N days, up to 56 (Grants.gov's own date windows are 3, 7, 14, 21, 28, 35, 42, 49 and 56 days, so the Actor uses the smallest window that covers your number).
- `maxResultsPerSearch`: a cap per keyword when you run several.

#### Step 2: Run it

Press **Start**. On 30 October 2026 this input finished with status `SUCCEEDED` in about 15 seconds and saved 25 rows. The run was charged 25 `opportunity` events plus one start event, so the bill was $0.0251 on the Free/Bronze tier. The run stopped as soon as it reached the 25-row cap.

#### Step 3: Read the output

The 9 opportunities that were **open (posted)** at the time of the run:

| opportunityNumber | title | agencyCode | awardCeiling | estimatedTotalFunding | expectedAwards | closeDate |
|---|---|---|---|---|---|---|
| O-OJJDP-2026-172743 | OJJDP FY 2026 Mentoring for Youth Impacted by Opioids and Other Substa | USDOJ-OJP-OJJDP | $2,000,000 | $16,500,000 | 15 | 2026-11-16 |
| O-OJJDP-2026-172748 | OJJDP FY 2026 Opioid Affected Youth Initiative | USDOJ-OJP-OJJDP | $750,000 | $8,920,000 | 12 | 2026-11-16 |
| O-OJJDP-2026-172737 | OJJDP FY 2026 Expanding Youth Access to Community-Based Treatment | USDOJ-OJP-OJJDP | $650,000 | $4,000,000 | 6 | 2026-11-16 |
| O-OJJDP-2026-172751 | OJJDP FY 2026 Second Chance Act Youth Reentry Program | USDOJ-OJP-OJJDP | $750,000 | $12,440,720 | 16 | 2026-11-02 |
| HHS-2026-IHS-NIHOE-0001 | National Indian Health Outreach and Education | HHS-IHS | $1,101,311 | $1,101,311 | 1 | 2026-11-02 |
| PAR-27-051 | NIH Brain Development Cohorts (NBDC) and Population Assessment of Toba | HHS-NIH11 | – | – | – | 2029-04-17 |
| P27AS00032 | Exploring and Enhancing Outdoor and Heritage Tourism in the Chesapeake | DOI-NPS | $50,000 | $1,000,000 | 26 | 2026-11-04 |
| NHTSA-693JJ926R000024-FY26 | Innovative Traffic Safety Enforcement (ITSE) Grant Program | DOT-NHTSA | $20,000,000 | $20,000,000 | 10 | 2027-09-01 |
| HHS-2026-ACF-ORR-ZU-0019 | Home Study and Post-Release Services for Unaccompanied Alien Children​ | HHS-ACF-ORR | $100,000,000 | $555,000,000 | 20 | 2027-10-01 |

"–" means Grants.gov has no value for that field on this opportunity, which is common for NIH program announcements that fund many applications of varying size.

The first 10 of the 16 **forecasted** opportunities, with the dates the agency expects:

| opportunityNumber | title | awardCeiling | estimatedPostDate | estimatedCloseDate | fiscalYear |
|---|---|---|---|---|---|
| HHS-2027-ACL-AOD-IL-0003 | Centers for Independent Living Competition - Guam | $159,762 | 2027-05-01 | 2027-07-01 | 2027 |
| HHS-2027-ACL-AOD-IM-0018 | Centers for Independent Living | $250,927 | 2027-05-01 | 2027-07-01 | 2027 |
| RFA-HD-28-006 | Learning Disabilities Research Centers | – | 2027-07-24 | 2027-10-01 | 2028 |
| RFA-HD-28-002 | Prevention and Treatment through a Comprehensive Care Continuum for HI | – | 2027-07-24 | 2027-10-28 | 2028 |
| RFA-OH-27-054 | World Trade Center Youth Research Coordinating Center (U54) | $10,000,000 | 2026-11-24 | 2027-02-23 | 2027 |
| HRSA-27-057 | Family-to-Family Health Information Centers (F2F HIC) | $96,750 | 2026-10-20 | 2026-12-19 | 2027 |
| HRSA-27-068 | Ryan White HIV/AIDS Program Part D - Women, Infants, Children and Yout | $200,000 | 2026-12-04 | 2027-02-02 | 2027 |
| CDC-RFA-CE-27-0058 | Drug-Free Communities (DFC) Support Program – NEW (Year 1) | $125,000 | 2027-01-26 | 2027-03-31 | 2027 |
| CDC-RFA-CE22-22050601CONT27 | Drug-Free Communities (DFC) Support Program – Competing Continuation ( | $125,000 | 2027-01-26 | 2027-03-31 | 2027 |
| CDC-RFA-CE-27-0024 | Comprehensive Suicide Prevention Program for States | $1,200,000 | 2027-02-16 | 2027-04-17 | 2027 |

One full row as JSON (long text shortened with …):

```json
{
    "opportunityId": "364058",
    "opportunityNumber": "O-OJJDP-2026-172743",
    "title": "OJJDP FY 2026 Mentoring for Youth Impacted by Opioids and Other Substance Use",
    "agency": "Office of Juvenile Justice Delinquency Prevention ",
    "agencyCode": "USDOJ-OJP-OJJDP",
    "status": "posted",
    "docType": "synopsis",
    "openDate": "2026-10-09",
    "closeDate": "2026-11-16",
    "assistanceListingNumbers": [
        "16.726"
    ],
    "topAgency": "Department of Justice",
    "category": "Discretionary",
    "description": "This is a notice of funding opportunity (NOFO) for the OJJDP FY 2026 Mentoring for Youth Impacted by Opioids and Other Substance Use program. This opportunity supports the implementation and delivery of high-quality mentoring services for youth who are current…",
    "awardCeiling": 2000000,
    "awardFloor": null,
    "estimatedTotalFunding": 16500000,
    "expectedAwards": 15,
    "costSharing": false,
    "fundingInstruments": [
        "Grant"
    ],
    "fundingCategories": [
        "Law, Justice and Legal Services"
    ],
    "eligibleApplicants": [
        "Public and State controlled institutions of higher education",
        "Nonprofits that do not have a 501(c)(3) status with the IRS, other than institutions of higher education",
        "Others (see text field entitled \"Additional Information on Eligibility\" for clarification)",
        "City or township governments",
        "Nonprofits having a 501(c)(3) status with the IRS, other than institutions of higher education",
        "Independent school districts",
        "County governments",
        "Native American tribal governments (Federally recognized)",
        "State governments",
        "Private institutions of higher education"
    ],
    "eligibilityNotes": "Units of local government; National organizations; Organizations having statewide reach that provide mentoring services",
    "assistanceListings": [
        "16.726 – Juvenile Mentoring Program"
    ],
    "responseDateNote": null,
    "archiveDate": null,
    "estimatedPostDate": null,
    "estimatedCloseDate": null,
    "estimatedAwardDate": null,
    "fiscalYear": null,
    "additionalInfoUrl": "https://www.ojp.gov/funding/docs/ojjdp-2026-172743.pdf",
    "estimatedProjectStart": null,
    "lastUpdated": "2026-10-09",
    "url": "https://www.grants.gov/search-results-detail/364058"
}
```

What the 25 real opportunities show:

- **Health and Human Services dominates youth funding.** 19 of the 25 come from HHS (CDC, NIH, HRSA, ACL, IHS and the Office of Refugee Resettlement), 4 from the Department of Justice's Office of Juvenile Justice and Delinquency Prevention, and one each from the Department of the Interior (National Park Service) and the Department of Transportation (NHTSA).
- **Forecasts outnumber open calls.** 16 of the 25 are forecasts. They are where the planning value is: CDC's Comprehensive Suicide Prevention Program for States, for example, is forecast with $117.5 million in total funding across 26 awards of $650,000 to $1.2 million, closing around 17 April 2027. A forecast gives you months to line up partners and data before the notice of funding opportunity is posted.
- **Deadlines cluster.** Four of the open OJJDP opportunities close on 16 November or 2 November 2026, less than three weeks after this run. The OJJDP Mentoring for Youth Impacted by Opioids program offers up to $2 million per award, $16.5 million in total and 15 awards.
- **"Eligible" is broad.** Asking for code 12 returns every opportunity that lists 501(c)(3) nonprofits among its eligible applicants. Most also list governments, universities and tribes (six of them list 15 applicant types), so read `eligibilityNotes` for the real restrictions. The Centers for Independent Living competition for Guam, for example, is open only to consumer-controlled, cross-disability nonprofit agencies.
- **Some amounts are missing on purpose.** Three rows (two NIH research center announcements and the NIH Brain Development Cohorts biospecimen access notice) have no award ceiling or total funding. Grants.gov leaves those fields empty when the agency does not publish them.
- **Cost sharing is rare.** Only the two Drug-Free Communities forecasts ($125,000 per award, 50 awards each) require cost sharing in this sample.

### Posted, forecasted and the forecast dates

A **posted** opportunity (`docType` `synopsis`) is open: it has an `openDate` and a `closeDate`, and you can apply on Grants.gov. A **forecasted** opportunity (`docType` `forecast`) is the agency's announcement that it intends to post one. It has no `closeDate` yet; instead it carries `estimatedPostDate`, `estimatedCloseDate`, `estimatedAwardDate`, `estimatedProjectStart` and `fiscalYear`. These are estimates by the agency and they slip, so treat them as planning dates, not deadlines.

When a forecast turns into a posted opportunity, Grants.gov usually keeps the same opportunity number. If you save each run, you can match rows on `opportunityNumber` to see which forecasts have opened and whether the money changed.

`awardCeiling` and `awardFloor` are the maximum and minimum for a single award. `estimatedTotalFunding` is the total the agency expects to spend across all awards, and `expectedAwards` is how many it expects to make. Dividing the total by the number of awards is a quick way to estimate a typical award when only the ceiling is given.

### Output fields

Each row in the dataset has these fields. The example column shows a value from the run above.

| Field | What it means | Example from this run |
|---|---|---|
| `opportunityId / opportunityNumber` | Grants.gov internal ID and the agency's funding opportunity number. | 364058 / O-OJJDP-2026-172743 |
| `title` | Opportunity title (HTML entities decoded). | OJJDP FY 2026 Mentoring for Youth Impacted by Opioids and Other Substance Use |
| `agency / agencyCode / topAgency` | Posting agency, its Grants.gov code and the parent department. | Office of Juvenile Justice Delinquency Prevention / USDOJ-OJP-OJJDP / Department of Justice |
| `status / docType` | posted, forecasted, closed or archived; synopsis or forecast. | posted / synopsis |
| `openDate / closeDate / archiveDate` | When it opened, the application deadline and when it will be archived. | 2026-10-09 / 2026-11-16 / null |
| `description` | Synopsis or forecast text, up to 5,000 characters, contacts scrubbed. | This is a notice of funding opportunity (NOFO) for the OJJDP FY 2026 Mentoring… |
| `awardCeiling / awardFloor` | Largest and smallest single award, in US dollars. | 2000000 / null |
| `estimatedTotalFunding / expectedAwards` | Total program funding and number of awards expected. | 16500000 / 15 |
| `costSharing` | Whether the applicant must contribute matching funds. | false |
| `category` | Funding category as Grants.gov labels it, for example Discretionary or Mandatory. | Discretionary |
| `fundingInstruments / fundingCategories` | Grant, cooperative agreement and so on; activity categories. | \["Grant"] / \["Law, Justice and Legal Services"] |
| `eligibleApplicants / eligibilityNotes` | Applicant types allowed and the agency's free-text eligibility notes (up to 1,500 characters). | 10 types / Units of local government; National organizations; Organizat… |
| `assistanceListingNumbers / assistanceListings` | CFDA numbers, alone and with program titles. | \["16.726"] / \["16.726 – Juvenile Mentoring Program"] |
| `estimatedPostDate / estimatedCloseDate / estimatedAwardDate / estimatedProjectStart / fiscalYear` | Forecast-only planning dates. | 2027-05-01 / 2027-07-01 / 2027-09-01 / null / 2027 (Guam forecast) |
| `responseDateNote` | Agency note about the deadline, when given. | null |
| `additionalInfoUrl` | Link to the full notice or the agency's page. | https://www.ojp.gov/funding/docs/ojjdp-2026-172743.pdf |
| `lastUpdated` | When the opportunity was last changed on Grants.gov. | 2026-10-09 |
| `url` | The opportunity page on Grants.gov. | https://www.grants.gov/search-results-detail/364058 |
| `scrapedAt` | When the row was read. | 2026-10-30T23:21:56.333Z |

With **Include funding details** off, the row keeps only the search fields (IDs, number, title, agency, status, dates and assistance listing numbers), which is enough for a quick count of what is out there.

### Export federal grant opportunities to CSV, Excel or Google Sheets

Every run saves its rows to a dataset, and a dataset can be downloaded in any common format without code.

**From Apify Console.** Open the run, go to the **Output** tab and click **Export**. Pick CSV, Excel (XLSX), JSON, XML, HTML or RSS, and tick only the columns you want. Nested values such as lists and objects are flattened into columns like `name/0` or `object/field` in CSV and Excel.

**From a URL.** The same export is a plain HTTPS link. Replace `<DATASET_ID>` with the dataset ID shown on the run's **Storage** tab:

```bash
## CSV with just the columns you need
curl -H "Authorization: Bearer $APIFY_TOKEN" \
  "https://api.apify.com/v2/datasets/<DATASET_ID>/items?format=csv&clean=1&fields=opportunityNumber,title,agencyCode,status,closeDate,estimatedCloseDate,awardCeiling,estimatedTotalFunding,expectedAwards,costSharing,url" -o youth-grants.csv

## Excel
curl -H "Authorization: Bearer $APIFY_TOKEN" \
  "https://api.apify.com/v2/datasets/<DATASET_ID>/items?format=xlsx&clean=1" -o youth-grants.xlsx
```

**Into Google Sheets.** Three options, from simplest to most automatic:

1. **One-off:** download the CSV and use **File > Import > Upload** in Google Sheets. Choose "Replace current sheet" to refresh an existing tab.
2. **Automatic, no code:** use Make, Zapier or n8n as described in the next section, ending in a Google Sheets "Add row" step.
3. **Formula:** `=IMPORTDATA("https://api.apify.com/v2/actor-tasks/<USERNAME>~<TASK_NAME>/runs/last/dataset/items?status=SUCCEEDED&format=csv&token=<YOUR_TOKEN>")` always pulls the latest successful run of a saved task. The token sits in the formula, so anyone who can open the sheet can see it. Only use this in a private sheet.

A tip for grant calendars: sort the sheet by `closeDate`, then by `estimatedCloseDate`, so open deadlines come first and forecasts follow in expected order.

### Use it from Make, Zapier or n8n

All three automation tools have an official Apify app, so you can run this Actor and pass its rows on without writing code.

1. **Trigger.** Use a schedule in the automation tool, or Apify's "Watch Actor runs" / "Watch task runs" trigger if you already schedule the task in Apify.
2. **Run.** Add the Apify "Run Actor" (or "Run task") action, choose `mrslm_data/grants-gov-opportunities` and paste the JSON input from Step 1. Turn on "wait for finish" so the next step gets the data.
3. **Get the rows.** Add "Get dataset items" and map the run's default dataset ID from the previous step.
4. **Send them on.** Add a Google Sheets "Add row" step for a pipeline sheet, an Airtable or Notion record per opportunity, or a Slack or e-mail message that lists the new opportunities with their deadlines and links. A filter step on `status` = posted or on `awardCeiling` keeps only what you would apply for.

Each module only moves data; the Actor's pricing is the same as when you run it in Console.

### Schedule a weekly grants digest

Agencies post new opportunities and forecasts on most working days. A weekly run with `postedWithinDays` set to 7 returns only what was posted that week, so each run is a short "new this week" list. Leave `postedWithinDays` at 0 for a full monthly refresh of everything open and forecast.

1. In the Actor's input form, set up the input from Step 1 and click **Save as new task**. Give it a clear name such as `youth-grants-weekly`.
2. Go to **Schedules > Create new**, set the cron expression to `0 7 * * 1` and pick your timezone, so it runs every Monday at 7 AM.
3. Add the task to the schedule and save. Each run gets its own fresh dataset.
4. Optional: on the task's **Integrations** tab, add a webhook, Slack or email notification for "Run succeeded", or connect Make, Zapier or n8n, so the new rows go where you need them.

To fetch the newest results without looking up a run ID, use the task's last-run link: `https://api.apify.com/v2/actor-tasks/<USERNAME>~youth-grants-weekly/runs/last/dataset/items?status=SUCCEEDED&format=json`.

### Call it from the API (Python, JavaScript or curl)

Start the Actor from your own code with the official Apify clients. Put your API token (Console > Settings > API & Integrations) in an environment variable called `APIFY_TOKEN` rather than in the code.

**Python** (`pip install "apify-client>=3"`):

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])
run_input = {
    "keywords": [
        "youth"
    ],
    "statuses": [
        "posted",
        "forecasted"
    ],
    "eligibilities": [
        "12"
    ],
    "includeDetails": true,
    "maxResults": 25
}

run = client.actor("mrslm_data/grants-gov-opportunities").call(run_input=run_input)

## apify-client 3.x returns a Run object, so use run.default_dataset_id
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item["closeDate"] or item["estimatedCloseDate"], item["title"], item["awardCeiling"])
```

In apify-client 3.x, `call()` returns a typed object. Older examples that use `run["defaultDatasetId"]` were written for 1.x and 2.x and fail in 3.x with `TypeError: 'Run' object is not subscriptable`.

**JavaScript / Node.js** (`npm install apify-client`):

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const input = {
    "keywords": [
        "youth"
    ],
    "statuses": [
        "posted",
        "forecasted"
    ],
    "eligibilities": [
        "12"
    ],
    "includeDetails": true,
    "maxResults": 25
};

const run = await client.actor('mrslm_data/grants-gov-opportunities').call(input);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.length, items[0].title);
```

**curl**, one request that runs the Actor and returns the rows as CSV (it waits up to 5 minutes, so keep the input small):

```bash
curl -X POST "https://api.apify.com/v2/acts/mrslm_data~grants-gov-opportunities/run-sync-get-dataset-items?format=csv" \
  -H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" \
  -d '{"keywords": ["youth"], "statuses": ["posted", "forecasted"], "eligibilities": ["12"], "includeDetails": true, "maxResults": 25}' -o youth-grants.csv
```

### Use it from AI agents and chat assistants (MCP)

Apify runs a hosted Model Context Protocol (MCP) server, so assistants such as Claude Desktop, Cursor, VS Code or any other MCP client can call this Actor as a tool. Add this server URL to your MCP client and sign in with your Apify account (or send your API token as a Bearer header):

```
https://mcp.apify.com/?tools=mrslm_data/grants-gov-opportunities
```

The assistant then sees the Actor's input fields, can start a run with the input it builds from your request, and reads the dataset rows back. A prompt like this works well:

> Find open and forecasted federal grants about youth mentoring that 501(c)(3) nonprofits can apply for, at most 25, and list them by deadline with the award ceiling and total funding.

Runs started through MCP are billed exactly like any other run, per row saved, so it is worth asking the assistant to set `maxResults`.

### What it costs

The Actor uses pay-per-event pricing: you pay for each opportunity saved, and nothing for compute.

#### Price per event

| Event (per 1,000) | Free / Bronze | Silver | Gold / Platinum / Diamond |
|---|---|---|---|
| Opportunity saved (`opportunity`) | $1.00 | $0.90 | $0.80 |
| Actor start (once per run at the default memory, not per 1,000) | $0.00005 | $0.00005 | $0.00005 |

You are charged only for the events in this table: nothing for compute, and nothing for searches that return no rows beyond the start fee.

| Scenario | Free / Bronze | Silver | Gold |
|---|---|---|---|
| The run in this guide (25 opportunities) | $0.0251 | $0.0226 | $0.0201 |
| Weekly "new this week" digest, ~40 opportunities a week (4 runs a month) | $0.16 | $0.14 | $0.13 |
| Monthly full refresh for 10 client keywords, ~1,000 opportunities | $1.00 | $0.90 | $0.80 |
| One-off: every posted and forecasted opportunity, ~3,000 rows | $3.00 | $2.70 | $2.40 |

The monthly and one-off rows are estimates; the real counts depend on your keywords and filters. To cap spending, set **Maximum cost per run** in the run options (or `maxTotalChargeUsd` in the API). The Actor stops cleanly at the cap and you are never billed past it.

### Tips

- **Start broad, then filter in the sheet.** Grants.gov keyword search is full-text, so `youth` also matches opportunities that mention youth only in passing. It is cheaper to pull 100 rows and filter on `fundingCategories` or `agencyCode` than to run many narrow searches.
- **Use assistance listings for programs you already know.** If you have won under CFDA 16.726 before, put it in `assistanceListings` to see every new notice under that program, whatever its title.
- **Use eligibility codes as a first cut only.** The list of eligible applicant types is wide on most opportunities. Always read `eligibilityNotes` and the full notice at `additionalInfoUrl`.
- **Keep forecasts.** They are the best early warning you get. Save runs and compare `opportunityNumber` to see when a forecast opens.
- **Turn details off for counts.** With `includeDetails` off a run is faster, and the row still has title, agency, status and dates.

### Limits

- Each keyword search reads up to 5,000 results (50 pages of 100). For more, split the search by agency, category or status.
- `postedWithinDays` follows Grants.gov's fixed windows and goes back at most 56 days.
- Award amounts, eligibility and forecast dates are whatever the agency entered; some are empty, and forecast dates often move.
- The Actor reads Grants.gov only. It does not include state, foundation or corporate grants, and it does not include awards already made (for those, see the USAspending Actor below).
- It does not apply for anything or log in to Grants.gov workspaces.

### FAQ

**Is there an API for Grants.gov search?** Grants.gov publishes a public search API, but you have to page through results and fetch each opportunity's detail record yourself. This Actor does both and returns one clean row per opportunity, so you can use it as a Grants.gov API alternative from Make, Zapier, n8n or your own code.

**Is this the same data as Grants.gov?**
Yes. It comes from the official Grants.gov public API, and every row links to the opportunity page on grants.gov.

**Does it include forecasts?**
Yes. Forecasted opportunities are included by default, with their estimated post, close and award dates and fiscal year.

**Can I get only grants my organisation can apply for?**
Use `eligibilities` with your applicant type (for example `12` for 501(c)(3) nonprofits or `23` for small businesses). It keeps opportunities that list that type; check `eligibilityNotes` for extra conditions.

**How do I get only new opportunities?**
Set `postedWithinDays` (for example 7) and schedule the task weekly.

**Why is the award ceiling empty on some rows?**
The agency did not publish one. This is common for NIH program announcements that fund applications of many sizes.

**Are contact details included?**
No. Grantor contact names, e-mails and phone numbers are never output, and free-text fields are scrubbed of contact details.

**Can I see who won past grants?**
Not with this Actor: Grants.gov lists opportunities, not awards. Use the [USAspending Federal Awards Scraper](https://apify.com/mrslm_data/usaspending-awards) with the grants category for awards made.

**Does it work with Make, Zapier or n8n?**
Yes. All three have an Apify app. Use "Run Actor" (or run a saved task), then "Get dataset items" to pass the rows on to Google Sheets, Airtable, a CRM or Slack.

**Can AI agents use it?**
Yes, through Apify's MCP server at `https://mcp.apify.com/?tools=mrslm_data/grants-gov-opportunities`, as shown above.

### Is it legal?

This Actor only reads official open-data APIs that the publisher offers to everyone without a login or key. It obeys robots.txt, stays under the published rate limits, and never tries to get past logins, paywalls, captchas or bot checks. Grantor contact names, e-mails and phone numbers are never output, and free-text fields are scrubbed of contact details. You are responsible for how you use the data: follow the source's licence and terms and the privacy and marketing laws that apply to you (GDPR, CAN-SPAM, PECR, etc.). This tool is independent and not affiliated with or endorsed by the data publisher.

# Actor input Schema

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

Search terms, one search per line, e.g. broadband, artificial intelligence.

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

Default: posted and forecasted.

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

Grants.gov agency codes, e.g. DOE, HHS-NIH11, USDA-NIFA, NSF.

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

Who can apply.

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

Activity categories.

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

Type of funding.

## `assistanceListings` (type: `array`):

CFDA / Assistance Listing numbers, e.g. 93.243.

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

Only opportunities posted in the last N days (up to 56). 0 = any date.

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

Fetch each opportunity's details: description, award ceiling and floor, total funding, eligibility, categories and forecast dates. One extra API call per row.

## `maxResultsPerSearch` (type: `integer`):

Cap per search term (or per source). 0 = no cap.

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

Safety cap on saved opportunities across the whole run. 0 = no cap. Your max cost per run is always respected.

## Actor input object example

```json
{
  "keywords": [
    "artificial intelligence",
    "broadband"
  ],
  "postedWithinDays": 0,
  "includeDetails": true,
  "maxResultsPerSearch": 0,
  "maxResults": 30
}
```

# Actor output Schema

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

All opportunities as a dataset (JSON, CSV, Excel and more via the API or Console).

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

Matches and saved rows per search, failures and the stop reason.

# 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",
        "broadband"
    ],
    "maxResults": 30
};

// Run the Actor and wait for it to finish
const run = await client.actor("mrslm_data/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 = {
    "keywords": [
        "artificial intelligence",
        "broadband",
    ],
    "maxResults": 30,
}

# Run the Actor and wait for it to finish
run = client.actor("mrslm_data/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 '{
  "keywords": [
    "artificial intelligence",
    "broadband"
  ],
  "maxResults": 30
}' |
apify call mrslm_data/grants-gov-opportunities --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,mrslm_data/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/fWeBeLpvRLudnvcvH/builds/dXhIxODd6W59tbVL8/openapi.json
