# USAspending Grants Scraper & Monitor (`vocal_rhapsody/usaspending-grants`) Actor

USAspending grants scraper and monitor for US federal assistance awards. Official USAspending.gov API, no API key. Filter by Assistance Listing (CFDA), agency, recipient or performance state, amount and keywords; get only awards new since your last run.

- **URL**: https://apify.com/vocal_rhapsody/usaspending-grants.md
- **Developed by:** [GovData Tools](https://apify.com/vocal_rhapsody) (community)
- **Categories:** Lead generation, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

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

## USAspending Grants Scraper & Monitor

Get a feed of US federal grants and other assistance awards from USAspending.gov as JSON, CSV or Excel, and receive only the awards that are new since your last run. Built for grant consultants and writers, university research offices, and B2B sellers who want to reach organisations that just received federal funding. No account or API key needed.

### Why this Actor

- **Official source.** It calls the public USAspending.gov API (`api.usaspending.gov`, the `spending_by_award` search). No scraping of web pages, no login, no key. Not affiliated with or endorsed by USAspending.gov or the US government.
- **Filter by program.** Give one or more Assistance Listing (CFDA) numbers, for example `93.847` (NIH diabetes, digestive and kidney diseases research), and get the awards made under them.
- **Built for a recurring "new awards" feed.** The Actor can remember which awards it already returned, separately for every distinct filter combination (in practice one per saved task). Put it on an Apify Schedule, turn on `onlyNew`, and each run returns only what is new.
- **Grants by default, other assistance on request.** Block, formula, project grants and cooperative agreements are returned by default. Direct payments, loans, insurance and other assistance can be added with `assistanceTypes`.
- **No personal data.** Rows for individual recipients and redacted or aggregated rows (for example "REDACTED DUE TO PII", "MULTIPLE RECIPIENTS") are dropped and never output. No contact or officer fields are requested.
- **Pairs with the other federal data Actors.** Output uses the same field names as the [USAspending Contract Awards Scraper & Monitor](https://apify.com/vocal_rhapsody/usaspending-awards) where concepts overlap. For open contract opportunities see the [SAM.gov Contract Opportunities Scraper & Monitor](https://apify.com/vocal_rhapsody/sam-gov-opportunities).

### What data you get

One flat item per award (not per modification). Dates are ISO 8601; the last-modified timestamp is returned as published, without a timezone. Fields the source leaves empty are `null`.

| Field | Meaning |
|---|---|
| `awardId`, `generatedInternalId`, `awardType` | Federal award identification number (FAIN or URI), USAspending's unique key, assistance award type |
| `recipientName`, `recipientUei` | Recipient organisation and its Unique Entity ID |
| `recipientCity`, `recipientState`, `recipientCountry` | Recipient location |
| `awardAmount` | Total obligated amount in USD (number) |
| `dateSigned`, `startDate`, `endDate` | Base obligation date, period of performance start and end |
| `department`, `subTier`, `fundingAgency` | Awarding top-tier agency, awarding sub-agency, funding agency |
| `cfdaNumber`, `cfdaTitle` | Primary Assistance Listing number and title |
| `description` | Award description, truncated to 2,000 characters, email addresses removed |
| `placeOfPerformanceCity/State/Country` | Where the funded work is performed |
| `url`, `sourceUrl` | Link to the award on usaspending.gov, and the API endpoint used |
| `lastModifiedDate`, `scrapedAt` | Last change in USAspending, and the run timestamp |

### How to use

1. Open the Actor and set your filters, for example Assistance Listing `93.847` and recipient state `MA`. Leave a filter empty to skip it. The form is prefilled with `93.847` and `maxItems` 10 for a small test run.
2. Click **Start**. The run returns the matching awards in the lookback window (`lookbackDays`, default 7), up to `maxItems`, largest awards first.
3. To monitor, save the input as a task, turn on `onlyNew` and put it on an Apify Schedule. Later runs return only awards not seen before. Send results to Google Sheets, your CRM or a webhook with Apify integrations.

Example input:

```json
{
  "assistanceListings": ["93.847"],
  "recipientStates": ["MA", "WA"],
  "minAmount": 100000,
  "dateMode": "published",
  "lookbackDays": 7,
  "onlyNew": true,
  "maxItems": 100
}
```

#### Filters

All filters are optional. Between filters it is AND, within one filter it is OR.

| Input | Meaning |
|---|---|
| `assistanceListings` | Assistance Listing (CFDA) numbers such as `93.847` |
| `assistanceTypes` | Extra award types: `06`/`10` direct payments, `07`/`08` loans, `09` insurance, `11` other. Default: grants only (`02`-`05`) |
| `agencies` | Case-insensitive text match on the awarding department or sub-agency name, e.g. `HEALTH`, `NATIONAL SCIENCE`. Applied after download (see Limitations) |
| `recipientStates`, `placeOfPerformanceStates` | Two-letter states |
| `minAmount`, `maxAmount` | Range on `awardAmount` in USD |
| `keywords` | Search terms passed to USAspending's own keyword search |
| `lookbackDays` | Window size, default 7, maximum 90 |
| `dateMode` | `published` (default), `signed`, `anyAction`, see below |
| `maxAwardAgeDays` | Published mode only: skip awards whose base date is older than this many days. Default 180, maximum 730, `0` keeps all |
| `onlyNew`, `resetState` | New-since-last-run mode (off by default) and its reset |
| `maxItems` | Cap on results per run (default 100). Largest awards first |

#### Date modes

| `dateMode` | Window refers to |
|---|---|
| `published` (default) | Awards added to or changed in USAspending in the window (the API's last-modified date), kept if their base date is within `maxAwardAgeDays` |
| `signed` | The base award was made in the window |
| `anyAction` | Any action on the award, such as a modification, in the window |

Only one date type works per API request, so the age limit of the published mode is applied after download. Without the seen list (`onlyNew` off), an award modified several times can appear in several runs.

#### New since last run

With `onlyNew` on, the Actor stores a compact list of award IDs in a named key-value store in your account (`usaspending-grants-state`), one entry per distinct filter combination. The first run returns everything in the window (up to `maxItems`); later runs return only unseen awards. Awards cut off by `maxItems` or a spending limit are not marked as seen, so the next run returns them. `resetState` starts over. Changing `lookbackDays`, `maxAwardAgeDays` or `maxItems` keeps the list; changing any filter, `dateMode` or `assistanceTypes` starts a separate one. Leave `onlyNew` off (default) to get all matches every run.

### Output example

Two items in the output format (illustrative values; to be replaced by a real run's output):

```json
[
  {
    "awardId": "1R01DK130001-01A1",
    "generatedInternalId": "ASST_NON_1R01DK130001-01A1_DEPA",
    "awardType": "PROJECT GRANT",
    "recipientName": "UNIVERSITY OF EXAMPLE",
    "recipientUei": "ABCDEFGH1234",
    "recipientCity": "BOSTON",
    "recipientState": "MA",
    "recipientCountry": "UNITED STATES",
    "awardAmount": 1850000,
    "dateSigned": "2026-10-01",
    "startDate": "2026-10-01",
    "endDate": "2028-06-30",
    "department": "Department of Health and Human Services",
    "subTier": "National Institutes of Health",
    "fundingAgency": "Department of Health and Human Services",
    "cfdaNumber": "93.847",
    "cfdaTitle": "DIABETES, DIGESTIVE, AND KIDNEY DISEASES EXTRAMURAL RESEARCH",
    "description": "STUDY OF KIDNEY DISEASE PROGRESSION. CONTACT [email removed]",
    "placeOfPerformanceCity": "BOSTON",
    "placeOfPerformanceState": "MA",
    "placeOfPerformanceCountry": "UNITED STATES",
    "lastModifiedDate": "2026-10-20T06:12:30",
    "url": "https://www.usaspending.gov/award/ASST_NON_1R01DK130001-01A1_DEPA",
    "sourceUrl": "https://api.usaspending.gov/api/v2/search/spending_by_award/",
    "scrapedAt": "2026-10-22T12:00:00.000Z"
  },
  {
    "awardId": "5U01DK120003-03",
    "generatedInternalId": "ASST_NON_5U01DK120003-03_DEPA",
    "awardType": "COOPERATIVE AGREEMENT",
    "recipientName": "STATE UNIVERSITY SYSTEM",
    "recipientUei": "CDEFGHIJ3456",
    "recipientCity": "AUSTIN",
    "recipientState": "TX",
    "recipientCountry": "UNITED STATES",
    "awardAmount": 410000,
    "dateSigned": "2026-10-10",
    "startDate": "2026-10-10",
    "endDate": "2028-06-30",
    "department": "Department of Health and Human Services",
    "subTier": "National Institutes of Health",
    "fundingAgency": "Department of Health and Human Services",
    "cfdaNumber": "93.847",
    "cfdaTitle": "DIABETES, DIGESTIVE, AND KIDNEY DISEASES EXTRAMURAL RESEARCH",
    "description": "DIABETES PREVENTION NETWORK",
    "placeOfPerformanceCity": "AUSTIN",
    "placeOfPerformanceState": "TX",
    "placeOfPerformanceCountry": "UNITED STATES",
    "lastModifiedDate": "2026-10-20T06:12:30",
    "url": "https://www.usaspending.gov/award/ASST_NON_5U01DK120003-03_DEPA",
    "sourceUrl": "https://api.usaspending.gov/api/v2/search/spending_by_award/",
    "scrapedAt": "2026-10-22T12:00:00.000Z"
  }
]
```

### Pricing

Pay per result: you are charged for each award written to the dataset (Apify pay-per-event, event `result`). Excluded, filtered-out and already-seen awards are not charged. Set `maxItems` to cap the cost of a run. The current price per 1,000 results is shown on this page.

### Use cases

- **Grant consultants and writers.** See which organisations won awards under a program, for how much and from which institute, to find comparable funded projects and prospective clients.
- **University research offices.** Track funding in your Assistance Listings, and peer institutions' awards, on a weekly schedule.
- **B2B sellers to grantees.** Lab suppliers, software vendors and service firms can reach organisations that just received federal funds, filtered by program, state and amount.
- **Policy and funding analysts.** Total `awardAmount` by agency, program or state in your own sheet.
- **Local governments and nonprofits.** Follow awards in your state or place of performance.

### Privacy

Only organisation-level business data is returned: recipient name, UEI and location. Individual recipients and redacted or aggregated rows are excluded. In `description`, email addresses are replaced with `[email removed]`, but free text can still mention names or phone numbers.

### FAQ

**Do I need an account or API key?** No. The Actor uses the public USAspending.gov API.

**Which awards are included?** Assistance awards: by default grants and cooperative agreements (types 02-05). Direct payments, loans, insurance and other assistance with `assistanceTypes`. Contracts are covered by the [USAspending Contract Awards Scraper & Monitor](https://apify.com/vocal_rhapsody/usaspending-awards). Subawards are not included.

**What is `awardAmount`?** The total obligated amount as USAspending reports it (for loans, the loan value). The amount filters are checked against this value.

**What if there are more than `maxItems`?** Largest awards first; the rest stay unseen and come on the next run when `onlyNew` is on.

**How often is the data updated?** As often as agencies report to USAspending, which varies by agency.

**Is the data complete?** It contains what the USAspending API returns. No completeness is guaranteed.

**What if the API changes?** If expected fields are missing in more than 20% of awards, or the response shape is unexpected, the run stops with an error instead of returning bad data. Temporary errors are retried with backoff; the Actor makes at most one request per second.

**Is this legal to use?** The Actor reads a public federal data API and does not log in to anything. You are responsible for how you use the data.

Each run writes a `RUN_SUMMARY` record with requests made, awards read, excluded recipients, items emitted, whether the page cap was hit, runtime and peak memory.

### Limitations

- A run reads up to 30,000 awards per award-type group (300 pages of 100, one request per second), largest first. Narrow the filters for very broad searches; `truncated` is set in `RUN_SUMMARY` when the cap is hit.
- Agency filtering is a text match done after download, so a broad agency-only search reads every award in the window. Combine it with an Assistance Listing to keep runs small.
- Each requested award-type group (grants, direct payments, loans, other) is a separate pass.
- Awards with a redacted or individual recipient are not returned.

### VERIFY checklist (remove before publishing)

Built while api.usaspending.gov was unreachable; these are unverified:

- \[ ] Request field names in `FIELDS` / `LOAN_FIELDS` (src/filters.js) and raw names in `FIELD_MAP` (src/parse.js): `Award Type`, `Recipient UEI`, `Recipient Location`, `Primary Place of Performance`, `Primary Assistance Listing`, `Assistance Listings`, `Base Obligation Date`, `Funding Agency`, `Loan Value`. A 400 response lists valid names.
- \[ ] Filter key `program_numbers` and that `93.847` matches exactly.
- \[ ] Award type codes `02`-`05` accepted, and that mixed groups are rejected (hence one pass per group); sort field `Loan Value` for loans.
- \[ ] `date_type` values (`last_modified_date`, `new_awards_only`, `action_date`) behave the same for assistance.
- \[ ] Exact markers for redacted/aggregate/individual recipients (`isExcludedRecipient`, src/parse.js) and whether a business-type field is available to exclude individuals more reliably.
- \[ ] Whether `Base Obligation Date` is populated for grants (otherwise `dateSigned` is null and the age filter uses `startDate`).
- \[ ] Prefill (`93.847`, 7 days) returns a non-empty dataset; if not, widen the prefill.
- \[ ] Run locally, save at most 20 items to `samples/sample-output.json`, replace `samples/sample-output.PLACEHOLDER.json` and the README output example.

# Changelog

This Actor's version history is a separate document: https://apify.com/vocal_rhapsody/usaspending-grants/changelog.md

# Actor input Schema

## `assistanceListings` (type: `array`):

Assistance Listing numbers, formerly CFDA, such as 93.847 (NIH NIDDK). Exact match. Leave empty to include all programs.

## `assistanceTypes` (type: `array`):

By default only grants (types 02 block, 03 formula, 04 project, 05 cooperative agreement) are returned. Add codes to also include: 06 and 10 direct payments, 07 and 08 loans, 09 insurance, 11 other. Each type group is read in a separate pass.

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

Case-insensitive text match on the awarding department or sub-agency name, e.g. "VETERANS", "HEALTH". An award is kept if any entry matches. Leave empty to include all. Matching happens after download, so combine it with an Assistance Listing to keep runs short.

## `recipientStates` (type: `array`):

Two-letter US state codes of the recipient's location, e.g. TX. Leave empty to include all.

## `placeOfPerformanceStates` (type: `array`):

Two-letter US state codes where the work is performed, e.g. VA. Leave empty to include all.

## `minAmount` (type: `integer`):

Only awards with a total obligated amount of at least this value, in US dollars. Leave empty for no minimum.

## `maxAmount` (type: `integer`):

Only awards with a total obligated amount of at most this value, in US dollars. Leave empty for no maximum.

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

Search terms passed to USAspending's own keyword search; USAspending decides which award text is matched. Leave empty to skip.

## `lookbackDays` (type: `integer`):

How many days back to look, from 1 to 90. What counts depends on the date mode: newly published, signed, or any action. With "Only new since last run" on, the first run returns everything in this window, up to Max items.

## `dateMode` (type: `string`):

What the lookback window refers to. "Newly published" (default, best for a daily new-awards feed): awards added to or changed in USAspending in the window, kept if signed within the max award age;. "Signed": base award signed inside the window; late-reported awards fall out of a short window. "Any action": any award with an action, such as a modification, in the window.

## `maxAwardAgeDays` (type: `integer`):

Newly published mode only: skip awards signed more than this many days ago, which drops older awards that were only modified recently. Default 180, maximum 730. Raise it to also catch very late reports; set 0 to keep all ages.

## `onlyNew` (type: `boolean`):

Turn this on in your scheduled task to return only awards not seen in earlier runs with the same filters, so a scheduled run gives you just the new awards. The list of seen awards is kept per filter combination (including date mode and assistance types) in the named key-value store "usaspending-grants-state" in your account. Off (the default) gives all matches in the window on every run.

## `resetState` (type: `boolean`):

Forget which awards were already seen for these filters and treat this run as a first run. Only applies when "Only new since last run" is on.

## `maxItems` (type: `integer`):

Stop after this many results. You are charged per result, so this keeps the cost of a run predictable. Largest awards come first; awards beyond the cap are returned on the next run when "Only new since last run" is on.

## Actor input object example

```json
{
  "assistanceListings": [
    "93.847"
  ],
  "lookbackDays": 7,
  "dateMode": "published",
  "maxAwardAgeDays": 180,
  "onlyNew": false,
  "resetState": false,
  "maxItems": 10
}
```

# Actor output Schema

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

One item per matching award (new since last run when onlyNew is on).

## `runSummary` (type: `string`):

API requests, awards read, items pushed, runtime and peak memory.

# 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 = {
    "assistanceListings": [
        "93.847"
    ],
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("vocal_rhapsody/usaspending-grants").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 = {
    "assistanceListings": ["93.847"],
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("vocal_rhapsody/usaspending-grants").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 '{
  "assistanceListings": [
    "93.847"
  ],
  "maxItems": 10
}' |
apify call vocal_rhapsody/usaspending-grants --silent --output-dataset

```

## MCP server setup

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

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/RP0UpGgE2CPtIczGW/builds/RYewGzPKonSMHbdSF/openapi.json
