# USAspending Federal Contract Awards - Who Won What (`j0401/usaspending-awards`) Actor

Federal contract awards from USAspending.gov (public, no key, 71.9M contracts since 2008): recipient, award amount, awarding and funding agency, NAICS, dates and place of performance. Search by recipient, agency, NAICS, state, date or amount; or total awards by agency, industry or recipient.

- **URL**: https://apify.com/j0401/usaspending-awards.md
- **Developed by:** [Wenhao Yang](https://apify.com/j0401) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.03 / 1,000 federal contract awards

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Contract Awards - Who Won What

Every federal contract award recorded since fiscal 2008, straight from
USAspending.gov. **71.9 million contracts** - who won, for how much, from which
agency, in which industry, and where the work is performed.

### Low cost

**From $0.00005 per record, down to $0.00003 at Gold.** Pay only for the
records you actually receive - the whole award corpus stays queryable, you are
never billed for the scan behind it.

### What you get

One row per federal contract award:

- **Who won** - the recipient name and its USAspending recipient ID
- **How much** - the total obligated award amount
- **From whom** - the awarding agency and sub-agency
- **What kind** - the contract award type (definitive contract, delivery order,
  purchase order, BPA call)
- **What industry** - the NAICS code and its description
- **When** - the period of performance start and end
- **Where** - the place of performance state, and the recipient's city / state

Every filter is applied by the source, so a query returns only the awards that
match it.

### Filter it

- **Recipient** - `recipient="Lockheed"` finds every award to that vendor.
- **Agency** - `agency="Veterans Affairs"`, `agency="Homeland Security"`.
- **Industry** - `naics="541512"` for a 6-digit code, `"23"` for a sector.
- **Place** - `state="TX"` for where the work is performed.
- **Period** - `dateFrom="2024-01-01"`, or `recentDays=365` for the last year.
- **Size** - `minAmount=1000000000` for billion-dollar awards.

### Example inputs

**A vendor's federal book of business** - `recipient` is a substring match.

```json
{ "recipient": "LOCKHEED", "maxResults": 25 }
```

**One agency's spend in one state** - combine agency and place.

```json
{ "agency": "Veterans Affairs", "state": "TX", "maxResults": 50 }
```

**The big recent contracts** - a billion and up, started in the last year.

```json
{ "minAmount": 1000000000, "recentDays": 365, "maxResults": 50 }
```

**Who gets the money** - `mode=aggregate` totals award dollars per agency.

```json
{ "mode": "aggregate", "groupBy": "awardingAgency" }
```

### Or roll it up

Set `mode=aggregate` and get total award dollars by **awarding agency**,
**funding agency**, **NAICS industry** or **recipient**. The agency and industry
lists come back in full; the recipient list is the largest spenders.

### Then follow the money

- **Competitive intelligence** - who is winning a given agency's or industry's
  contracts, and for how much.
- **Vendor risk / KYB** - a recipient's federal award history, by agency and year.
- **Market sizing** - total federal contract dollars by NAICS sector or state.
- **Recompete watch** - awards whose period of performance ends soon.

### Example output

**One award** - a Lockheed contract over $1B:

```json
{
 "platform": "usaspending-awards",
 "source": "usaspending-federal-contracts",
 "mode": "rows",
 "groupKey": "",
 "groupCount": "",
 "groupBy": "",
 "groupAmount": "",
 "awardId": "DEAC0494AL85000",
 "generatedId": "CONT_AWD_DEAC0494AL85000_8900_-NONE-_-NONE-",
 "recipientName": "LOCKHEED MARTIN CORP",
 "recipientId": "6e7a895c-aa57-8600-2a8a-4e237f6213f6-C",
 "amount": "48063737196.35",
 "awardingAgency": "Department of Energy",
 "awardingSubAgency": "Department of Energy",
 "contractAwardType": "DEFINITIVE CONTRACT",
 "description": "",
 "startDate": "1993-10-15",
 "endDate": "2017-04-30",
 "popState": "NM",
 "recipientCity": "LITTLETON",
 "recipientState": "CO",
 "naicsCode": "561210",
 "naicsDescription": "FACILITIES SUPPORT SERVICES",
 "sourceUpdatedAt": "2026-10-08"
}
```

**`mode=aggregate`, `groupBy=awardingAgency`** - total obligated dollars:

```
Department of Defense                    $8,148,198,605,729
Department of Energy                       $857,268,607,900
Department of Veterans Affairs             $678,704,165,907
Department of Health and Human Services    $484,645,238,486
Department of Homeland Security            $414,880,887,133
```

### Notes on the data, from the source

- **These are award totals, not transactions.** One row per contract award, with
  the total obligated amount - not the individual modifications.
- **The agency filter needs a real agency name.** A partial name that does not
  match silently returns nothing, so this actor matches your text against the
  source's own 111-name agency list and refuses an ambiguous or unknown value
  (telling you the candidates) rather than returning an empty set.
- **`amount` arrives as a string** (the source serialises the number that way);
  the README's aggregate table shows the dollars summed by the source.
- **The recipient mailing ZIP is not included** - it is empty on the award feed.
  The place of performance state and the recipient city / state are populated.
- **Coverage starts at fiscal 2008** (the source's own searchable floor); earlier
  awards exist only in the bulk download.

# Actor input Schema

## `recipient` (type: `string`):

Substring match on the recipient (vendor) name, e.g. 'LOCKHEED', 'BOEING', 'GENERAL DYNAMICS'. Blank = any.

## `agency` (type: `string`):

Any part of the top-tier awarding agency name; it is matched against the API's own list, e.g. 'Veterans Affairs', 'Homeland Security', 'Energy'. An ambiguous or unknown value is rejected with the candidates, because a partial name that does not match returns zero silently. Blank = any.

## `naics` (type: `string`):

A 2-, 4- or 6-digit NAICS code, e.g. '541512' (computer systems design), '336411' (aircraft manufacturing), '23' (construction). Blank = any.

## `state` (type: `string`):

Two-letter state code for where the work is performed, e.g. 'TX', 'VA', 'CA'. Blank = any.

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

Earliest award start date, YYYY-MM-DD. The source accepts 2007-10-01 at the earliest. Blank = any.

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

Latest award start date, YYYY-MM-DD. Blank = any.

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

Smallest total obligated award amount in dollars. Blank = no lower bound.

## `maxAmount` (type: `number`):

Largest total obligated award amount in dollars. Blank = no upper bound.

## `recentDays` (type: `integer`):

Award start date within the last N days. Ignored when 'Start date on or after' is set. 0 = off.

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

rows = individual contract awards matching your filters (default). aggregate = total award dollars per group (see groupBy).

## `groupBy` (type: `string`):

Which dimension to total award dollars over (mode=aggregate). Blank = awardingAgency. The agency and industry lists come back in full; the recipient list is the largest spenders and is capped by the source.

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

Cap the number of records pushed in rows mode (0 = default 50; up to 1,000 per run). Each record is metered individually, so there is no per-run charge cap. Aggregate mode returns every group.

## Actor input object example

```json
{
  "recipient": "",
  "agency": "",
  "naics": "",
  "state": "",
  "dateFrom": "",
  "dateTo": "",
  "recentDays": 0,
  "mode": "rows",
  "groupBy": "",
  "maxResults": 50
}
```

# Actor output Schema

## `recordsUrl` (type: `string`):

Federal contract award records - as JSON

## `datasetUrl` (type: `string`):

No description

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

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

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,j0401/usaspending-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/0pPsVNvHMGHGyH0sf/builds/UY05tAMgRWjj3fIyw/openapi.json
