# Grants.gov opportunities - open federal grants search (`retrainmap/grants-gov-opportunities`) Actor

Search Grants.gov federal funding opportunities by keyword, status (posted, forecasted, closed, archived), applicant eligibility, agency and funding category. One row per opportunity: number, title, agency, dates, ALNs, link; optionally synopsis, award ceiling/floor and eligibility details.

- **URL**: https://apify.com/retrainmap/grants-gov-opportunities.md
- **Developed by:** [RetrainMap Team](https://apify.com/retrainmap) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 records

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Grants.gov opportunities — open federal grants search

One row per federal funding opportunity from **Grants.gov**, the U.S. government's central
listing of discretionary grant and cooperative-agreement opportunities (about 1,000 posted
and 9,000 archived on 2026-09-04). Search by keyword, status (posted, forecasted, closed,
archived), applicant eligibility, agency and funding category; get the opportunity number,
title, agency, open and close dates, ALN (CFDA) numbers and the Grants.gov link — and, with
`include_details`, the synopsis, award ceiling and floor, estimated total funding, expected
number of awards, eligibility codes and names, funding categories and instruments, ALN
program titles and the agency contact e-mail.

**Honesty note:** the rows are what Grants.gov publishes; this Actor neither applies for
anything nor decides who is eligible — read the opportunity's own eligibility text before
you rely on it.

### Data source and status

| | |
|---|---|
| Publisher | Grants.gov, operated by the U.S. Department of Health and Human Services on behalf of the federal grant-making agencies — https://www.grants.gov/ |
| What this Actor reads | The public search API `POST https://api.grants.gov/v1/api/search2` (no key), 100 opportunities per request, at most one request per second; with `include_details`, `POST https://api.grants.gov/v1/api/fetchOpportunity` per row. Docs: https://www.grants.gov/api/common-values |
| Detail fallback | On 2026-09-04 the `fetchOpportunity` gateway answered every call with a "no response from the backend" stub. The identical JSON record is served by the endpoint the grants.gov website itself uses (`apply07.grants.gov/grantsws/rest/opportunity/details`); the Actor switches to it only when it sees that exact stub, and says so in the log and in the row's `details_source` |
| Refresh cadence | Agencies post, modify and close opportunities **continuously** (weekday business hours mostly); the Actor reads live on every run and `fetched_at` is the request time |
| Copyright | Works of the United States Government are not subject to copyright in the U.S. (17 U.S.C. §105). The data are public; please cite Grants.gov as the source |
| Known caveats | Search hits carry no eligibility, funding category, ceiling/floor or synopsis — those fields are `null` unless `include_details` is on (one extra request per row). Grants.gov matches agency filters on **sub-agency** codes (`DOL-ETA`), so a top-level code is expanded here to the sub-agencies that currently have opportunities in the selected statuses. An unknown status or eligibility code makes Grants.gov return zero hits without an error; the Actor validates statuses and warns on codes it cannot find. Award ceiling/floor are the agencies' free text — `none`, `TBD` and blanks become `null` |

Identification: the requests carry a `RetrainMap-Apify/0.1` User-Agent and the operator's
contact address in the standard `From:` header.

### Input

| Field | Type | Meaning |
|---|---|---|
| `keyword` | string | Optional. Free text; quote a phrase for an exact match |
| `statuses` | array | `posted` (default), `forecasted`, `closed`, `archived` |
| `eligibilities` | array of codes | Optional. `00` state governments, `01` county, `02` city/township, `04` special district, `05` independent school districts, `06` public higher education, `07` federally recognised tribal governments, `08` public housing authorities, `11` other tribal organisations, `12` 501(c)(3) nonprofits, `13` other nonprofits, `20` private higher education, `21` individuals, `22` for-profits other than small businesses, `23` small businesses, `25` others (see the opportunity text), `99` unrestricted |
| `agencies` | array of codes | Optional. Grants.gov agency codes (`DOL-ETA`, `HHS-ACF`, `USDA-NIFA`, `ED`, `NSF`); a top-level code (`DOL`, `HHS`) is expanded to its sub-agencies |
| `funding_categories` | array of codes | Optional. `AG` agriculture, `AR` arts, `BC` business and commerce, `CD` community development, `DPR` disaster prevention and relief, `ED` education, `ELT` employment, labor and training, `EN` energy, `ENV` environment, `FN` food and nutrition, `HL` health, `HU` humanities, `IIJ` Infrastructure Investment and Jobs Act, `ISS` income security and social services, `LJL` law, justice and legal services, `NR` natural resources, `O` other, `ST` science, technology and R\&D, `T` transportation |
| `include_details` | boolean | Default false. Adds the detail record per row |
| `max_records` | integer | Default 300 (the form prefills 100) |
| `request_interval_ms` | integer | Default 1000 (floor 250) |
| `contact_email` | string | Sent in the `From:` header |

Example — every current and forecasted Department of Labor opportunity, with details:

```json
{ "statuses": ["posted", "forecasted"], "agencies": ["DOL"], "include_details": true, "max_records": 50 }
```

### Output (dataset row)

`opportunity_id`, `opportunity_number`, `title`, `agency_code`, `agency_name`,
`top_agency_code`, `top_agency_name`, `status`, `doc_type` (`synopsis` or `forecast`),
`open_date`, `close_date` (ISO dates; `null` when Grants.gov shows none), `aln_numbers`,
`grants_gov_url`, `fetched_at`, `source` — plus, filled only with `include_details`:
`detail_kind`, `award_ceiling`, `award_floor`, `estimated_total_funding`, `expected_awards`,
`cost_sharing`, `posting_date`, `archive_date`, `close_date_detail`, `eligibility_codes`,
`eligibility_names`, `additional_eligibility_info`, `funding_category_codes`,
`funding_category_names`, `funding_instruments`, `aln_program_titles`, `agency_contact_email`,
`forecast_est_post_date`, `forecast_est_award_date`, `forecast_est_project_start`,
`synopsis` (HTML stripped, first 5,000 characters), `synopsis_truncated`, `details_source`.

Rows are sorted by posting date, newest first. A run summary (filters, the agency codes
actually sent, Grants.gov's own hit count, request count) is stored as `RUN_SUMMARY` in the
run's key-value store.

### Pricing (pay per event)

| Event | Price |
|---|---|
| `run-start` — once per run | $0.10 |
| `record` — per row written | $0.005 |

The default 100-row search costs $0.60; 300 rows $1.60. Details do not change the price per
row. Rows stop when your run's maximum charge is reached; the run summary says so.

### Operator

Steelyard Ventures LLC (RetrainMap) — info@steelyardclinical.com. The Actor writes only
to its own dataset and key-value store; it stores no credentials and sends nothing else.

# Actor input Schema

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

Free-text search over opportunity titles, numbers, agency names and descriptions. Quote a phrase ("workforce development") for an exact phrase. Leave empty for all opportunities in the selected statuses.

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

Which opportunities to return. Default: posted (currently open).

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

Grants.gov applicant-type codes, e.g. 00 state governments, 01 county governments, 02 city or township governments, 06 public institutions of higher education, 12 501(c)(3) nonprofits, 13 other nonprofits, 23 small businesses, 25 others, 99 unrestricted. Optional.

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

Grants.gov agency codes such as DOL-ETA, HHS-ACF, USDA-NIFA, ED. A top-level code (DOL, HHS) is expanded to every sub-agency that has opportunities in the selected statuses. Optional.

## `funding_categories` (type: `array`):

Grants.gov category codes, e.g. ELT employment/labor/training, ED education, HL health, CD community development, BC business and commerce, ST science and technology. Optional.

## `include_details` (type: `boolean`):

Fetch each opportunity's detail record (one extra request per row): synopsis text, award ceiling and floor, estimated total funding, expected number of awards, eligibility codes and names, funding categories and instruments, ALN program titles, contact e-mail.

## `max_records` (type: `integer`):

Stop after this many opportunity rows have been written. 100 rows = 1 search request (+1 per row with details).

## `request_interval_ms` (type: `integer`):

Politeness delay towards api.grants.gov (no published rate limit). Floor 250 ms.

## `contact_email` (type: `string`):

Sent in the standard From: request header, next to the RetrainMap User-Agent, so the data owner can reach the operator (RFC 9110 s10.1.2).

## Actor input object example

```json
{
  "keyword": "workforce",
  "statuses": [
    "posted"
  ],
  "include_details": false,
  "max_records": 100,
  "request_interval_ms": 1000,
  "contact_email": "info@steelyardclinical.com"
}
```

# Actor output Schema

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

One row per Grants.gov opportunity: number, title, agency, status, open and close dates, ALNs, link, and (with details) synopsis, award ceiling/floor and eligibility.

## `results_csv` (type: `string`):

The same rows as a CSV file.

# 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": "workforce",
    "statuses": [
        "posted"
    ],
    "max_records": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("retrainmap/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": "workforce",
    "statuses": ["posted"],
    "max_records": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("retrainmap/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": "workforce",
  "statuses": [
    "posted"
  ],
  "max_records": 100
}' |
apify call retrainmap/grants-gov-opportunities --silent --output-dataset

```

## MCP server setup

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