# USAspending — Federal Contracts and Grants Search (`dalbian/usaspending-federal-awards`) Actor

Search every prime federal contract, grant, loan and direct payment recorded by the US Treasury on USAspending.gov. Filter by keyword, agency, recipient, date, amount, NAICS, PSC and place of performance. Free government data, no key, no scraping.

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

## Pricing

from $30.00 / 1,000 search runs

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 Contracts and Grants Search

Search every prime award the US Treasury publishes on USAspending.gov: contracts, IDVs, grants, loans, direct payments. Filter by keyword, agency, recipient, date, amount, NAICS, PSC and place of performance, and get back structured rows with a link to the public award page.

No API key, no scraping, no rate card. The data is federal open data and the Actor queries it live on every run.

### What a search returns

`awardType: contracts`, `keywords: ["quantum computing"]`, `dateFrom: 2024-01-01`, `dateTo: 2026-09-01`, `minAmount: 5000000`, `placeOfPerformanceState: MD` returned three awards. The top one:

| Field | Value |
| --- | --- |
| `awardId` | HR001122F0052 |
| `recipientName` | THE JOHNS HOPKINS UNIVERSITY APPLIED PHYSICS LABORATORY LLC |
| `recipientUei` | C1HBCJ9RMBV3 |
| `awardingAgency` / `awardingSubAgency` | Department of Defense · Defense Advanced Research Projects Agency |
| `description` | UNDEREXPLORED SYSTEMS FOR UTILITY-SCALE QUANTUM COMPUTING (US2QC) PROGRAM |
| `awardAmount` / `obligatedAmount` | 31 575 626 |
| `potentialAmount` | 42 470 702 |
| `startDate` / `endDate` | 2022-06-06 · 2027-10-31 |
| `naics` / `psc` | 541715 · AC11 |
| `placeOfPerformance` | LAUREL, MD |
| `awardUrl` | https://www.usaspending.gov/award/CONT\_AWD\_HR001122F0052\_9700\_HR001122D0001\_9700 |

Every run also emits one `summary` row first, carrying the exact filter object sent to the API, the returned count, how many duplicate records were dropped, which pagination mode was used, and a `note` that explains a zero result rather than leaving you guessing.

### The amount question, answered

This is the field that decides whether a number means anything to you.

`awardAmount` is **money obligated to date** — the API's `total_obligation`. It is not the contract ceiling and not the potential value. For the Johns Hopkins award above, obligated is 31 575 626 while the ceiling is 42 470 702: a 35 per cent difference on one row.

On IDVs the gap is wider still. A NASA schedule held by Leidos shows 965 231 972 obligated against a ceiling of 2 457 479 894, and an FAA vehicle held by L3Harris shows 1 130 368 671 against 2 300 000 000. Reading the first number as "what they won" understates it by more than half.

Turn on **Fetch full award detail** and each row also gets `potentialAmount` (base and all options, the ceiling), `baseExercisedOptions`, `totalOutlays` (cash actually paid out), `dateSigned`, `subawardCount` and `totalSubawardAmount`. That costs one extra request per award and no extra charge.

Loans work differently: there is no obligation figure at all. `awardAmount` carries the face `loanValue` and `subsidyCost` carries what the subsidy costs the government. A 2026 Department of Energy direct loan to Georgia Power shows `loanValue` 22 414 694 000 with `subsidyCost` 0, while one to BlueOval SK shows 17 714 080 000 against a subsidy cost of 130 046 040. Every row states which basis it is on in `amountBasis`.

### What the dates actually filter

USAspending's default date filter is the **action date**, and it behaves in a way that surprises most people: it returns any award that had *a transaction* inside your window, then reports that award's lifetime totals.

Searching `artificial intelligence` contracts in the window 2026-06-01 to 2026-06-30 returns an ECS Federal contract that started 2020-04-23 and runs to 2027-03-11, at its full 120 575 059 obligated. The award is in the result set because it was modified in June 2026, not because anything happened in June 2026 worth 120 million.

