# USASpending Federal Awards Intelligence (`wakey7dev/usaspending-awards-normalizer`) Actor

Search USASpending.gov for federal contracts, grants, loans. Government spending analysis, contractor intelligence, market research.

- **URL**: https://apify.com/wakey7dev/usaspending-awards-normalizer.md
- **Developed by:** [Chris Wakefield](https://apify.com/wakey7dev) (community)
- **Categories:** Business
- **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?

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

![Chris The Dev](https://raw.githubusercontent.com/chriswakefield87/appstore-screenshot-translator/main/assets/actor-banner.png)

## USASpending Federal Awards Normalizer

Search **US federal contracts, grants, and loans** from USASpending.gov with enriched, normalized data — recipient name deduplication, UEI entity resolution, industry classification, agency mapping, and amount tiering. Built on the official USASpending.gov REST API — **no API key required**.

### What This Actor Does

- Fetches federal awards (contracts, grants, loans, IDVs) from USASpending.gov
- **Normalizes recipient names** — strips legal suffixes (INC, LLC, CORP), title-cases, cleans whitespace
- **Resolves entities by UEI** — the unique government entity identifier, so every spelling variant of a company is grouped together
- **Aggregates spending by recipient** — instantly see who's winning the most contracts and their total value
- **Classifies industries** — maps NAICS codes to 21 broad sectors (Manufacturing, IT, Construction, etc.)
- **Classifies award types** — contract, IDV, grant, loan, or direct payment
- **Maps and shortens agencies** — "Department of Defense" → "DoD", with canonical names
- **Tiers award amounts** — Micro (<$100K) through Mega ($100M+)
- **Normalizes locations** — US state codes → full names, country codes → full names

### Input Parameters

| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `searchQuery` | string | No | (empty) | Keyword to search awards (product, service, description) |
| `recipientName` | string | No | (empty) | Search by recipient/vendor company name |
| `agencyName` | string | No | (empty) | Filter by top-tier awarding agency |
| `naicsCode` | string | No | (empty) | Filter by NAICS industry code |
| `awardType` | select | No | contracts | contracts / idvs / grants / loans / direct\_payments / all |
| `dateFrom` | string | No | (empty) | Award start date from (YYYY-MM-DD) |
| `dateTo` | string | No | (empty) | Award end date to (YYYY-MM-DD) |
| `minAmount` | number | No | (empty) | Minimum award amount (USD) |
| `maxResults` | integer | No | 50 | Maximum awards to return (1–500) |

### Example Input

```json
{
  "searchQuery": "cybersecurity",
  "awardType": "contracts",
  "dateFrom": "2025-10-01",
  "minAmount": 1000000,
  "maxResults": 25
}
```

### Example Output (Dataset Item)

```json
{
  "awardId": "W91ZLK26FA022",
  "recipientName": "STERLING COMPUTERS CORPORATION",
  "recipientNameNormalized": "Sterling Computers",
  "recipientUei": "YZTLALWM4UC7",
  "awardType": "contract",
  "awardAmount": 181800.0,
  "amountTier": "Small ($100K–$1M)",
  "awardingAgency": "Department of Defense",
  "awardingAgencyShort": "DoD",
  "awardingSubAgency": "Department of the Army",
  "fundingAgency": "Department of Defense",
  "naicsCode": "334111",
  "naicsDescription": "Electronic Computer Manufacturing",
  "industrySector": "Manufacturing",
  "pscCode": "7B22",
  "pscDescription": "IT and Telecom - Compute: Servers (Hardware and Perpetual License Software)",
  "placeOfPerformanceState": "Maryland",
  "placeOfPerformanceStateCode": "MD",
  "placeOfPerformanceCountry": "United States",
  "startDate": "2026-03-16",
  "endDate": "2026-06-01",
  "usaspendingUrl": "https://www.usaspending.gov/award/CONT_AWD_W91ZLK26FA022_9700_..."
}
```

### Use Cases

- **Government contractors** — competitive intelligence: who's winning contracts in your space, at what value
- **Sales & business development** — identify prime contractors and teaming partners by agency and NAICS
- **Market research** — size federal demand for a product or service category
- **Journalists & watchdogs** — track federal spending and recipient concentration
- **Consultants** — build opportunity pipelines with normalized, joinable data
- **Supply chain** — find subcontracting opportunities through prime award analysis

### Normalization & Enrichment

| Feature | Description |
|---|---|
| **Recipient Name Dedup** | Strips legal suffixes (INC, LLC, CORP, LTD), normalizes case |
| **UEI Entity Resolution** | Groups all awards by the unique government entity identifier |
| **Spend Aggregation** | Total award count + value per recipient, ranked |
| **Industry Classification** | NAICS 2-digit → 21 standard industry sectors |
| **Award Type Classification** | contract / IDV / grant / loan / direct payment |
| **Agency Mapping** | Canonical agency names + short codes (DoD, NASA, GSA…) |
| **Amount Tiering** | Micro → Mega buckets for quick filtering |
| **Location Normalization** | State & country codes → full names |

### Data Source

[USASpending.gov](https://www.usaspending.gov/) — the official open data source for US federal spending, mandated by the DATA Act. Public domain government data. Free REST API, no key required. Updated daily.

### Pricing

Pay-per-result pricing — you only pay when the actor returns data. See store page for current rates.

### Output Structure

- **Dataset**: Full normalized award records (JSON)
- **OUTPUT** (KVS): Human-readable summary table with top recipients by value
- **TOP\_RECIPIENTS** (KVS): Entity-resolved recipients ranked by total award value
- **STATS** (KVS): Aggregate statistics for dashboards

# Actor input Schema

## `searchQuery` (type: `string`):

Keyword to search awards (product, service, or description text). Leave empty to use other filters.

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

Search by recipient/vendor company name (e.g. 'Boeing'). Returns awards where this is the recipient.

## `agencyName` (type: `string`):

Filter by top-tier awarding agency (e.g. 'Department of Defense'). Leave empty for all agencies.

## `naicsCode` (type: `string`):

Filter by NAICS industry code (e.g. '541512' for computer systems design). Leave empty for all industries.

## `awardType` (type: `string`):

Type of federal award to search. Contracts is the most common for competitive intelligence.

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

Award start date from (YYYY-MM-DD). Leave empty for no lower bound.

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

Award end date to (YYYY-MM-DD). Leave empty for no upper bound.

## `minAmount` (type: `number`):

Only return awards worth at least this amount. Leave empty for no minimum.

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

Maximum number of awards to return (default: 50, max: 500)

## Actor input object example

```json
{
  "searchQuery": "cybersecurity",
  "awardType": "contracts",
  "maxResults": 50
}
```

# Actor output Schema

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

Complete normalized award records with industry sectors, amount tiers, and deduplicated recipients.

## `summary` (type: `string`):

Human-readable summary table with top recipients by award value.

## `stats` (type: `string`):

Aggregate statistics: total awards, total value, agency and industry distribution.

## `topRecipients` (type: `string`):

Entity-resolved recipients ranked by total award value (UEI deduplicated).

# 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 = {
    "searchQuery": "cybersecurity"
};

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

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

```

## MCP server setup

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

```

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/XLzAyTiXyVp7blJvY/builds/DthTnFuj1EDAEFeoj/openapi.json
