# USAspending API: Federal Contracts, Grants & Spending Search (`wooden_scanner_c1n/us-federal-spending`) Actor

Search US government contracts, grants and loans from the official USAspending.gov API. Filter by keyword, recipient, agency, award type, dates, NAICS/PSC, state and amount. Find who wins federal contracts. Organisations only, no personal data.

- **URL**: https://apify.com/wooden_scanner_c1n/us-federal-spending.md
- **Developed by:** [Sean](https://apify.com/wooden_scanner_c1n) (community)
- **Categories:** Lead generation, Business, AI
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.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 API: US Federal Contracts & Grants Awards

Search **US federal contracts, grants, loans and other awards** straight from the official **USAspending.gov API**, and get back one clean, flat record per award: who won it, how much, which agency paid, what it was for, when and where the work happens, and a link to the official award page.

Built for **government-contracting (GovCon) business development, competitor research, market sizing, grant prospecting, journalism and AI agents** that need reliable federal spending data without learning the USAspending filter syntax.

### Why use it

- **Official source.** Data comes from the documented public USAspending.gov API v2, run by the U.S. Department of the Treasury. No scraping of web pages.
- **Simple filters, the important ones.** Keywords, recipient name or UEI, awarding agency, award type, date range, NAICS and PSC codes, state and minimum amount.
- **Flat, consistent output.** Contracts, IDVs, grants, loans and direct payments all come back in the same shape, ready for a spreadsheet, CRM or database.
- **Organisations only.** Awards to individuals, sole proprietorships and anonymised recipient groups are left out, so there is no personal data in the output. Street addresses are not included.
- **Licence on every record.** Each record carries its source and the attribution USAspending asks for.
- **Agent-ready.** Simple input, predictable JSON. Works through the Apify API and the Apify MCP server, so AI assistants (Claude, ChatGPT, Cursor and others) can call it as a tool.

### Input

| Field | What it does |
|---|---|
| `keywords` | Words to find in award descriptions, recipients and codes (3+ characters each). |
| `awardTypes` | `contracts` (default), `idvs` (contract vehicles such as GWACs, IDIQs, BPAs), `grants`, `loans`, `direct_payments`, `other_assistance`. Pick several and the result limit is shared between them. |
| `recipientName` | Only awards to this organisation, by name or 12-character UEI. |
| `agency` | Awarding department or sub-agency, by name or abbreviation (`Department of Defense`, `NASA`, `Department of the Air Force`). |
| `dateFrom`, `dateTo` | Date range for award activity (YYYY-MM-DD). Default: the last 12 months. Earliest: 2007-10-01. |
| `naicsCodes` | NAICS industry codes, 2 to 6 digits; a prefix matches everything under it (contracts only). |
| `pscCodes` | Product and Service Codes such as `R425` (contracts only). |
| `states` | Place-of-performance states, two-letter codes (`TX`, `VA`). |
| `minAmount` | Only awards worth at least this many US dollars. |
| `sortBy` | `amount` (largest first, default) or `newest`. |
| `maxItems` | Maximum awards to return, 1 to 5,000 (default 50). |

Example: Department of Defense cybersecurity contracts in Virginia worth over $1 million, in computer-services NAICS codes:

```json
{
  "keywords": ["cybersecurity"],
  "awardTypes": ["contracts"],
  "agency": "Department of Defense",
  "naicsCodes": ["5415"],
  "states": ["VA"],
  "minAmount": 1000000,
  "dateFrom": "2025-10-01",
  "dateTo": "2026-09-30",
  "maxItems": 200
}
```

### Output

One record per award:

```json
{
  "awardId": "FA862118F6251",
  "awardCategory": "contract",
  "awardType": "DELIVERY ORDER",
  "recipientName": "LOCKHEED MARTIN CORPORATION",
  "recipientUei": "KDT2YLB34NT6",
  "recipientCity": "ORLANDO",
  "recipientState": "FL",
  "recipientCountry": "USA",
  "amount": 666315748.84,
  "totalOutlays": 242708.65,
  "subsidyCost": null,
  "currency": "USD",
  "awardingAgency": "Department of Defense",
  "awardingSubAgency": "Department of the Air Force",
  "fundingAgency": "Department of Defense",
  "description": "IGF::OT::IGF  AFSOC ACTS AWARD OF CONTRACT FOR CLS, ENGINEERING, INSTRUCTION, CYBERSECURITY, DMO",
  "startDate": "2018-02-08",
  "endDate": "2027-01-31",
  "baseObligationDate": "2018-02-08",
  "lastModifiedDate": "2026-06-15",
  "placeOfPerformanceCity": "ORLANDO",
  "placeOfPerformanceCounty": "ORANGE",
  "placeOfPerformanceState": "FL",
  "placeOfPerformanceZip5": "32825",
  "placeOfPerformanceCountry": "USA",
  "congressionalDistrict": "FL-10",
  "naicsCode": "336413",
  "naicsDescription": "OTHER AIRCRAFT PARTS AND AUXILIARY EQUIPMENT MANUFACTURING",
  "pscCode": "J069",
  "pscDescription": "MAINT/REPAIR/REBUILD OF EQUIPMENT- TRAINING AIDS AND DEVICES",
  "assistanceListingNumbers": null,
  "assistanceListingTitles": null,
  "url": "https://www.usaspending.gov/award/CONT_AWD_FA862118F6251_9700_FA862115D6276_9700",
  "recipientProfileUrl": "https://www.usaspending.gov/recipient/ea75ddee-2d00-ac7f-5e72-6f42d7c88c8c-C/latest",
  "source": "USAspending.gov API v2 (U.S. Department of the Treasury, Bureau of the Fiscal Service)",
  "licence": "USAspending.gov, U.S. Department of the Treasury, Bureau of the Fiscal Service. Data may be copied, adapted, redistributed and used commercially (https://www.usaspending.gov/about). Recipient name and location may include Dun & Bradstreet Open Data; source: D&B (https://www.usaspending.gov/db_info).",
  "retrievedAt": "2026-11-03T20:00:00Z"
}
```

Notes on fields:

- `amount` is the award's total obligated amount; for loans it is the face value of the loan, and `subsidyCost` is the government's estimated cost.
- `startDate` is the period-of-performance start (for loans, the issue date). For contract vehicles (IDVs), `endDate` is the last date to order.
- NAICS and PSC are filled for contracts and IDVs; assistance listing (CFDA) numbers and titles are filled for grants, loans and other assistance.

### Pricing

Pay per result: a small fee when a run starts plus a fee per award record returned. No subscription. You can set a maximum cost per run in the run options and the Actor stops when it reaches it. Runs with no matching awards cost only the start fee.

### Data source and licence

- **Source:** [USAspending.gov](https://www.usaspending.gov) API v2 (`https://api.usaspending.gov`), the official source for US federal spending data under the DATA Act, published by the U.S. Department of the Treasury, Bureau of the Fiscal Service.
- **Licence:** USAspending states that its data "is available to copy, adapt, redistribute, or otherwise use for non-commercial or for commercial purposes", subject to the Dun & Bradstreet limitation ([About page](https://www.usaspending.gov/about)).
- **Dun & Bradstreet:** recipient business name and location can be D\&B Open Data. Attribute D\&B when you reuse those fields, and do not use this Actor to rebuild a bulk business directory ([D\&B terms](https://www.usaspending.gov/db_info)). Each run is capped at 5,000 awards for this reason.
- Suggested citation: *USAspending.gov, U.S. Department of Treasury, Bureau of the Fiscal Service, https://www.usaspending.gov. Accessed \[date].*

### Good to know

- **No personal data.** Awards whose recipient is an individual or a sole proprietorship, and placeholder recipients such as "REDACTED DUE TO PII" or "MULTIPLE RECIPIENTS", are removed. The run's status message says how many were left out.
- **Dates:** the date range matches award activity (new awards and later modifications), as on USAspending's Advanced Search. Older awards with recent modifications can appear.
- **Amounts and agencies** are as reported by federal agencies to USAspending; agencies can revise them later.
- **Prime awards only.** Sub-awards are not included.
- Speed: roughly 15 seconds per 100 awards (5,000 awards take about 12 to 15 minutes). The default input finishes in about 10 seconds.
- If you set a maximum cost per run, the Actor stops cleanly when it is reached and says so in the status message.
- This Actor is not affiliated with or endorsed by the U.S. Department of the Treasury or USAspending.gov.

### Use with AI agents (MCP)

Add this Actor to the [Apify MCP server](https://mcp.apify.com) and your assistant can answer questions like *"Which companies won the largest NASA contracts in the last year?"* or *"List grants over $1M to universities in Texas for water projects"* by calling it with the filters above.

# Actor input Schema

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

Words to find in award descriptions, recipients and codes (each at least 3 characters). Leave empty to search everything that matches the other filters.

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

Which kinds of federal awards to return. Default: contracts. When you pick several, maxItems is shared between them.

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

Only awards to this organisation, e.g. 'Lockheed Martin' or a 12-character UEI.

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

Department or sub-agency name or abbreviation, e.g. 'Department of Defense', 'NASA', 'Department of the Air Force'.

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

Awards with activity on or after this date (YYYY-MM-DD). Default: one year before 'To date'. Earliest: 2007-10-01.

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

Awards with activity up to this date (YYYY-MM-DD). Default: today.

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

Industry codes, 2 to 6 digits. A prefix matches all codes under it, e.g. '5415' for computer services.

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

Product and Service Codes, e.g. 'R425' or 'DA01'.

## `states` (type: `array`):

Two-letter US state or territory codes, e.g. 'TX', 'VA'.

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

Only awards worth at least this much.

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

Largest awards first, or newest awards first.

## `maxItems` (type: `integer`):

Maximum number of award records to return (up to 5,000). You pay per award returned.

## Actor input object example

```json
{
  "keywords": [
    "cybersecurity"
  ],
  "awardTypes": [
    "contracts"
  ],
  "sortBy": "amount",
  "maxItems": 50
}
```

# Actor output Schema

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

All award records returned by the run.

# 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": [
        "cybersecurity"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("wooden_scanner_c1n/us-federal-spending").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": ["cybersecurity"] }

# Run the Actor and wait for it to finish
run = client.actor("wooden_scanner_c1n/us-federal-spending").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": [
    "cybersecurity"
  ]
}' |
apify call wooden_scanner_c1n/us-federal-spending --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,wooden_scanner_c1n/us-federal-spending"
        }
    }
}
```

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/0WIdMB4EfhZacDtWp/builds/4C8hGOnEQfqKMCY6c/openapi.json
