# US Federal Grant Opportunities: Search and Weekly Alerts (`datagleaner/grants-opportunities`) Actor

Search US federal grant opportunities on Grants.gov by keyword, agency, eligibility, funding category, ALN number and posted or closing dates, or watch for new and changed opportunities since your last run. Award ceiling, floor, funding, close date, eligibility, link. $0.003 per opportunity.

- **URL**: https://apify.com/datagleaner/grants-opportunities.md
- **Developed by:** [Data Gleaner](https://apify.com/datagleaner) (community)
- **Categories:** Business, Automation, Lead generation
- **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 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

## US Federal Grant Opportunities: Search and Weekly Alerts

Search the open US federal grant opportunities on Grants.gov by keyword, agency, eligibility type, funding category, ALN (CFDA) number, and posted or closing dates. Every row is one opportunity with its title, agency, number, ALN, award ceiling and floor, estimated total funding, close date, eligible applicants and a link. Switch on watch mode and a scheduled run returns only the opportunities that are new or changed since the last run, ready for a weekly grants digest.

The data comes from the documented Grants.gov Search API (`search2` and `fetchOpportunity`), which Grants.gov publishes for public use without a login or key. It is US federal government information.

### What you can do with it

- Weekly digest of new grants for a sector (`BC` business, `HL` health, `ED` education) sent to your clients or members.
- Find grants a small business or a 501(c)(3) nonprofit is eligible for (`eligibilities` `23` or `12`).
- List everything closing in the next 30 days, soonest first.
- Track one agency (for example `HHS`, `USDA`, `NSF`) or one assistance listing (`93.226`).
- Feed a CRM, spreadsheet or AI agent with structured grant data instead of copying from the website.

### Input example

```json
{
  "keyword": "small business",
  "eligibilities": ["23"],
  "closingBefore": "2026-12-31",
  "sortBy": "closeDate|asc",
  "maxResults": 25
}
```

Weekly watch of health grants for nonprofits:

```json
{
  "watchMode": true,
  "storeName": "health-nonprofit-grants",
  "fundingCategories": ["HL"],
  "eligibilities": ["12"],
  "maxResults": 200
}
```

An empty input runs a small example (5 open opportunities for "small business") so you can see the output.

### Output example

```json
{
  "mode": "search",
  "changeType": null,
  "opportunityId": "364178",
  "opportunityNumber": "G27AS00081",
  "title": "Cooperative Agreement for affiliated Partner with the Californian Cooperative Ecosystem Studies Unit",
  "agency": "Geological Survey",
  "topAgency": "Department of the Interior",
  "status": "posted",
  "alnNumbers": ["15.808"],
  "postedDate": "2026-10-30",
  "closeDate": "2026-11-30",
  "awardCeiling": 480000,
  "awardFloor": 1,
  "estimatedFunding": 480000,
  "numberOfAwards": 1,
  "costSharing": false,
  "eligibility": ["Others (see text field entitled \"Additional Information on Eligibility\" for clarification)"],
  "fundingInstruments": ["Cooperative Agreement"],
  "url": "https://www.grants.gov/search-results-detail/364178",
  "scrapedAt": "2026-11-02T00:00:00Z"
}
```

In watch mode `changeType` is `new` or `changed`; changed rows add `changedFields` and the `previous` values of title, status, close date, amounts and eligibility.

### Filters

| Field | Meaning |
|---|---|
| `keyword` | Search words, as in the Grants.gov search box |
| `statuses` | `posted` (open, the default), `forecasted`, `closed`, `archived` |
| `agencies` | Agency codes; a top code like `HHS` includes its sub-agencies |
| `eligibilities` | Applicant type codes, for example `23` small businesses, `12` 501(c)(3) nonprofits, `00` state governments |
| `fundingCategories` | Category codes, for example `BC`, `HL`, `ED`, `ENV`, `ST` |
| `fundingInstruments` | `G` grant, `CA` cooperative agreement, `PC` procurement contract, `O` other |
| `alnNumbers` | Assistance Listing (CFDA) numbers |
| `opportunityNumbers` | Specific funding opportunity numbers |
| `postedAfter`, `postedBefore`, `closingAfter`, `closingBefore` | Dates as `YYYY-MM-DD` |

### Pricing

Pay per event: **$0.003 per opportunity row** returned. Notices (nothing matched, nothing new, errors) are free. You can set a maximum charge per run and the Actor stops at it.

Worked examples: the 5-row example costs $0.015. A weekly watch that finds 40 new or changed opportunities costs $0.12 per run, about $0.52 a month. Listing the 300 open health grants once costs $0.90.

### Limits

- Award ceiling, floor and estimated funding come from the detail record. Forecasts and some notices leave them empty, and a value of `0` or `1` is what the agency typed, not an error.
- Closing-date filters leave out opportunities with no close date (forecasts, rolling deadlines).
- The Actor reads Grants.gov at a polite pace of about two requests a second, so 100 rows with details take about a minute.
- Watch mode keeps its last-seen state in a named key-value store on your account. Use one store name per watched search. If maxResults cuts a run short, the rows not delivered are reported next time.
- Only federal opportunities on Grants.gov are covered. State, local and private funders are not.

### FAQ

**Does it need an API key or login?** No. It uses the public Grants.gov endpoints that need none.

**Does it return contact names or emails?** No. Agency contact names, phone numbers and personal email addresses are never output. A `grantsOfficeEmail` appears only when the agency lists an office or role mailbox such as `grants@agency.gov`; any address that looks like a named person (first.last@, free-mail) is dropped.

**Is this official advice on eligibility?** No. Always read the full notice of funding opportunity on Grants.gov before applying. The eligibility fields repeat what the agency published.

### Responsible use

Public federal data republished as published, with a link to the source record. This Actor is not affiliated with or endorsed by Grants.gov or any agency. You are responsible for how you use the data.

### Removal requests

If an address or name in a row concerns you and you want it excluded, email **datagleaner@gmail.com** (Keencrest, the publisher; replies come from an AI agent, Crest, and the business is owner-operated) with the address and the opportunity number. We add it to the Actor's exclusion list (`src/optout_dids.txt`, loaded at the start of every run) within 30 days, answer you, and keep a dated record of the request and our answer. Corrections at the source go to the agency or Grants.gov.

# Actor input Schema

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

Search words, as in the Grants.gov search box, e.g. `small business`, `rural broadband`, `youth mentoring`.

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

Which opportunities to include. Leave empty for open (`posted`) opportunities only.

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

Grants.gov agency codes; a top-level code such as `HHS`, `USDA`, `DOE`, `NSF`, `DOC` also matches its sub-agencies. Example: `HHS-NIH11`.

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

Who may apply, by Grants.gov code: `00` State governments, `01` County, `02` City or township, `04` Special district, `05` Independent school districts, `06` Public and state controlled higher education, `07` Federally recognized tribes, `08` Public housing authorities, `11` Other tribal organizations, `12` Nonprofits with 501(c)(3) status, `13` Nonprofits without 501(c)(3), `20` Private higher education, `21` Individuals, `22` For-profits other than small businesses, `23` Small businesses, `25` Others, `99` Unrestricted.

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

Grants.gov category codes: `AG` Agriculture, `AR` Arts, `BC` Business and Commerce, `CD` Community Development, `ED` Education, `ELT` Employment and Training, `EN` Energy, `ENV` Environment, `HL` Health, `HU` Humanities, `ISS` Income Security and Social Services, `LJL` Law and Justice, `NR` Natural Resources, `ST` Science and Technology, `T` Transportation, `O` Other.

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

`G` Grant, `CA` Cooperative Agreement, `PC` Procurement Contract, `O` Other.

## `alnNumbers` (type: `array`):

Assistance Listing Numbers (formerly CFDA), e.g. `93.226`, `10.912`. An opportunity matches if it lists any of them.

## `opportunityNumbers` (type: `array`):

Look up specific funding opportunity numbers, e.g. `G27AS00081`.

## `postedAfter` (type: `string`):

Date as `YYYY-MM-DD`.

## `postedBefore` (type: `string`):

Date as `YYYY-MM-DD`.

## `closingAfter` (type: `string`):

Date as `YYYY-MM-DD`. Opportunities with no close date (forecasts, rolling deadlines) are left out when a closing window is set.

## `closingBefore` (type: `string`):

Date as `YYYY-MM-DD`, e.g. to list grants due within the next 30 days.

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

Result order.

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

One extra Grants.gov request per opportunity for award ceiling, floor, estimated funding, eligibility and summary. Same price either way; switch off for a faster title, agency and date list.

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

Stop after this many billed rows.

## `watchMode` (type: `boolean`):

Return only opportunities that are new or changed (title, status, close date, amounts, eligibility) compared with your previous run in the named store below. The first run reports everything that matches as new. Schedule it weekly for a digest.

## `storeName` (type: `string`):

Name of the key-value store that keeps the last-seen state. Use a different name for each watched search.

## Actor input object example

```json
{
  "keyword": "small business",
  "statuses": [
    "posted"
  ],
  "agencies": [
    "HHS",
    "USDA"
  ],
  "eligibilities": [
    "12",
    "23"
  ],
  "fundingCategories": [
    "BC",
    "ST"
  ],
  "fundingInstruments": [
    "G"
  ],
  "alnNumbers": [
    "93.226"
  ],
  "sortBy": "openDate|desc",
  "includeDetails": true,
  "maxResults": 10,
  "watchMode": false,
  "storeName": "grants-watch"
}
```

# 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": "small business",
    "maxResults": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("datagleaner/grants-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": "small business",
    "maxResults": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("datagleaner/grants-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": "small business",
  "maxResults": 10
}' |
apify call datagleaner/grants-opportunities --silent --output-dataset

```

## MCP server setup

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