Set **What the dates mean** to *new awards only* and the same window returns awards that were actually signed in it — Accenture Federal Services starting 2026-07-28, Four Points Technology starting 2026-06-29, MVation Worldwide starting 2026-06-09. Use that when you are tracking new business rather than portfolio activity.

`date_signed` behaves the same way as *new awards only* in practice; `last_modified_date` filters on when the record was edited, which is a data-freshness question rather than a spending one.

The archive starts at **2007-10-01**. Earlier start dates are rejected by the API, and the Actor clamps to that date rather than failing.

### How keyword search behaves

Keywords are matched against the **award description, the recipient name, the recipient UEI and the award ID**, not the description alone.

Verified on live data: searching `MAVERIS` returns MAVERIS LLC rows whose descriptions never contain the word, because the match came from the recipient name. Searching the UEI `XYB4JU4PA6T4` returns ECS Federal rows. Searching the contract number `W911QX20C0023` returns exactly that one contract.

It is a fuzzy full-text match, not a substring match. `MAVERIS` also returns a Raytheon contract for **MAVERICK** missile spares and a Salient CRGT task order named **MAVERICK**. Expect near-misses on short or unusual terms, and check `description` and `recipientName` before treating a row as a hit.

Several keywords are combined with OR, not AND. A search for `cybersecurity` over 2024 to 2026 returned Lockheed Martin, Amentum, General Dynamics IT, Deloitte, Maveris and Millennium — all plausibly in scope.

### One award family per run

The API refuses a request that mixes award families: contracts and grants sit in different tables with different columns, so one result set cannot hold both. **Award type** is therefore a single choice, and the codes behind each choice are:

| Choice | Codes |
| --- | --- |
| Contracts | A, B, C, D |
| IDVs | IDV\_A, IDV\_B, IDV\_B\_A, IDV\_B\_B, IDV\_B\_C, IDV\_C, IDV\_D, IDV\_E |
| Grants | 02, 03, 04, 05, F001, F002 |
| Loans | 07, 08, F003, F004 |
| Direct payments | 06, 10, F006, F007 |
| Other financial assistance | 09, 11, -1, F005, F008, F009, F010 |

The shape of a row follows the family. Contracts and IDVs carry `naics`, `psc` and `awardType` such as DELIVERY ORDER. Grants and direct payments carry `assistanceListing` instead — a NASA project grant to Wichita State University comes back as `43.014 CONGRESSIONALLY DIRECTED PROGRAMS`. IDVs have no end date; they have `lastDateToOrder`.

Run the Actor twice if you need both contracts and grants.

### Who uses this

Government-contracting firms sizing a market before they bid, and tracking which agencies buy what. Competitive-intelligence teams watching a named competitor's award flow by recipient name or UEI. Research and policy groups measuring federal spend on a topic across agencies. Journalists and watchdogs following money to a recipient, a state or a programme. Sales teams at vendors selling into federal agencies, who want the incumbent, the ceiling and the end date on a contract that is coming up for recompete.

### Scope and limits

**Prime awards only.** Subawards exist in USAspending but are a different result shape and are not returned here.

**An agency name that does not match returns zero rows, silently.** The API does not validate it. The Actor checks your name against the official 111-entry top-tier list before searching and puts the near matches in the summary row — `Department of Energery` comes back with `agencyMatch: no top-tier match` and a note suggesting *Department of Energy*. Sub-agency names such as *Department of the Army* also work and are sent at both tiers.

**Duplicate records exist in the source index.** Some awards, mostly Army contracts, are indexed twice under two different internal identifiers with identical amounts. A 300-award run on `artificial intelligence` hit eight of them. The Actor deduplicates on the public award identifier and reports the count in `duplicatesDropped`.

**Depth.** Results are fetched 100 at a time. The API refuses page numbers past 50 000 records, so beyond that the Actor switches to cursor paging and continues; `paginationMode` in the summary row says which was used.

