# Federal Grants Search: Grants.gov + USAspending Awards (`quarrydata/grants-usaspending-search`) Actor

Search open federal grant opportunities (Grants.gov) and past federal awards (USAspending) by keyword, agency, date and type. One clean, normalized row per record. No API key needed.

- **URL**: https://apify.com/quarrydata/grants-usaspending-search.md
- **Developed by:** [Quarry Data](https://apify.com/quarrydata) (community)
- **Categories:** Lead generation, Business, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## 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

## Federal Grants Search: Grants.gov Opportunities + USAspending Awards API Scraper

Search **open federal grant opportunities from Grants.gov** and **past federal awards from USAspending.gov** in a single run. You get one clean, normalized row per record, ready for CSV, Excel, JSON, Google Sheets or your CRM. You don't need an API key.

### What it does

- Searches Grants.gov opportunities (forecasted, posted, closed, archived) by keyword and agency.
- Searches USAspending.gov awards (grants, contracts, loans, direct payments, other) by keyword, awarding agency and date range.
- Normalizes both sources to one schema: `source, recordType, id, title, agency, agencyCode, subAgency, recipientName, amount, status, docType, postedDate, closeDate, startDate, endDate, cfdaNumbers, description, url, matchedKeyword, scrapedAt`.
- De-duplicates records across keywords.
- **Privacy:** it excludes awards made to individuals. Only business, nonprofit, higher-education, government and international recipient types are queried, and redacted or aggregated individual recipients are dropped.
- **No Dun & Bradstreet data:** it doesn't request DUNS or other D\&B fields, and it masks DUNS/UEI numbers inside description text.

### Use cases

Grant prospecting, competitor award research, nonprofit fundraising pipelines, govcon lead generation, and market sizing by agency or CFDA/Assistance Listing.

### Input

| Field | Description |
|---|---|
| `keywords` | List of keywords (required). |
| `sources` | `grantsgov`, `usaspending`, or both. |
| `agency` | Grants.gov agency code (e.g. `DOE`) and/or USAspending top-tier agency name (e.g. `Department of Energy`). |
| `dateFrom` / `dateTo` | Date range (YYYY-MM-DD). |
| `opportunityStatuses` | Grants.gov statuses. |
| `awardTypes` | USAspending award type groups. |
| `maxResults` | Max records per source. |

Example (also the health-check input):

```json
{ "keywords": ["water"], "sources": ["grantsgov", "usaspending"], "dateFrom": "2025-01-01", "dateTo": "2025-12-31", "maxResults": 5 }
```

### Pricing

Planned: pay-per-event at **$0.002 per record** (dataset row).

### Reliability

Requests retry with exponential backoff on 429 and 5xx responses. Calls are rate-limited (about 1.6 requests per second) to respect the public APIs.

### Data sources and notices

- Grants.gov Search API: https://www.grants.gov/api. Use is subject to the [Grants.gov API Terms & Conditions](https://www.grants.gov/api/terms-conditions).
- USAspending API: https://api.usaspending.gov (public domain U.S. government data).

**This product uses the Grants.gov API but is not endorsed or certified by the U.S. Department of Health and Human Services.**

Quarry Data isn't affiliated with Grants.gov, HHS, the U.S. Treasury or USAspending.gov. The data is provided as-is from official sources.

### Support

Quarry Data · quarrydata@mail.grokbot.com

# Actor input Schema

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

One or more search keywords. Each keyword is searched separately; results are de-duplicated.

## `sources` (type: `array`):

Which sources to search.

## `agency` (type: `string`):

Grants.gov agency code (e.g. 'DOE', 'HHS-NIH11') and/or USAspending top-tier awarding agency name (e.g. 'Department of Energy'). Leave empty for all.

## `dateFrom` (type: `string`):

Start of date range (award action date for USAspending; post date for Grants.gov).

## `dateTo` (type: `string`):

End of date range.

## `opportunityStatuses` (type: `array`):

Opportunity statuses to include.

## `awardTypes` (type: `array`):

Award type groups to include.

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

Maximum records to output per source.

## Actor input object example

```json
{
  "keywords": [
    "water infrastructure"
  ],
  "sources": [
    "grantsgov",
    "usaspending"
  ],
  "opportunityStatuses": [
    "forecasted",
    "posted"
  ],
  "awardTypes": [
    "grants"
  ],
  "maxResults": 50
}
```

# Actor output Schema

## `overview` (type: `string`):

Normalized result rows (dataset items, Overview view).

# 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": [
        "water infrastructure"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("quarrydata/grants-usaspending-search").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": ["water infrastructure"] }

# Run the Actor and wait for it to finish
run = client.actor("quarrydata/grants-usaspending-search").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": [
    "water infrastructure"
  ]
}' |
apify call quarrydata/grants-usaspending-search --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,quarrydata/grants-usaspending-search"
        }
    }
}
```

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/i2TXY7lqZItjhNPoO/builds/MZfK9cZxJZyZ4S85z/openapi.json
