# USAspending Scraper: Federal Contract & Grant Award Alerts (`clearfeedlabs/money-trail-federal-awards`) Actor

Follow the federal money: new and changed contracts, grants, loans and IDVs from the official USAspending.gov API, filtered by keyword, agency, recipient, NAICS, state or amount. Change alerts + recipient parent-company add-on.

- **URL**: https://apify.com/clearfeedlabs/money-trail-federal-awards.md
- **Developed by:** [Clearfeed Labs](https://apify.com/clearfeedlabs) (community)
- **Categories:** Business, Lead generation, News
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 award rows

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

### Money Trail: Federal Contract & Grant Award Alerts (USAspending.gov)

**Money Trail** follows federal money as it moves. It pulls **contracts, contract vehicles (IDVs), grants, loans and direct payments** from the official **USAspending.gov API** and, unlike a plain scraper, it can **alert you only when something new happens**: a new award, an award whose value went up or down, or a modification.

Built for **government-contracting BD and capture teams, competitors tracking rivals' wins, grant writers and nonprofits, investors watching federal revenue, journalists and watchdogs, economic-development offices**.

- Filter by **keyword, awarding agency, recipient (name or UEI), NAICS, place of performance state, minimum amount** and look-back window.
- **Change mode** (`changesSinceLastRun`): schedule daily and get only new / changed awards with `changeType` and `amountChange`.
- **Recipient add-on** (off by default): parent company, UEI, business types (small business, etc.), HQ city/state, last-12-month federal totals.
- **Campaign money add-on** (off by default): **candidate** PACs whose names match the recipient's name in official **FEC** records (name matches, not verified relationships), with latest-cycle receipts, disbursements and contributions to federal candidates.
- One flat row per award with agency, sub-agency, dates, NAICS/PSC or assistance listing, place of performance and the official award link.

No login, no API key, no proxies: one documented public government API, called politely with an identifying User-Agent.

#### Why this one

| | Money Trail | Typical USAspending scraper |
|---|---|---|
| Change alerts | New awards, value changes, modifications, per watchlist | Full dump every run |
| Award types | Contracts, IDVs, grants, loans, direct payments, other | Often contracts only |
| Who's behind the recipient | Parent company + business types add-on | Rarely |
| Catches modifications | Yes (last-modified window by default) | Usually start-date only |
| Bad input | Clear message, no charge | Fails or bills an empty run |

#### Pricing (pay per event)

| Event | Price | When |
|---|---|---|
| Award row | **$0.002** ($2 per 1,000) | Each award returned |
| Award alert | $0.004 | Change mode only (after the first baseline run), for a new or changed award; replaces the row charge |
| Recipient profile add-on | +$0.002 per row | Only if `addRecipientProfile` is on |
| Campaign money add-on | +$0.002 per row | Only if `addCampaignMoney` is on **and** at least one matching FEC committee is found |
| Actor start | $0.00005 | Apify's standard start event |

**How that compares:** USAspending and SAM.gov Actors on the Store run about **$2–$5 per 1,000 rows**. Our base row is at the low end; alerts cost a little more because they do the diffing for you, and unchanged awards in change mode cost **nothing**. Set **Max charge per run** to cap spend.

**Billing examples (change mode, 100 matching awards):** baseline run = 100 award rows = $0.20; next run with no new or changed awards = start event only; a run with 5 new or changed awards = 5 alerts = $0.02 (add-ons extra per row only when on).

#### Input examples

Big cybersecurity contracts in the last 30 days, with parent companies:

```json
{ "keywords": ["cybersecurity"], "awardTypes": ["contracts"], "minAmount": 1000000, "addRecipientProfile": true, "maxItems": 100 }
```

Daily competitor watch (schedule this):

```json
{ "recipients": ["Booz Allen Hamilton", "Leidos"], "awardTypes": ["contracts", "idvs"], "mode": "changesSinceLastRun", "stateKey": "competitors", "lookbackDays": 7 }
```

NSF and NIH grants performed in Texas:

```json
{ "awardTypes": ["grants"], "agencies": ["National Science Foundation", "Department of Health and Human Services"], "states": ["TX"], "maxItems": 200 }
```

#### Output (one row)

`rowType` (`award` or `award-alert`), `changeType` (`new-award`, `amount-increased`, `amount-decreased`, `modified`), `amountChange`, `previousAmount`, `awardId`, `awardKey`, `awardCategory`, `awardType`, `recipientName`, `recipientId`, `amount`, `totalOutlays`, `awardingAgency`, `awardingSubAgency`, `fundingAgency`, `startDate`, `endDate`, `lastModified`, `description`, `naics`, `psc`, `assistanceListing`, `placeOfPerformanceState`, `placeOfPerformanceZip`, `url`, plus `recipientProfile{}` with the add-on.

#### Tips

- The first change-mode run for a watchlist is a baseline (normal rows). Alerts start on the next run. Change mode scans up to 5,000 awards per type in your window so history is complete.
- Results are sorted largest first. Agency names must match USAspending's top-tier names.
- USAspending data lags agency systems by days to weeks; amounts are federal obligations, not payments.

#### Campaign money add-on: how the FEC key works

The FEC API uses free **api.data.gov** keys, which are issued **per user**. Paste your own key into **`fecApiKey`** (a secret field: Apify stores it encrypted, and this Actor never logs or outputs it). Get one free at api.data.gov/signup. If you leave it empty, the Actor uses FEC's public **`DEMO_KEY`**, which is shared and limited to a few requests per hour, so lookups are capped at 10 per run by default. If FEC rate-limits a run, it **finishes successfully**: rows already enriched keep their data, the rest are returned without it and **aren't charged** for the add-on, and the SUMMARY explains what happened.

Matching is **by name**: we strip legal suffixes (Inc, LLC, Corp...) from the recipient name and keep PAC and super-PAC committees whose names contain it as whole words. Every match is labelled `campaignMoney.matchStatus: "name-match-candidate"` with `relationshipVerified: false`. A match means "a committee with a matching name exists", not proof that the recipient controls, funds or is connected to it. Check the connected organization on the linked FEC page.

#### Data source and legal notes

- **USAspending.gov API v2** (U.S. Department of the Treasury): public, documented, no key; no robots restrictions on the API host. Requests are spaced about 0.6 s apart with backoff.
- **FEC API** (api.open.fec.gov), add-on only: official public campaign-finance records, called with your own key (or DEMO_KEY), about 1 request every 1.2 seconds, with an identifying User-Agent. Only committee-level totals are returned, never individual contributor names. (Federal law, 52 U.S.C. 30111(a)(4), bars using individual contributor information from FEC reports to solicit contributions or for commercial purposes.)
- Federal spending data is public domain. Individual recipients are aggregated/redacted by USAspending itself; this Actor adds no personal data. Not affiliated with or endorsed by the U.S. Treasury or any agency.

#### Disclaimer

Data is provided **as is** from USAspending.gov and can be incomplete, delayed or later corrected by agencies. It **isn't legal, procurement, investment or financial advice**, and it's not an official record for bids or protests. Confirm anything important on the linked official award page or SAM.gov.

Campaign-finance figures are **public FEC records shown side by side with federal awards. They do not imply any connection, quid pro quo, influence or wrongdoing**, and name matches can be wrong. Don't present them as evidence of misconduct.

#### Support

Found a problem or want a field added? Open an issue on this Actor's **Issues** tab. More Clearfeed Labs data feeds: [clearfeedlabs.com](https://clearfeedlabs.com).

#### Award totals vs. individual transactions

`amount` is the award's **total to date** (`amountBasis: "award-total-to-date"`, the sum of all obligations and modifications USAspending has recorded; loans use face value). It is **not** a single new obligation. In change mode, `amountChange` is the difference between two snapshots of that total, which may combine several modifications. `changeType: "amount-decreased"` is flagged `possibleDeobligationOrCorrection: true`: a deobligation, correction or data revision, not necessarily a cut. Individual transaction (modification) rows aren't returned yet; open the award's USAspending page for the transaction history.

#### Competition & recompete details (free, on by default)

Each contract row also carries `numberOfOffersReceived`, `singleOfferReceived`, `extentCompeted`, `solicitationProcedures`, `setAside`, `contractPricingType`, `currentEndDate`, `potentialEndDate`, `daysToPotentialEnd`, `recompeteWindow` (`within-12-months`, `within-24-months`, `later`, `ended`), `baseAndAllOptionsUsd`, `parentIdvPiid`, `recipientUei` and `subawardCount`. They come from the USAspending award record's latest transaction. They cost nothing extra; turn off `addCompetitionDetails` for faster runs. `recompeteWindow` is a planning hint based on the potential end date, not a confirmed re-solicitation.

### Related Clearfeed Labs Actors

- [Grants.gov Scraper & Grant Finder API: NSF, NIH Fellowships](https://apify.com/clearfeedlabs/grant-fellowship-radar): federal grants and fellowships with deadlines
- [Congress Voting Record Tracker: Votes, Bills & Cited Flags](https://apify.com/clearfeedlabs/legislator-record-tracker): U.S. House roll-call voting records
- [Political Ad Spend Tracker: Google Election Ads Spend & Surges](https://apify.com/clearfeedlabs/political-ad-spend-tracker): political ad spend and surges
- [All Clearfeed Labs Actors](https://apify.com/clearfeedlabs)

# Actor input Schema

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

Which kinds of federal awards to include.

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

Words in the award description, recipient or program (3+ letters each).

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

Top-tier agency names exactly as on USAspending, e.g. "Department of Defense", "Department of Energy", "National Science Foundation".

## `recipients` (type: `array`):

Track specific companies or organizations (name text or UEI).

## `naicsCodes` (type: `array`):

2-6 digit NAICS prefixes, e.g. 5415 (computer services). Applies to contracts and IDVs.

## `states` (type: `array`):

2-letter state codes.

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

Skip smaller awards.

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

Awards with activity in the last N days.

## `dateBasis` (type: `string`):

Which date the look-back window applies to.

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

Largest awards first. Each row is charged.

## `addCompetitionDetails` (type: `boolean`):

For contract rows: offers received, extent competed, set-aside, solicitation procedure, pricing type, current/potential end date, days to potential end and a recompete window. One extra USAspending call per contract (up to 200); no extra charge.

## `mode` (type: `string`):

Change mode remembers what it has seen per watchlist name and alerts on new awards, amount changes and modifications.

## `stateKey` (type: `string`):

Separate histories for different watches.

## `addRecipientProfile` (type: `boolean`):

Parent company, UEI, business types (e.g. small business), HQ city/state and last-12-month federal totals.

## `addCampaignMoney` (type: `boolean`):

For each award recipient, finds PACs whose name matches the recipient in official FEC records and adds their latest-cycle receipts, disbursements and contributions to federal candidates. Charged only when at least one committee is found.

## `fecApiKey` (type: `string`):

Free at https://api.data.gov/signup/. Stored encrypted by Apify and never logged. Without it the shared DEMO_KEY is used, which allows only a few lookups per hour.

## `maxCampaignLookups` (type: `integer`):

Caps FEC calls per run. Default 10 with DEMO_KEY, 200 with your own key.

## Actor input object example

```json
{
  "awardTypes": [
    "contracts",
    "grants"
  ],
  "keywords": [
    "cybersecurity"
  ],
  "lookbackDays": 30,
  "dateBasis": "last_modified_date",
  "maxItems": 100,
  "addCompetitionDetails": true,
  "mode": "all",
  "stateKey": "default",
  "addRecipientProfile": false,
  "addCampaignMoney": false
}
```

# Actor output Schema

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

No description

## `summary` (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 = {
    "keywords": [
        "cybersecurity"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("clearfeedlabs/money-trail-federal-awards").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": ["cybersecurity"] }

# Run the Actor and wait for it to finish
run = client.actor("clearfeedlabs/money-trail-federal-awards").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": [
    "cybersecurity"
  ]
}' |
apify call clearfeedlabs/money-trail-federal-awards --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,clearfeedlabs/money-trail-federal-awards"
        }
    }
}
```

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/fh2mEEcN9ZilbL3cU/builds/YQJjYZnxuTn1xBoXa/openapi.json