### Source and licence

**USAspending.gov**, operated by the US Department of the Treasury under the DATA Act, through `api.usaspending.gov/api/v2`. US federal government works, public domain. The award detail used for `potentialAmount` comes from the same endpoint the USAspending website itself calls, so the figures match the public award page.

### Frequently asked

**Why did a search return nothing?**
Read the `note` on the summary row — it names the likely cause. In order of frequency: an agency name USAspending spells differently, a date window that is narrower than you think given the action-date default, and a keyword that appears in no description, recipient name or award identifier.

**Why is `awardAmount` smaller than the value I saw quoted in the press?**
Because press figures usually quote the ceiling. `awardAmount` is obligated to date. Switch on **Fetch full award detail** for `potentialAmount`.

**Why is `naics` empty on my grants?**
Because assistance awards are classified by assistance listing (CFDA), not by industry code. Use `assistanceListing`.

**Can I get more than 50 000 awards?**
Yes. Set **Maximum awards** higher and the Actor pages past the API's page-number ceiling with a cursor.

**Is `totalOutlays` of 0 an error?**
No. It means no money has been disbursed against the award yet, which is normal early in a period of performance. A 2023 University of Maryland delivery order for 18 000 000 obligated shows `totalOutlays` of 0.

# Actor input Schema

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

One award family per run. The API refuses a mixed list — contracts and grants live in different tables with different columns, so a single result set cannot hold both. Run the Actor twice if you need both.

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

Free-text terms, one per line. Several terms are combined with OR, not AND. The search covers the award description, the recipient name, the recipient UEI and the award ID, and it is a fuzzy full-text match rather than a substring match — 'maveris' also returns 'maverick'.

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

Exact agency name as USAspending spells it, for example 'Department of Energy' or 'National Aeronautics and Space Administration'. A name that matches nothing returns zero rows without an error, so the Actor checks yours against the official list and reports near matches in the summary row. Sub-agency names such as 'Department of the Army' also work.

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

Company, university, state or other recipient. Partial names work — 'Lockheed' finds 'LOCKHEED MARTIN CORP'.

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

YYYY-MM-DD. USAspending holds no search data before 2007-10-01 and rejects earlier dates. Read the date-type setting below before trusting this window.

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

YYYY-MM-DD. Leave both dates empty to search the whole archive from 2007 onwards.

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

This is the setting people get wrong. The default returns any award that had a transaction in the window, including a 2020 contract modified in 2026, and the amounts shown are the award's lifetime totals rather than the window's. Choose 'new awards only' when you want awards that actually began in the period.

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

Floor on the award amount, inclusive. For loans this is the loan value.

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

Ceiling on the award amount, inclusive.

## `placeOfPerformanceState` (type: `string`):

Two-letter US state or territory code, for example TX or PR. Filters on where the work is done, not where the recipient is registered.

## `recipientState` (type: `string`):

Two-letter code for the recipient's own registered address.

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

Industry codes, one per line, for example 541715 for physical and engineering R\&D. Contracts and IDVs carry these; assistance awards almost never do.

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

Product and Service codes, one per line, for example R499 or AD94. Contracts and IDVs only.

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

Awards are fetched 100 at a time. Past 50 000 the API's page counter is refused, so the Actor switches to cursor paging and keeps going; the summary row records which mode was used.

## `includeDetail` (type: `boolean`):

Adds a second request per award to get the contract ceiling (base and all options), the outlay total, the signing date and the subaward count. Slower and billed the same, but this is the only way to see potential value rather than money obligated so far.

## Actor input object example

```json
{
  "awardType": "contracts",
  "keywords": [
    "artificial intelligence"
  ],
  "dateType": "action_date",
  "maxResults": 200,
  "includeDetail": false
}
```

# Actor output Schema

# 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 = {
    "keywords": [
        "artificial intelligence"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("dalbian/usaspending-federal-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 = { "keywords": ["artificial intelligence"] }

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

```

## MCP server setup

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