# Grants.gov Scraper - Federal Grant Opportunities API (`504spam/grants-gov-opportunities`) Actor

Search and monitor U.S. federal grant opportunities from Grants.gov by keyword, agency, category, eligibility and status. Get deadlines, award ceilings, eligibility and full descriptions as JSON, CSV or Excel.

- **URL**: https://apify.com/504spam/grants-gov-opportunities.md
- **Developed by:** [Damion Morgan](https://apify.com/504spam) (community)
- **Categories:** Lead generation, Automation, News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.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

I built this because checking Grants.gov by hand every day gets old fast. The site's search works, but there's no clean way to export results, filter them properly, or get pinged when something new shows up in your area. This Actor fixes that.

It pulls federal grant opportunities straight from the official Grants.gov API and hands you clean rows: title, agency, deadline, award amounts, who's eligible, the full description, and the agency contact. Export as JSON, CSV or Excel, or plug it into Make, Zapier, n8n or your own code.

### What people use it for

- Grant writers who want a fresh list of opportunities for their clients each morning
- Nonprofits, schools and small businesses keeping tabs on funding in their field
- Developers feeding grant data into a CRM, a newsletter, or an AI assistant

### How to use it

Type a keyword, pick the statuses you care about (posted, forecasted, closed, archived), and optionally narrow it by agency, funding category or eligibility. That's it.

Want only new grants? Set **Posted within (days)** to `1` and put the Actor on a daily schedule. You'll get just what was posted since yesterday.

```json
{ "keyword": "artificial intelligence", "statuses": ["posted", "forecasted"], "postedWithinDays": 7, "maxResults": 200 }
```

### What you get back

```json
{ "opportunityNumber": "PD-19-127Y", "title": "Science of Learning and Augmented Intelligence (SL)", "agency": "U.S. National Science Foundation", "status": "posted", "closeDate": "02/10/2027", "awardCeiling": null, "eligibleApplicants": ["Unrestricted ..."], "url": "https://www.grants.gov/search-results-detail/320753" }
```

Some fields (like award ceiling) are blank when the agency didn't fill them in on Grants.gov. I pass the data through as published rather than guessing.

### Cost

$2 per 1,000 grants, plus half a cent per run. A typical daily check costs a fraction of a cent, and Apify's free monthly credits cover plenty of testing.

### Good to know

- It uses the public Grants.gov API, so there's no login, no proxies and nothing to get blocked.
- Data is live. Every run asks Grants.gov directly.
- Grants.gov is public U.S. government data. The only contact info included is the agency contact listed on each notice.
- SAM.gov contract data isn't included here. I'm working on a separate Actor for that.

Found a bug or want a field added? Open an issue on the Actor's page and I'll take a look.

# Actor input Schema

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

Free-text search, e.g. 'artificial intelligence', 'rural broadband'.

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

Which statuses to include.

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

Optional agency codes, e.g. NSF, HHS-NIH11, DOE.

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

Optional Grants.gov category codes, e.g. ST (Science & Tech), HL (Health), ED (Education).

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

Optional eligibility codes, e.g. 25 (others), 20 (private universities), 12 (nonprofits).

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

Only opportunities posted in the last N days (good for daily monitoring). 0 = any.

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

Fetch description, award amounts, eligibility text, contact and links for every result.

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

Stop after this many opportunities.

## Actor input object example

```json
{
  "keyword": "artificial intelligence",
  "statuses": [
    "posted",
    "forecasted"
  ],
  "postedWithinDays": 0,
  "includeDetails": true,
  "maxResults": 100
}
```

# Actor output Schema

## `results` (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": "artificial intelligence"
};

// Run the Actor and wait for it to finish
const run = await client.actor("504spam/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 = { "keyword": "artificial intelligence" }

# Run the Actor and wait for it to finish
run = client.actor("504spam/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 '{
  "keyword": "artificial intelligence"
}' |
apify call 504spam/grants-gov-opportunities --silent --output-dataset

```

## MCP server setup

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