# USAspending Federal Awards (Contracts, Grants, Loans) (`great_stuff/usaspending-awards`) Actor

US federal contracts, IDVs, grants and loans from USAspending.gov—recipient, amount, agency, NAICS/PSC and place of performance.

- **URL**: https://apify.com/great_stuff/usaspending-awards.md
- **Developed by:** [Kamal Katul](https://apify.com/great_stuff) (community)
- **Categories:** Business, Lead generation
- **Features:** Limited permissions
- **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 records

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 Export (Contracts, IDVs, Grants, Loans)

Export **US federal awards** from the official **USAspending.gov API**: contracts, IDVs (GWACs, IDIQs, BPAs, schedules), grants and loans. Each record has the recipient name, UEI, address, award amount, outlays, awarding and funding agency, NAICS and PSC codes (contracts) or assistance listing (grants and loans), dates, place of performance and links to the award and recipient pages. No login or API key is needed.

### Use cases

- **GovCon sales and BD teams:** who just won cybersecurity, IT or construction contracts in your NAICS, by agency and state (teaming and subcontracting leads)
- **Competitive intelligence:** a competitor's awards by name or UEI, with amounts and end dates (recompete timing)
- **Grant seekers and consultants:** new grant awards by assistance listing, e.g. NSF SBIR/STTR (47.084)
- **Lenders, journalists and researchers:** federal loans and spending trends by agency

### Input

| Field | Meaning |
|---|---|
| `awardCategory` | `contracts` (default), `idvs`, `grants` or `loans`. One per run. |
| `dateWithinDays` / `dateFrom` / `dateTo` | Awards with activity in the date range (default: last 30 days). 2007-10-01 or later. |
| `newAwardsOnly` | Only awards first made in the range, not older awards that were modified or paid in it. |
| `keywords` | Full-text keywords (3+ characters), e.g. `cybersecurity`. |
| `awardingAgencies` | Full top-tier names, e.g. `Department of Defense`. Unknown names stop the run with a clear message. |
| `recipientName` | Recipient name or UEI. |
| `naicsCodes`, `pscCodes` | Contracts and IDVs only. |
| `assistanceListings` | Grants and loans only, e.g. `47.084`. |
| `recipientStates`, `placeOfPerformanceStates` | 2-letter US codes. IDVs have no place of performance, so use recipient states for IDVs. |
| `minAmount`, `maxAmount` | Award amount range in USD. |
| `sortBy` | `amount` (largest first), `lastModified` or `startDate`. |
| `maxResults` | Stop after this many awards (default 100). |

### Output example

```json
{
  "awardId": "15JA0523F00000372",
  "url": "https://www.usaspending.gov/award/CONT_AWD_15JA0523F00000372_1501_47QTCB22D0381_4732",
  "category": "contracts",
  "awardType": "DELIVERY ORDER",
  "recipientName": "AVANTGARDE LLC",
  "recipientUei": "NLSBAKHB8VD9",
  "recipientCity": "GEORGETOWN",
  "recipientState": "TX",
  "awardAmount": 13598742.7,
  "totalOutlays": 9360736.24,
  "startDate": "2023-09-29",
  "endDate": "2027-09-28",
  "lastModifiedDate": "2026-09-15",
  "awardingAgency": "Department of Justice",
  "naicsCode": "541512",
  "pscCode": "DA10",
  "placeOfPerformanceState": "TX",
  "source": "USAspending.gov API. Not endorsed by the U.S. Treasury."
}
```

Each record has 36 fields. Fields not shown above include the recipient address, ZIP and country, the recipient page link, loan value and subsidy cost (loans), the description, base obligation date, sub-agency, funding agency, NAICS and PSC descriptions, assistance listings, place-of-performance city and country, and disaster emergency fund codes. Fields that do not apply to a category are `null`.

### Pricing

Pay per event: **$0.002 per award** saved ($2 per 1,000 awards). Set a maximum charge per run in Apify to cap spending. The Actor stops cleanly at that limit.

### Limits and notes

- Aggregated or anonymised recipients ("MULTIPLE RECIPIENTS", "REDACTED DUE TO PII") are skipped and not charged. Direct payments and "other" assistance are not offered, because those mostly go to private individuals.
- Without `newAwardsOnly`, the date range matches any transaction, so long-running awards modified in the range are included.
- Recent Department of Defense contract data is published with a delay of about 90 days.
- Each run writes a `RUN_SUMMARY` record to the key-value store (read, skipped, saved and the number of requests).
- Invalid input stops the run with a clear message, and nothing is charged.
- Records involving locations this Actor does not cover are skipped.

### FAQ

**Do I need an API key?**
No. USAspending.gov offers a free public API.

**Why do recent grants return nothing?**
Agencies report assistance awards with a lag of several weeks, and Defense contract data is delayed by about 90 days. Widen `dateWithinDays` (for example 90 or 180).

**What does `newAwardsOnly` do?**
It keeps only awards whose start date is in your date range. Without it, long-running awards with any transaction in the range are included.

**What happens if the API fails mid-run?**
The Actor retries with backoff. If it still fails, it keeps the awards already saved and reports the error in `RUN_SUMMARY`.

### Legal

Data from USAspending.gov (U.S. Department of the Treasury, Bureau of the Fiscal Service), the official source of federal spending data under the DATA Act. The API is public and needs no key; data produced by the U.S. government is not subject to copyright in the US. This Actor is independent and is **not affiliated with or endorsed by the U.S. Treasury or USAspending.gov**. Records describe award recipients (businesses, governments, universities and nonprofits).

# Actor input Schema

## `awardCategory` (type: `string`):

One award category per run. Direct payments and "other" assistance are not offered because they mostly go to private individuals.

## `dateWithinDays` (type: `integer`):

Awards with a transaction (or, with "New awards only", a first obligation) in the last N days. Ignored when Date from is set.

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

Start of an exact date range (YYYY-MM-DD), 2007-10-01 or later.

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

End of the date range (YYYY-MM-DD). Defaults to today.

## `newAwardsOnly` (type: `boolean`):

Only awards first made in the date range, not older awards that were modified or paid in it.

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

Full-text keywords (3+ characters each), e.g. "cybersecurity". An award matches any keyword.

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

Full top-tier agency names, e.g. "Department of Defense", "National Science Foundation". Case does not matter.

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

Search recipients by name or UEI (3+ characters).

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

Contracts and IDVs only. 2 to 6 digits, e.g. 541512.

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

Contracts and IDVs only. Product and Service Codes, e.g. DA01 or R425.

## `assistanceListings` (type: `array`):

Grants and loans only, e.g. 47.084 or 93.778.

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

2-letter US state or territory codes of the recipient address, e.g. TX.

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

2-letter US state or territory codes where the work is performed.

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

Only awards of at least this amount.

## `maxAmount` (type: `integer`):

Only awards of at most this amount.

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

Order of results. Combine with Max results to get the top awards.

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

Stop after this many awards.

## Actor input object example

```json
{
  "awardCategory": "contracts",
  "dateWithinDays": 30,
  "newAwardsOnly": false,
  "naicsCodes": [
    "541511",
    "541512"
  ],
  "sortBy": "amount",
  "maxResults": 50
}
```

# Actor output Schema

## `items` (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 = {
    "dateWithinDays": 30,
    "naicsCodes": [
        "541511",
        "541512"
    ],
    "maxResults": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("great_stuff/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 = {
    "dateWithinDays": 30,
    "naicsCodes": [
        "541511",
        "541512",
    ],
    "maxResults": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("great_stuff/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 '{
  "dateWithinDays": 30,
  "naicsCodes": [
    "541511",
    "541512"
  ],
  "maxResults": 50
}' |
apify call great_stuff/usaspending-awards --silent --output-dataset

```

## MCP server setup

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