# Grants.gov Scraper - US Federal Grant Opportunities (`hichemdev/grants-gov-scraper`) Actor

Scrape US federal grant opportunities from Grants.gov: award ceiling and floor, total funding, number of awards, deadlines, eligibility, ALN/CFDA, contacts, full description and attachments. Filter by keyword, agency, category, eligibility and posting date. No API key.

- **URL**: https://apify.com/hichemdev/grants-gov-scraper.md
- **Developed by:** [Hichem Ben Moussa](https://apify.com/hichemdev) (community)
- **Categories:** Business, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 grants

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 - US Federal Grant Opportunities

Pull **US federal funding opportunities** from [Grants.gov](https://www.grants.gov) into clean, structured data: award ceiling and floor, estimated total funding, expected number of awards, deadlines, eligible applicant types, eligibility text, Assistance Listing (ALN/CFDA) numbers, agency contact, the full description and links to the official attachments (NOFO PDFs, budget templates).

Search by keyword, agency, funding category, applicant type, ALN or opportunity number, then run it on a schedule to catch new funding the day it is posted. No API key, no login, no proxy needed.

### Who it is for

- **Nonprofits and grant writers**: a daily or weekly feed of new grants your organization is eligible for, with the dollar amounts and deadlines already extracted.
- **Universities and research offices**: track every new NSF, NIH, DOE, DOD or NEH solicitation in your fields and route it to the right faculty.
- **Grant consultants and agencies**: build lead lists of opportunities by sector and size, and alert clients before deadlines.
- **Startups and small businesses**: watch for small-business-eligible opportunities, cooperative agreements and research funding.
- **Analysts and journalists**: measure where federal funding is going by agency, category and award size.

### What you get per opportunity

| Field | Description |
|---|---|
| `opportunityId`, `opportunityNumber` | Grants.gov ID and the agency's funding opportunity number |
| `title` | Opportunity title (HTML entities decoded) |
| `status` | `posted`, `forecasted`, `closed` or `archived` |
| `agencyCode`, `agencyName` | Posting agency, e.g. `HHS-NIH11` / National Institutes of Health |
| `parentAgencyCode`, `parentAgencyName` | Department, e.g. `HHS` / Department of Health and Human Services |
| `openDate`, `closeDate` | Posted date and application deadline, ISO `YYYY-MM-DD` |
| `closeDateIsEstimate` | `true` for forecasts, where the deadline is the agency's estimate |
| `daysUntilClose` | Days from the run date to the deadline (negative = passed) |
| `closeDateNote` | Deadline explanation, e.g. "no later than 11:59 p.m. ET" |
| `archiveDate`, `lastUpdatedDate` | When it will be archived and when it was last changed |
| `awardCeiling`, `awardFloor` | Largest and smallest individual award in USD (null when the agency gives none) |
| `estimatedTotalFunding` | Total program funding in USD |
| `expectedNumberOfAwards` | How many awards the agency expects to make |
| `costSharing` | Whether cost sharing or matching is required |
| `category` | Discretionary, Mandatory, Continuation, Earmark... |
| `fundingInstruments` | Grant, Cooperative Agreement, Procurement Contract, Other |
| `fundingCategories` | Health, Education, Science and Technology, ... |
| `eligibilities` | Eligible applicant types (nonprofits, universities, small businesses, tribes, ...) |
| `eligibilityDetails` | The agency's free-text eligibility explanation |
| `assistanceListings`, `assistanceListingTitles` | ALN (formerly CFDA) numbers and program names |
| `description` | Full synopsis, HTML stripped, paragraphs kept |
| `contactName`, `contactEmail`, `contactPhone` | Agency grants contact |
| `additionalInfoUrl` | Link to the agency's own announcement page |
| `fiscalYear`, `estimatedPostDate`, `estimatedAwardDate`, `estimatedProjectStartDate` | Forecasts only: the planned timeline |
| `attachments` | Official documents: file name, description, folder and direct download URL |
| `url` | The opportunity page on Grants.gov |

With **Include full details** turned off you get a fast, lighter record: ID, number, title, status, agency, open and close dates, ALN and URL.

### Input example

```json
{
  "keyword": "artificial intelligence",
  "opportunityStatuses": ["posted"],
  "agencies": ["NSF", "HHS"],
  "eligibilities": ["12", "20", "06"],
  "postedWithinDays": 7,
  "sortBy": "openDate|desc",
  "includeDetails": true,
  "maxItems": 200
}
```

- **Agency codes**: use Grants.gov codes. A top-level code like `HHS`, `DOD`, `DOI` or `USDA` automatically includes all of its sub-agencies (NIH, CDC, HRSA...). You can also target one sub-agency, e.g. `HHS-NIH11` or `DOD-AFOSR`.
- **Monitoring**: schedule the actor daily with `postedWithinDays: 1` (or weekly with `7`) to receive only newly posted opportunities.
- **Forecasted** opportunities are announced but not open yet. Include them to plan applications months ahead.

### Output example

A real record from a verified run (description and attachments shortened):

```json
{
  "opportunityId": 364195,
  "opportunityNumber": "20270113-CHE",
  "title": "Endowments for Advancing the Humanities",
  "status": "posted",
  "agencyCode": "NEH",
  "agencyName": "National Endowment for the Humanities",
  "parentAgencyCode": "NEH",
  "parentAgencyName": "National Endowment for the Humanities",
  "openDate": "2026-11-02",
  "closeDate": "2027-01-13",
  "closeDateIsEstimate": false,
  "daysUntilClose": 68,
  "closeDateNote": null,
  "archiveDate": null,
  "lastUpdatedDate": "2026-11-02",
  "awardCeiling": 3100000,
  "awardFloor": 1000000,
  "estimatedTotalFunding": 10000000,
  "expectedNumberOfAwards": 5,
  "costSharing": true,
  "category": "Discretionary",
  "fundingInstruments": ["Other"],
  "fundingCategories": ["Humanities"],
  "eligibilities": [
    "Nonprofits having a 501(c)(3) status with the IRS, other than institutions of higher education",
    "Private institutions of higher education",
    "Public and State controlled institutions of higher education",
    "State governments"
  ],
  "eligibilityDetails": null,
  "assistanceListings": ["45.043"],
  "assistanceListingTitles": ["National Endowment for the Humanities: Endowments for Advancing the Humanities"],
  "description": "These awards provide funds for 20-year term endowments to support long-term work in the humanities on college and university campuses and at independent educational and research institutions...",
  "contactName": "National Endowment for the Humanities",
  "contactEmail": "collections@neh.gov",
  "contactPhone": "202-606-8204",
  "additionalInfoUrl": "https://www.neh.gov/program/endowments-advancing-humanities",
  "fiscalYear": null,
  "estimatedPostDate": null,
  "estimatedAwardDate": null,
  "estimatedProjectStartDate": null,
  "attachments": [
    {
      "fileName": "EATH NOFO 2027.pdf",
      "description": "Endowments for Advancing the Humanities Notice of Funding Opportunity",
      "folder": "Full Announcement",
      "url": "https://apply07.grants.gov/grantsws/rest/opportunity/att/download/355510"
    }
  ],
  "url": "https://www.grants.gov/search-results-detail/364195"
}
```

### Good to know

- Data comes straight from the official Grants.gov public API, so it is as current as Grants.gov itself.
- Dollar amounts, award counts and eligibility text are entered by each agency. Some leave fields blank or use placeholders (for example an award floor of `1`); the actor reports exactly what the agency published and never invents a value. Fields the agency left empty are `null`.
- Contact fields are what the agency entered: sometimes a named program officer, sometimes a shared mailbox and the agency name.
- Forecasted opportunities usually have no official deadline yet; their `closeDate` is the agency's estimated application date and `closeDateIsEstimate` is `true`.
- Some long-running announcements carry placeholder deadlines far in the future (e.g. 2076 or 2099). Those come from Grants.gov as-is.
- With details on, the actor makes one extra request per opportunity, so a run of 200 opportunities takes about a minute.

### FAQ

**Do I need a Grants.gov account or API key?** No. The search and opportunity APIs are public.

**How do I get only new grants?** Schedule the actor and set `postedWithinDays` to match your schedule (1 for daily, 7 for weekly). Sort by "Newest posted first".

**Can I find SBIR/STTR or small-business funding?** Yes: search a keyword like `SBIR` or `small business innovation`, and/or set Eligible applicants to "Small businesses". Note that many SBIR solicitations are published on agency sites rather than Grants.gov.

**What do the eligibility filters miss?** Many opportunities are tagged "Others" or "Unrestricted" and explain eligibility in text. Add those two types to your filter so you don't miss them, then read `eligibilityDetails`.

**Can I export to Excel, Google Sheets or a CRM?** Yes. Download the dataset as CSV, Excel or JSON, or connect it to Make, Zapier, Google Sheets or a webhook through Apify integrations.

# Actor input Schema

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

Free-text search across opportunity titles, numbers and descriptions, e.g. artificial intelligence, broadband, opioid, climate resilience. Leave empty to list every opportunity that matches the other filters.

## `opportunityStatuses` (type: `array`):

Which stages to include. Posted = open for applications now. Forecasted = announced, not open yet (great for planning ahead). Closed and archived are past opportunities.

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

Only opportunities posted in the last N days. Set to 1 or 7 on a daily or weekly schedule to get just the new funding. Leave empty for no date limit.

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

Grants.gov agency codes, e.g. NSF, HHS, HHS-NIH11, DOE, USDA, DOD-AFOSR, ED. A top-level code like HHS automatically includes all of its sub-agencies (NIH, CDC, HRSA...).

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

Only opportunities in these categories of funding activity.

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

Only opportunities funded through these instrument types.

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

Only opportunities open to these applicant types. Note: many opportunities use 'Others' or 'Unrestricted' and explain eligibility in text, so include those to avoid missing results.

## `assistanceListing` (type: `string`):

Only opportunities under this Assistance Listing number, e.g. 47.070 (NSF Computer and Information Science) or 93.243.

## `opportunityNumber` (type: `string`):

Look up a specific funding opportunity number, e.g. 26-504 or RFA-AG-26-021.

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

Order of results. Newest first is best for monitoring; soonest deadline first is best for finding what to apply to now.

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

Fetch each opportunity's detail record: award ceiling and floor, total funding, number of awards, cost sharing, eligibility text, full description, contact and attachments. Costs one extra request per opportunity; turn off for a fast list of titles, dates and agencies only.

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

Stop after this many opportunities.

## `proxyConfiguration` (type: `object`):

Optional. Grants.gov is a public API, so a proxy is normally not needed.

## Actor input object example

```json
{
  "keyword": "artificial intelligence",
  "opportunityStatuses": [
    "posted"
  ],
  "sortBy": "openDate|desc",
  "includeDetails": true,
  "maxItems": 15
}
```

# Actor output Schema

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

All scraped items as JSON.

## `overview` (type: `string`):

Browse results in the Apify Console.

# 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": "artificial intelligence",
    "opportunityStatuses": [
        "posted"
    ],
    "sortBy": "openDate|desc",
    "maxItems": 15
};

// Run the Actor and wait for it to finish
const run = await client.actor("hichemdev/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": "artificial intelligence",
    "opportunityStatuses": ["posted"],
    "sortBy": "openDate|desc",
    "maxItems": 15,
}

# Run the Actor and wait for it to finish
run = client.actor("hichemdev/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": "artificial intelligence",
  "opportunityStatuses": [
    "posted"
  ],
  "sortBy": "openDate|desc",
  "maxItems": 15
}' |
apify call hichemdev/grants-gov-scraper --silent --output-dataset

```

## MCP server setup

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