# USAspending Federal Awards Scraper (`dabooti/usaspending-awards-scraper`) Actor

Export US federal contracts, IDVs, grants and loans from USAspending.gov: award ID, recipient and UEI, amount, outlays, agency, NAICS, PSC, dates and place of performance. Filter by keyword, agency, state, NAICS and amount.

- **URL**: https://apify.com/dabooti/usaspending-awards-scraper.md
- **Developed by:** [Danial Maqbool](https://apify.com/dabooti) (community)
- **Categories:** Lead generation, Business, Automation
- **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 awards

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 Scraper

Export US federal spending awards from USAspending.gov to JSON, CSV or Excel: contracts, contract vehicles (IDVs), grants, loans and other financial assistance. Search by keyword and filter by awarding agency, recipient, state of performance, NAICS code, award amount and date range. Each record has the award ID, recipient and UEI, amount and outlays, agency and sub-agency, award type, NAICS and PSC codes, assistance listing, dates, place of performance and a link to the award page.

It uses the official USAspending API run by the US Treasury. No login, API key or proxy needed.

### What you can use it for

- **Government sales and capture**: see who wins contracts in your NAICS codes, from which agencies, and for how much.
- **Competitor research**: list every federal award a competitor or partner received.
- **Grant research**: find which organizations receive grants for a program or topic in your state.
- **Lead generation**: build lists of federal contractors by industry and region.
- **Journalism and policy analysis**: follow spending on a topic across agencies and years.

### What data you get

| Field | Description |
|---|---|
| `awardId`, `category`, `awardType` | Award ID (PIID or FAIN), category and type, for example DELIVERY ORDER or PROJECT GRANT (B) |
| `recipientName`, `recipientUei` | Recipient organization and its Unique Entity ID |
| `amount`, `totalOutlays`, `subsidyCost` | Award amount (loan value for loans), outlays so far, and loan subsidy cost |
| `description` | Award description |
| `startDate`, `endDate`, `baseObligationDate` | Period of performance (issued date and last date to order where relevant) |
| `awardingAgency`, `awardingSubAgency` | Agency and sub-agency |
| `naicsCode`, `naicsDescription`, `pscCode`, `pscDescription` | Industry and product/service codes (contracts and IDVs) |
| `assistanceListing` | CFDA / Assistance Listing number and program (grants, loans) |
| `placeOfPerformanceState`, `placeOfPerformanceCountry` | Where the work is done |
| `lastModified`, `awardUrl`, `internalId` | Last change, link to the award on usaspending.gov and its internal ID |
| `keyword`, `scrapedAt` | Matching keyword and scrape time |

### How to use it

1. Enter **Keywords** (each one is a separate search), or leave them empty to list everything that matches your filters.
2. Pick the **Award category**: contracts, IDVs, grants, loans or other assistance.
3. Set the **Action date** range (default: the last 12 months) and any filters: agencies, recipients, states, NAICS codes, amount range.
4. Choose the **Sort** order and **Max results per keyword**, then click **Start**.

#### Example input

```json
{
  "keywords": ["cybersecurity", "zero trust"],
  "awardCategory": "contracts",
  "dateFrom": "2025-10-01",
  "awardingAgencies": ["Department of Defense"],
  "stateCodes": ["VA", "MD"],
  "naicsCodes": ["541512"],
  "minAmount": 1000000,
  "sortBy": "amount",
  "maxResultsPerSearch": 1000
}
```

#### Example output

One record from a real run:

```json
{
  "awardId": "FA862118F6251",
  "category": "contracts",
  "awardType": "DELIVERY ORDER",
  "recipientName": "LOCKHEED MARTIN CORPORATION",
  "recipientUei": "KDT2YLB34NT6",
  "amount": 666315748.84,
  "totalOutlays": 242708.65,
  "subsidyCost": null,
  "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",
  "awardingAgency": "Department of Defense",
  "awardingSubAgency": "Department of the Air Force",
  "naicsCode": "336413",
  "naicsDescription": "OTHER AIRCRAFT PARTS AND AUXILIARY EQUIPMENT MANUFACTURING",
  "pscCode": "J069",
  "pscDescription": "MAINT/REPAIR/REBUILD OF EQUIPMENT- TRAINING AIDS AND DEVICES",
  "assistanceListing": null,
  "placeOfPerformanceState": "FL",
  "placeOfPerformanceCountry": "USA",
  "lastModified": "2026-06-15 07:29:54",
  "awardUrl": "https://www.usaspending.gov/award/CONT_AWD_FA862118F6251_9700_FA862115D6276_9700",
  "internalId": "CONT_AWD_FA862118F6251_9700_FA862115D6276_9700",
  "keyword": "cybersecurity",
  "scrapedAt": "2026-11-16T15:27:07.910Z"
}
```

### Pricing

Pay per event: **$2.00 per 1,000 awards** saved, plus a tiny standard start fee and Apify platform usage (usually a fraction of a cent per run). An award found by several keywords is saved and charged once. Set **Max cost per run** to cap spending.

### Tips and limits

- The USAspending search covers actions from **2007-10-01** onwards.
- The date range filters on award action dates, so a long-running contract shows up if it had any action in the range.
- Agency names must match USAspending's top-level names exactly, for example "Department of Health and Human Services".
- NAICS and PSC codes exist for contracts and IDVs only.
- Up to 10,000 results per keyword. Narrow by agency, state or date for bigger exports.
- Direct payments (which can go to individuals) are not offered. USAspending itself redacts personal recipients of financial assistance.
- A `RUN_SUMMARY` record shows the filters used and saved awards per keyword.

### FAQ

**Is this official data?** Yes. It comes straight from the public USAspending.gov API, which publishes federal spending data reported under the DATA Act.

**Can I get subawards?** Not in this version; it returns prime awards.

**How current is it?** USAspending updates contract data daily (from FPDS) and assistance data at least monthly.

### Legal note

USAspending.gov data is public US government information. Use it in line with your own legitimate purpose and applicable laws.

# Actor input Schema

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

Words to find in award descriptions, recipients and codes, for example cybersecurity or broadband. Each keyword is a separate search. Leave empty to list all awards that match the filters.

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

Which kind of federal award to search.

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

YYYY-MM-DD. Default: 12 months ago. Searches go back to 2007-10-01 at most.

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

YYYY-MM-DD. Default: today.

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

Optional. Exact top-level agency names, for example Department of Defense or Department of Health and Human Services.

## `recipientNames` (type: `array`):

Optional. Company or organization names (or UEIs) to match.

## `stateCodes` (type: `array`):

Optional. Two-letter US state codes, for example VA or TX.

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

Optional, contracts and IDVs only. 2 to 6 digit NAICS codes, for example 541512.

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

Optional.

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

Optional.

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

Largest awards, newest start date or most recently modified first.

## `maxResultsPerSearch` (type: `integer`):

Up to 10,000 per keyword (or per run when no keywords are given).

## Actor input object example

```json
{
  "keywords": [
    "cybersecurity"
  ],
  "awardCategory": "contracts",
  "sortBy": "amount",
  "maxResultsPerSearch": 50
}
```

# Actor output Schema

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

No description

## `resultsFull` (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 = {
    "keywords": [
        "cybersecurity"
    ],
    "maxResultsPerSearch": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("dabooti/usaspending-awards-scraper").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"],
    "maxResultsPerSearch": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("dabooti/usaspending-awards-scraper").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"
  ],
  "maxResultsPerSearch": 50
}' |
apify call dabooti/usaspending-awards-scraper --silent --output-dataset

```

## MCP server setup

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

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/KjJkzDoLu1r3ldDUP/builds/KkpxlV2a9FsiVizpo/openapi.json
