# USASpending Federal Awards Tracker (No API Key) (`intenal_builds/usaspending-federal-awards-tracker`) Actor

Search US federal contract, grant, loan, and other awards from the official USASpending.gov API (no key). Filter by award type, agency, recipient keyword, NAICS, PSC, amount, and date; flatten CRM-ready rows with recipient, agency, amount, dates, and award links.

- **URL**: https://apify.com/intenal_builds/usaspending-federal-awards-tracker.md
- **Developed by:** [Jaydan Eaton](https://apify.com/intenal_builds) (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 $2.00 / 1,000 award 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 Federal Awards Tracker (No API Key)

Find out **who actually won US federal money**: contracts, IDVs (GWACs, IDIQs, schedules, BPAs), grants, loans, direct payments and other assistance. Data comes live from the official, keyless **USASpending.gov API** (`api.usaspending.gov/api/v2/search/spending_by_award/`).

You get one clean, flattened row per award (recipient, UEI, location, awarding/funding agency, amount, dates, NAICS, PSC, assistance listing and direct USASpending.gov links), ready for a CRM, spreadsheet or alerting workflow.

**Use cases**

- **B2B sales triggers:** companies that just won a federal contract are hiring, buying and subcontracting. Pull new awards by NAICS, PSC, agency or state every day and hand them to your sales team.
- **Subcontracting and teaming:** see which primes won work in your niche (e.g. NAICS `541512` at the VA) and reach out to team.
- **Competitive intel:** track a competitor's wins by name or UEI and see agency, size and timing.
- **Grant and loan research:** see which universities, nonprofits, cities and companies received grants or federal loans, with assistance listing (CFDA) program.
- **Journalism and policy research:** largest new awards by agency, state or program.

Pairs well with the **SAM.gov Federal Contract Opportunities Tracker** (what's being bid) — this actor shows who got paid.

### Input

- **Award types:** `contracts`, `idvs`, `grants`, `loans`, `direct_payments`, `other`, or `all`. USASpending allows one category per request, so each selected category is queried separately and the result budget is shared across them (unused budget flows to the others).
- **Keywords:** full-text search, e.g. `cybersecurity`, `drone`.
- **Recipient name / UEI contains:** e.g. `Lockheed`, `Booz Allen`.
- **Awarding agency** (exact top-tier name, e.g. `Department of Defense`) and optional **sub-agency** (e.g. `Department of the Army`).
- **Recipient states:** e.g. `TX`, `VA`, `AR`.
- **NAICS codes / prefixes** and **PSC codes** (contracts and IDVs).
- **Min / max award amount (USD).**
- **Date window** (`startDate` / `endDate`, YYYY-MM-DD; default: last 30 days) and **what it applies to**: new awards only (default), any transaction (incl. modifications), or last modified.
- **Sort:** newest award date, largest amount, or most recently modified.
- **Max awards** (1–5,000).
- **User-Agent contact.**

Example input:

```json
{
  "awardTypes": ["contracts"],
  "awardingAgencyName": "Department of Veterans Affairs",
  "naicsCodes": ["5415"],
  "recipientStates": ["VA", "MD"],
  "minAwardAmount": 100000,
  "startDate": "2026-07-01",
  "maxResults": 100
}
```

### Output (one item per award)

| Field | Description |
|---|---|
| `awardId`, `awardCategory`, `awardType`, `generatedInternalId`, `internalId` | Award identity (PIID / FAIN, category, type label) |
| `recipientName`, `recipientUei`, `recipientId` | Who received the award |
| `recipientLocation`, `recipientAddress`, `recipientCity`, `recipientState`, `recipientZip`, `recipientCountry` | Recipient location |
| `placeOfPerformanceCity`, `placeOfPerformanceState`, `placeOfPerformanceCountry` | Where the work happens |
| `awardingAgency`, `awardingSubAgency`, `fundingAgency`, `fundingSubAgency` | Who awarded and who paid |
| `awardAmount`, `totalOutlays`, `subsidyCost` | Obligated amount (loan face value for loans), outlays, loan subsidy cost |
| `baseObligationDate`, `startDate`, `endDate`, `lastDateToOrder`, `lastModifiedDate` | Dates |
| `description` | Award description |
| `naics`, `naicsDescription`, `psc`, `pscDescription` | Industry and product/service codes (contracts/IDVs) |
| `cfdaNumber`, `cfdaTitle` | Assistance listing program (grants/loans/assistance) |
| `sourceUrl`, `recipientProfileUrl`, `agencyProfileUrl` | USASpending.gov award, recipient and agency pages |

Example (from a real run): `ARCHITECHTURE SOLUTIONS LLC` (Fairfax, VA), Department of Veterans Affairs purchase order, $2,966,020.75, NAICS 541519, awarded 2026-10-13.

### Compliance

- Uses only the official public USASpending.gov API (run by the US Treasury Bureau of the Fiscal Service), with anonymous access, no login and no API key.
- Data is public US government spending data published under the DATA Act / FFATA.
- Requests are politely throttled to about 1 per second, back off on 429 and 5xx responses, and send a declared User-Agent.
- No anti-bot measures are bypassed and nothing is scraped from behind a login.
- Search coverage starts at 2007-10-01 (USASpending API limit).

### Pricing (pay per event)

| Event | Price |
|---|---|
| `apify-actor-start` (synthetic) | default $0.00005 |
| `award-result` (one award pushed) | **$0.002** ($2 per 1,000 awards) |

The code calls `Actor.charge(event_name="award-result")` after each pushed award and stops when your max charge is reached.

### Local run

```
pip install -r requirements.txt
## put input in storage/key_value_stores/default/INPUT.json
python -m src
```

# Actor input Schema

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

Which award categories to search. USASpending only allows one category per request, so each selected category is queried separately and Max awards is split evenly across them.

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

Optional. Full-text keywords matched across award descriptions, recipients, and IDs, e.g. "cybersecurity" or "drone".

## `recipientNameContains` (type: `string`):

Optional. Search text matched against the recipient's name, UEI, or DUNS, e.g. "Lockheed" or "Booz Allen".

## `awardingAgencyName` (type: `string`):

Optional. Exact top-tier agency name as shown on USASpending.gov, e.g. "Department of Defense", "Department of Veterans Affairs", "National Aeronautics and Space Administration".

## `awardingSubAgencyName` (type: `string`):

Optional. Exact sub-tier name, e.g. "Department of the Army" or "Federal Emergency Management Agency".

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

Optional. Two-letter US state codes for the recipient's location, e.g. TX, VA, AR.

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

Optional. NAICS codes or prefixes, e.g. 541512 or 54. Applies to contracts and IDVs only.

## `pscCodes` (type: `array`):

Optional. Product/Service codes, e.g. D399, R425. Applies to contracts and IDVs only.

## `minAwardAmount` (type: `integer`):

Optional. Only awards with total obligated amount (or loan face value) at or above this.

## `maxAwardAmount` (type: `integer`):

Optional. Only awards at or below this amount.

## `startDate` (type: `string`):

Optional. Start of the time window. Defaults to 30 days before the end date. Earliest supported: 2007-10-01.

## `endDate` (type: `string`):

Optional. End of the time window. Defaults to today.

## `dateType` (type: `string`):

How the date window is matched. "New awards only" returns awards first signed inside the window (best for fresh leads).

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

Result order (descending).

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

Maximum number of awards to return in total (split evenly across selected award types).

## `userAgent` (type: `string`):

Declared User-Agent sent to api.usaspending.gov.

## Actor input object example

```json
{
  "awardTypes": [
    "contracts"
  ],
  "dateType": "new_awards_only",
  "sortBy": "newest",
  "maxResults": 100,
  "userAgent": "USASpending Federal Awards Tracker jeaton1019@gmail.com"
}
```

# Actor output Schema

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

Federal awards from USASpending.gov, one item per award.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("intenal_builds/usaspending-federal-awards-tracker").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("intenal_builds/usaspending-federal-awards-tracker").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 '{}' |
apify call intenal_builds/usaspending-federal-awards-tracker --silent --output-dataset

```

## MCP server setup

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

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/J4XaXjJGN18cBwC0Y/builds/0zaSm3EHyyv0s8x64/openapi.json
