# Grants.gov API — Federal Grants, Deadlines, Contacts (`lmhsolutions/grants-gov-scraper`) Actor

Search and extract U.S. federal grant opportunities from the official Grants.gov public API. Titles, agencies, deadlines, award amounts, eligibility, CFDA/ALN, and grantor contacts — no login or API key.

- **URL**: https://apify.com/lmhsolutions/grants-gov-scraper.md
- **Developed by:** [LMH Solutions](https://apify.com/lmhsolutions) (community)
- **Categories:** Lead generation, Developer tools, Automation
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 75.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.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 Federal Grants Scraper — Opportunities, Deadlines & Contacts

**SEO title:** Grants.gov Scraper | Federal Grant Opportunities, Deadlines, Awards & Contacts\
**SEO description:** Extract open U.S. federal grants from Grants.gov via the official public API. Get agency, deadline, award ceiling/floor, CFDA, eligibility, and grantor email — no login, no API key.

Search and extract **U.S. federal grant opportunities** from the official [Grants.gov](https://www.grants.gov) public REST API (`search2` + `fetchOpportunity`). No browser, no proxies, no API key, and no login.

Built for grant writers, nonprofit development teams, university sponsored-programs offices, consultants, journalists, and AI agents that need structured funding data on a schedule.

### Why this Actor

- **Official source** — Uses Grants.gov’s documented public endpoints (no HTML scraping). Auth is not required for search or opportunity fetch ([API guide](https://grants.gov/api/api-guide)).
- **Buyer-ready fields** — Titles, agencies, open/close dates, award floor/ceiling, funding instrument, eligibility, CFDA/ALN numbers, and grantor contact email/phone.
- **Filterable** — Keyword, status (posted/forecasted/closed/archived), agency codes, funding instruments.
- **Cheap to run** — Pure HTTP JSON; no residential proxies.
- **Apify-native** — Clean dataset rows, Store-ready input schema, PPE-friendly one-row-per-opportunity output.

### What you get (sample fields)

| Field | Description |
| --- | --- |
| `opportunityNumber` | Grants.gov opportunity number |
| `title` | Opportunity title |
| `agency` / `agencyCode` | Funding agency |
| `status` | `posted`, `forecasted`, `closed`, or `archived` |
| `postedDate` / `closeDate` | Open and close dates |
| `awardCeiling` / `awardFloor` | Award range when published |
| `fundingInstruments` | Grant, cooperative agreement, etc. |
| `cfdaNumbers` | CFDA / Assistance Listing numbers |
| `applicantTypes` | Who can apply |
| `description` | Plain-text synopsis |
| `contactEmail` / `contactPhone` | Grantor contact |
| `detailUrl` | Canonical Grants.gov detail page |

### How to use

1. Click **Try for free** / **Start**.
2. Keep the default keyword (`artificial intelligence`) or enter your own (e.g. `broadband`, `workforce`, `climate resilience`).
3. Optionally set agency codes (`NSF|NIH`), statuses, and `maxResults`.
4. Run. Export JSON/CSV/Excel or pull via Apify API / webhook / schedule.

#### Example input

```json
{
  "keyword": "artificial intelligence",
  "statuses": ["posted"],
  "agencies": "NSF|NIH",
  "maxResults": 25,
  "includeDetails": true
}
```

#### Example output (truncated)

```json
{
  "opportunityId": "320753",
  "opportunityNumber": "PD-19-127Y",
  "title": "Science of Learning and Augmented Intelligence (SL)",
  "agency": "U.S. National Science Foundation",
  "agencyCode": "NSF",
  "status": "posted",
  "postedDate": "09/19/2019",
  "closeDate": "02/10/2027",
  "awardFloor": "550",
  "fundingInstruments": ["Grant"],
  "cfdaNumbers": ["47.075"],
  "contactEmail": "grantsgovsupport@nsf.gov",
  "detailUrl": "https://www.grants.gov/search-results-detail/320753",
  "source": "grants.gov"
}
```

### Suggested pay-per-event pricing

Apify is moving Store monetization to **pay-per-event (PPE)**. Recommended starting prices (adjust after real cost data):

| Event | Suggested price | Notes |
| --- | --- | --- |
| `apify-actor-start` | $0.0005 | Small start fee |
| Result / dataset item (`apify-default-dataset-item` or custom `grant-opportunity`) | **$0.003 – $0.006** | Per enriched opportunity |
| FREE tier | Same or slightly higher | Avoid extreme FREE markups so testers can convert |

**Rule of thumb:** at $0.004 / result and 50k paid results/month → ~$200 revenue → ~$160 after Apify’s 20% commission, minus tiny compute (HTTP-only). Grant consultants routinely pay far more for curated feeds — volume grows with SEO title/description and reliable defaults.

### Reliability & limits

- Respect Grants.gov fair use; this Actor paces one detail request per hit.
- Award amounts are only present when the agency published them (`none` is normalized to `null`).
- Deep historical pulls should page with `maxResults` and status filters (`closed` / `archived`).
- Not affiliated with Grants.gov or any federal agency. Verify critical decisions against the official opportunity page.

### Legal / ToS

Data comes from Grants.gov public APIs that explicitly allow unauthenticated `search2` and `fetchOpportunity` access. You are responsible for how you use the data (compliance, redistributing content, contacting grantors, etc.).

### Changelog

- **1.0.0** — Initial Store release: keyword/status/agency search, optional full synopsis enrichment, clean dataset schema.

### Use cases

- **Nonprofits & universities** — weekly digests of open grants by keyword (education, climate, broadband) with contact emails for LOIs.
- **Grant writers / consultants** — export deadlines, CFDA/ALN, and award ceilings to CSV or Google Sheets for pipeline tracking.
- **AI / research labs** — monitor NSF/NIH/DOE opportunities mentioning ML, AI, or data infrastructure.
- **Apify MCP / agents** — agents can call this Actor to fetch structured grant rows (see output schema) without browser scraping.

**Buyer task:** `nonprofit-open-education-grants` in Apify Console.
**Examples:** https://github.com/LMH-Solutions/apify-open-data-actors (examples/grants_to_csv.py)

# Actor input Schema

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

Search keyword(s) for grant opportunities (e.g. "artificial intelligence", "broadband", "climate").

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

Optional exact Grants.gov opportunity number (e.g. PD-19-127Y). When set, keyword search is skipped and this opportunity is fetched.

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

Filter by status. Use posted for currently open opportunities.

## `agencies` (type: `string`):

Optional pipe-separated agency codes (e.g. NSF|NIH|DOE|DOS). Leave empty for all agencies.

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

Optional funding instrument filters.

## `eligibilities` (type: `string`):

Optional pipe-separated applicant eligibility codes from Grants.gov. Leave empty for all.

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

Maximum number of grant opportunities to return (1–1000).

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

If true, fetch synopsis details for each hit (award amounts, eligibility text, contacts, description). Recommended.

## `rowsPerPage` (type: `integer`):

Page size for Grants.gov search2 pagination (max 1000).

## Actor input object example

```json
{
  "keyword": "artificial intelligence",
  "statuses": [
    "posted"
  ],
  "agencies": "",
  "maxResults": 25,
  "includeDetails": true,
  "rowsPerPage": 100
}
```

# Actor output Schema

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

Items written to the default dataset via Actor.push_data().

# 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",
    "statuses": [
        "posted"
    ],
    "agencies": "",
    "maxResults": 25,
    "includeDetails": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("lmhsolutions/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",
    "statuses": ["posted"],
    "agencies": "",
    "maxResults": 25,
    "includeDetails": True,
}

# Run the Actor and wait for it to finish
run = client.actor("lmhsolutions/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",
  "statuses": [
    "posted"
  ],
  "agencies": "",
  "maxResults": 25,
  "includeDetails": true
}' |
apify call lmhsolutions/grants-gov-scraper --silent --output-dataset

```

## MCP server setup

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