# Federal Awards & Spending Lookup (USAspending.gov) (`whetstonetools/federal-awards-lookup`) Actor

Search U.S. Treasury USAspending.gov for federal contracts, grants, loans, direct payments, and IDVs by recipient name. Returns normalized award records with amounts, agency, dates, UEI, and source links. No API key. B2G sales intelligence and vendor due-diligence.

- **URL**: https://apify.com/whetstonetools/federal-awards-lookup.md
- **Developed by:** [Griffin](https://apify.com/whetstonetools) (community)
- **Categories:** Business
- **Stats:** 2 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Federal Awards & Spending Lookup (USAspending.gov)

Search the U.S. Treasury's official USAspending.gov database for federal contracts, grants, loans, direct payments, and IDVs awarded to any company or organization. No API key required — uses the public USAspending REST API.

### Use case

B2G (business-to-government) sales intelligence and vendor due diligence: "Has this company received federal money, how much, from which agencies, and for what?"

### Input

At least one search filter is required: `recipientName`, `naicsCodes`,
`awardingAgencies`, or `placeOfPerformanceStates`. When more than one is given
they are combined (AND).

| Field | Type | Default | Description |
|---|---|---|---|
| `recipientName` | string | — | Company or org name to search (partial/fuzzy OK). Optional if another filter is given |
| `naicsCodes` | array | — | Filter by NAICS industry code(s), e.g. `["541511"]` |
| `awardingAgencies` | array | — | Filter by top-level awarding agency name(s), e.g. `["Department of Defense"]` |
| `placeOfPerformanceStates` | array | — | Filter by 2-letter place-of-performance state code(s), e.g. `["MS","TX"]` |
| `awardTypes` | array | all | contracts, grants, loans, direct\_payments, idvs, other\_financial\_assistance |
| `includeSubawards` | boolean | false | Also return prime → sub-award (subcontractor / subrecipient) records |
| `includeRecipientHierarchy` | boolean | false | Add each recipient's corporate parent (parent UEI + name) |
| `sinceFiscalYear` | integer | last 5 FYs | Earliest FY to include (FY starts Oct 1; min 2008) |
| `maxResults` | integer | 50 | Max prime-award records across all types (sub-awards get their own budget) |

#### Input examples

Search by recipient name (default):

```json
{
  "recipientName": "Lockheed Martin",
  "awardTypes": ["contracts", "idvs"],
  "sinceFiscalYear": 2022
}
```

Search by NAICS code, no company name, with sub-awards and parent hierarchy:

```json
{
  "naicsCodes": ["541511"],
  "awardingAgencies": ["Department of Defense"],
  "includeSubawards": true,
  "includeRecipientHierarchy": true,
  "maxResults": 100
}
```

### Output record shape

| Field | Description |
|---|---|
| `recipientName` | Recipient name as reported by USAspending |
| `awardId` | Award ID (contract number, grant number, etc.) |
| `awardType` | Contract / Grant / Loan / Direct Payment / IDV / Other |
| `awardingAgency` | Top-level awarding agency |
| `awardingSubAgency` | Awarding sub-agency or office |
| `amount` | Obligated amount in USD |
| `description` | Award description (may be lengthy for contracts) |
| `startDate` | Award start date (YYYY-MM-DD) |
| `endDate` | Award end or expiry date |
| `placeOfPerformanceState` | 2-letter state code for place of performance |
| `recipientUei` | Unique Entity Identifier (UEI) of the recipient |
| `sourceUrl` | Direct link to the award page on usaspending.gov |
| `retrievedAt` | ISO timestamp of data retrieval |
| `recordType` | `prime` or `subaward` |
| `naicsCode` / `naicsDescription` | NAICS industry code + label (contracts / IDVs) |
| `pscCode` / `pscDescription` | Product & Service Code + label (contracts / IDVs) |
| `cfdaNumber` | CFDA / Assistance Listing number (grants, loans, direct payments, other) |
| `recipientId` | USAspending recipient hash id (stable key for the recipient) |
| `parentUei` / `parentName` | Recipient's corporate parent (only when `includeRecipientHierarchy` is on) |
| `primeAwardId` / `primeRecipientName` | On sub-award records: the parent prime award and its recipient |

### Billing

Priced per returned award record (apify-default-dataset-item). A query that returns 0 results costs nothing beyond the minimal run overhead.

### Caveats

- **Award-type grouping**: USAspending requires all codes in one request to be from the same award group (contracts, grants, loans, etc.). This actor queries each group separately and merges results.
- **Recipient name fuzziness**: USAspending's `recipient_search_text` matches broadly. This actor applies a word-overlap filter to reduce false positives but may include subsidiaries or name variants of the queried company.
- **Amount = obligated**: The `amount` field reflects the obligated amount, not the total contract ceiling or base-and-all-options value.
- **NAICS/PSC vs CFDA**: NAICS and PSC codes are populated for procurement awards (contracts, IDVs); CFDA / assistance-listing numbers are populated for financial-assistance awards (grants, loans, direct payments, other). The non-applicable code is `null` on each record.
- **Sub-awards**: When `includeSubawards` is on, sub-award records match your filter against the *sub-recipient* (e.g. where a company is a subcontractor). They carry `recordType="subaward"` and link back to the prime via `primeAwardId` / `primeRecipientName`.
- **Recipient hierarchy**: `parentUei` / `parentName` come from USAspending's recipient endpoint and are only populated when `includeRecipientHierarchy` is enabled.
- **Coverage**: Reliable data from FY 2008 onward (USAspending's stated earliest reliable coverage).

### Data source

U.S. Department of the Treasury — USAspending.gov public API: https://api.usaspending.gov\
Public domain data, no authentication required.

### FAQ

**How do I find out how much federal money a company has received?**
Run this actor with the company's `recipientName`. It searches the official
USAspending.gov database and returns every federal contract, grant, loan, direct
payment, and IDV awarded to that recipient, with the obligated amount, awarding
agency, dates, and a direct link to each award.

**Is there a free API to search federal contracts by company?**
This actor is pay-per-result (you only pay for award records returned; a zero-result
query costs nothing beyond minimal overhead) and it runs on the U.S. Treasury's free,
public USAspending REST API — no API key required.

**What kinds of federal awards does it cover?**
Contracts, grants, loans, direct payments, IDVs, and other financial assistance,
from fiscal year 2008 onward (USAspending's earliest reliable coverage).

**Can I use this for B2G sales or vendor due diligence?**
Yes — that's the core use case: see whether a prospect or counterparty has won
federal money, how much, from which agencies, and for what work.

# Actor input Schema

## `recipientName` (type: `string`):

Company or organization name to search for in the federal awards database (USAspending.gov). Partial names are supported — the API uses fuzzy matching. Optional if you supply at least one of NAICS codes, awarding agencies, or place-of-performance states below.

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

Filter by one or more NAICS industry codes (e.g. 541511 = Custom Computer Programming Services). Can be used with or instead of a recipient name.

## `awardingAgencies` (type: `array`):

Filter by one or more top-level awarding agency names, exactly as USAspending labels them (e.g. "Department of Defense", "Department of Health and Human Services"). Can be used with or instead of a recipient name.

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

Filter by 2-letter U.S. state code(s) where the work is performed (e.g. MS, TX, CA). Can be used with or instead of a recipient name.

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

Which categories of federal awards to return. Each category is queried separately (USAspending requires same-group codes per request) and merged. Defaults to all.

## `includeSubawards` (type: `boolean`):

Also return sub-award (prime → subcontractor / subrecipient) records for the same filters. Sub-awards are fetched with their own result budget (up to Max results) and are tagged recordType="subaward" with primeAwardId / primeRecipientName populated.

## `includeRecipientHierarchy` (type: `boolean`):

Look up each recipient's corporate parent (parent UEI + parent name) via the USAspending recipient endpoint and add parentUei / parentName to prime-award records. Adds one API call per unique recipient, so it is off by default.

## `sinceFiscalYear` (type: `integer`):

Earliest federal fiscal year to include (FY starts Oct 1). Defaults to 5 years back. Minimum: 2008 (USAspending earliest reliable data).

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

Maximum total prime-award records to return across all award types. Defaults to 50. Sub-awards (if enabled) have their own separate budget of the same size. Higher values increase run time and cost.

## Actor input object example

```json
{
  "recipientName": "Booz Allen Hamilton",
  "awardTypes": [
    "contracts",
    "grants",
    "loans",
    "direct_payments",
    "idvs",
    "other_financial_assistance"
  ],
  "includeSubawards": false,
  "includeRecipientHierarchy": false,
  "maxResults": 50
}
```

# 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 = {
    "recipientName": "Booz Allen Hamilton"
};

// Run the Actor and wait for it to finish
const run = await client.actor("whetstonetools/federal-awards-lookup").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 = { "recipientName": "Booz Allen Hamilton" }

# Run the Actor and wait for it to finish
run = client.actor("whetstonetools/federal-awards-lookup").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "recipientName": "Booz Allen Hamilton"
}' |
apify call whetstonetools/federal-awards-lookup --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=whetstonetools/federal-awards-lookup",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/KgwU6mHuNSDOe843I/builds/u3DlIDJqqgTve3OBN/openapi.json
