# Grants.gov Scraper – US Federal Grant Opportunities & Forecasts (`iamshytv/grants-gov-opportunities`) Actor

Search US federal grants from Grants.gov's official API. Filter by keyword, agency, category, eligibility, deadline and award size. Get funding amounts, eligibility, deadlines, ALN/CFDA, attachments. Daily alerts. No API key.

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

## Pricing

$3.00 / 1,000 grant 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 – US Federal Grant Opportunities & Forecasts

Find US federal funding opportunities from **Grants.gov**, the official source for every federal grant program, using its **official public API**. No API key, no login, no browser. Search by keyword, agency, funding category, eligible applicant type, Assistance Listing (ALN/CFDA) number, deadline and award size, and get clean JSON, CSV or Excel with funding amounts, eligibility, deadlines and attachment links.

Use it for **grant alerts**, **grant writing pipelines**, **nonprofit and university research offices**, **small-business (SBIR/STTR-style) funding searches**, **GovTech lead generation** and **funding market research**. It pairs well with [SAM.gov Contract Opportunities](https://apify.com/iamshytv/sam-gov-opportunities) and [EU Tenders (TED)](https://apify.com/iamshytv/ted-eu-tenders).

### What you get for each opportunity

- Opportunity ID and number, title, status (posted / forecasted / closed / archived)
- Agency and parent department (e.g. National Institutes of Health, Department of Health and Human Services)
- Posted date and **application deadline**, plus the deadline note (time zone, submission rules)
- **Award ceiling, award floor, total estimated funding, expected number of awards**, cost-sharing flag, fiscal year
- **Eligible applicant types** (small businesses, nonprofits, universities, states, tribes…) and eligibility details
- Funding instruments and categories, Assistance Listings (ALN/CFDA) with program titles
- Full description (HTML cleaned to text, length configurable)
- For forecasts: estimated post date, application date, award date and project start date
- Links to the Grants.gov page and to the full-announcement attachments

Personal contact details (names, emails, phone numbers of agency staff) are intentionally left out.

### How to use

1. Enter keywords (or leave empty for everything) and pick statuses, categories or eligible applicant types.
2. Set **Posted in the last N days** or **Closing within N days** for alert-style runs.
3. Run. Results appear in the dataset; download as JSON, CSV, Excel or use the API.

**Daily grant alert:** schedule the Actor daily with `onlyNewSinceLastRun: true` and connect the dataset to email, Slack, Google Sheets, Make or Zapier via Apify integrations. You only get (and pay for) new opportunities.

#### Example input

```json
{
  "keywords": ["artificial intelligence", "cybersecurity"],
  "statuses": ["posted", "forecasted"],
  "eligibilities": ["23"],
  "fundingCategories": ["ST"],
  "closingWithinDays": 60,
  "minAwardCeiling": 100000,
  "maxResults": 100
}
```

#### Example output (shortened)

```json
{
  "opportunityId": "364192",
  "opportunityNumber": "G27AS00040",
  "title": "Cooperative Agreement for affiliated Partner with the Great Lakes Northern Forrest Cooperative Ecosystem Studies Unit",
  "status": "posted",
  "agencyName": "Geological Survey",
  "topAgencyName": "Department of the Interior",
  "openDate": "2026-11-02",
  "closeDate": "2026-12-02",
  "assistanceListings": [{ "number": "15.808", "programTitle": "U.S. Geological Survey Research and Data Collection" }],
  "fundingInstruments": ["Cooperative Agreement"],
  "estimatedTotalFunding": 135000,
  "awardCeiling": 135000,
  "expectedNumberOfAwards": 1,
  "url": "https://www.grants.gov/search-results-detail/364192"
}
```

### Pricing

Pay per result: **$3 per 1,000 opportunities** (plus a tiny Apify start fee). A default run (50 opportunities) costs about $0.15. Set **Max results** to cap spend.

### Tips

- Agency codes: top-level (`HHS`, `NSF`, `DOE`, `USDA`, `DOD`, `ED`) or sub-agency (`HHS-NIH11`, `DOC-NOAA`).
- Turn **Include full details** off for a very fast list of titles, dates and agencies only.
- Multiple keywords run as separate searches and are merged without duplicates.

### FAQ

**Is this legal?** Yes. Grants.gov is a US government service and publishes this data through a public API intended for reuse. Federal government works are in the public domain.

**Do I need an API key?** No.

**How fresh is the data?** Every run queries Grants.gov live.

**Something broke?** Open an issue on the Actor page; I respond within 24 hours.

# Actor input Schema

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

Full-text search on Grants.gov. Each keyword runs as its own search and results are merged without duplicates. Leave empty for all opportunities.

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

Which opportunities to return. Default: posted and forecasted.

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

Only opportunities posted (or forecast) in the last N days. 0 = no limit.

## `onlyOpen` (type: `boolean`):

Drop opportunities whose close date has already passed. Opportunities without a close date are kept.

## `closingWithinDays` (type: `integer`):

Only opportunities whose application deadline is in the next N days (great for deadline alerts). 0 = off.

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

Grants.gov agency codes, top-level or sub-agency, e.g. HHS, NSF, DOE, USDA, HHS-NIH11, DOC-NOAA. Empty = all agencies.

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

Grants.gov funding activity categories. Empty = all.

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

Only opportunities open to these applicant types. Empty = all.

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

Empty = all.

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

e.g. 93.137, 47.070. Empty = all.

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

Look up a specific funding opportunity number, e.g. PD-24-127Y.

## `minAwardCeiling` (type: `integer`):

Drop opportunities whose award ceiling (or total estimated funding, when no ceiling) is below this amount. 0 = off.

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

Order of results.

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

Stop after this many opportunities. You pay per opportunity returned.

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

Fetch each opportunity's full record: description, funding amounts, eligibility, assistance listing titles, forecast dates and attachment links. Turn off for a faster, basic list.

## `descriptionMaxChars` (type: `integer`):

Truncate descriptions to this many characters. 0 = no limit.

## `onlyNewSinceLastRun` (type: `boolean`):

Remember opportunities returned in earlier runs (named key-value store) and skip them. Ideal for a daily scheduled grant alert.

## Actor input object example

```json
{
  "keywords": [
    "research",
    "technology"
  ],
  "statuses": [
    "posted",
    "forecasted"
  ],
  "postedWithinDays": 30,
  "onlyOpen": true,
  "closingWithinDays": 0,
  "agencies": [],
  "fundingCategories": [],
  "eligibilities": [],
  "fundingInstruments": [],
  "assistanceListings": [],
  "opportunityNumber": "",
  "minAwardCeiling": 0,
  "sortBy": "openDate|desc",
  "maxResults": 50,
  "includeDetails": true,
  "descriptionMaxChars": 3000,
  "onlyNewSinceLastRun": false
}
```

# Actor output Schema

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

US federal grant opportunities from Grants.gov (title, agency, deadline, funding amounts, eligibility, links). Stored in the run's default dataset.

## `runSummary` (type: `string`):

JSON record RUN_SUMMARY in the default key-value store: searches run, total matches and counts.

# 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": [
        "research",
        "technology"
    ],
    "statuses": [
        "posted",
        "forecasted"
    ],
    "postedWithinDays": 30,
    "maxResults": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("iamshytv/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": [
        "research",
        "technology",
    ],
    "statuses": [
        "posted",
        "forecasted",
    ],
    "postedWithinDays": 30,
    "maxResults": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("iamshytv/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": [
    "research",
    "technology"
  ],
  "statuses": [
    "posted",
    "forecasted"
  ],
  "postedWithinDays": 30,
  "maxResults": 50
}' |
apify call iamshytv/grants-gov-opportunities --silent --output-dataset

```

## MCP server setup

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