# USAspending Federal Contracts & Grants Scraper (`tidyharvest/usaspending-awards-scraper`) Actor

Find who wins federal contracts, grants and loans: recipient company, UEI, address, award amount, agency, dates, NAICS/PSC codes and place of performance from the official USAspending.gov API. No key or proxy. $1.50 per 1,000 awards.

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

## Pricing

from $0.90 / 1,000 award scrapeds

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 Contracts & Grants Scraper

Find out **who wins federal contracts, grants and loans** in your market. Search **USAspending.gov**, the official U.S. government spending database, by keyword, agency, company, **NAICS / PSC code**, state and award size, and get clean rows with the **recipient company, UEI, address, award amount, agency, dates, place of performance and industry codes**. **$1.50 per 1,000 awards**, no API key, no login, no proxy.

It reads the official USAspending API (U.S. Department of the Treasury), so it is fast and returns the same records you see on usaspending.gov.

### What you can do with it

- **GovCon lead generation:** list every company that won cybersecurity, construction or janitorial contracts in your state, with addresses and award sizes, then sell to them or team with them.
- **Competitor and partner intelligence:** see which agencies a competitor sells to, how much, and under which NAICS codes.
- **Grant prospecting:** find which universities, nonprofits and cities received grants from NIH, NSF, DOE or HUD and for which programs.
- **Market sizing:** total up federal spending on a product or service category (PSC) or industry (NAICS) by agency and state.
- **Sales triggers:** run it weekly with "New awards only" to catch fresh wins (a new contract usually means new hiring and purchasing).

### How to use it

1. Enter one or more **keywords** (or leave empty) and pick the **award types** (contracts, grants, loans, IDVs...).
2. Optionally narrow by **agency**, **recipient**, **NAICS/PSC codes**, **state**, **amount** and **date range**.
3. Click **Start** and download the results as JSON, CSV or Excel, or connect them to Sheets, a CRM or Zapier.

### Input

| Field | What it does |
|---|---|
| `keywords` | Match any of these words (3+ characters each). Empty = all. |
| `awardIds` | Look up specific awards by PIID, FAIN or URI, any date, any award type (ids not found are listed in the run's `SUMMARY`). |
| `awardTypes` | `contracts`, `idvs`, `grants`, `loans`, `directPayments`, `other`. Default: contracts. |
| `dateFrom` / `dateTo` | Activity window. Default: the last 365 days. |
| `newAwardsOnly` | Only awards first made inside the window. |
| `agency` | Awarding department or sub-agency name or abbreviation (`DOD`, `NASA`, `NIH`, `Navy`); several separated by commas. |
| `fundingAgencies` | Agencies paying for the award, when another agency awards it. |
| `recipients` | Company names or UEIs (any of them): track several competitors or prospects in one run. |
| `naics`, `psc` | Industry and product/service codes. |
| `state` | Place-of-performance state codes (`CA`, `TX`). |
| `recipientTypes` | Small business, woman-owned (WOSB), minority-owned, 8(a), HUBZone, veteran-owned, SDVOSB, nonprofit, higher education, government. |
| `minAmount` / `maxAmount` | Award value range in USD. |
| `excludeKeywords` | Drop awards mentioning these words (before billing). |
| `sortBy` | `amount` (largest first) or `date` (newest first). |
| `includeDetails` | Adds parent company, business categories, potential value, set-aside, competition, number of offers, officers. One extra request per award. |
| `maxItems` | Cap on awards per run (default 50, up to 5,000). Also caps your cost. |

Example:

```json
{ "keywords": ["cybersecurity"], "awardTypes": ["contracts"], "state": ["VA"], "newAwardsOnly": true, "sortBy": "date", "maxItems": 200 }
```

### Output

One item per award:

```json
{
  "awardId": "95C67826P0387",
  "awardCategory": "contract",
  "awardType": "PURCHASE ORDER",
  "recipientName": "WIDEPOINT CYBERSECURITY SOLUTIONS CORP",
  "recipientUei": "YC7GNUHMTLX6",
  "recipientAddress": "11250 WAPLES MILL RD STE 210",
  "recipientCity": "FAIRFAX", "recipientState": "VA", "recipientZip": "22030",
  "amount": 205485.0,
  "totalOutlays": null,
  "description": "PIV-I ISSUANCE AND MAINTENANCE SERVICES ...",
  "awardingAgency": "District of Columbia Courts",
  "awardingSubAgency": "District of Columbia Courts",
  "fundingAgency": "District of Columbia Courts",
  "awardDate": "2026-09-30", "startDate": "2026-09-30", "endDate": "2028-09-29",
  "placeOfPerformance": {"city": "WASHINGTON", "state": "DC", "zip": "20001", "county": "DISTRICT OF COLUMBIA", "country": "UNITED STATES", "congressionalDistrict": "98"},
  "naicsCode": "541519", "naicsDescription": "OTHER COMPUTER RELATED SERVICES",
  "pscCode": "DJ10", "pscDescription": "IT AND TELECOM - SECURITY AND COMPLIANCE AS A SERVICE",
  "cfdaNumber": null, "cfdaTitle": null,
  "url": "https://www.usaspending.gov/award/CONT_AWD_95C67826P0387_9534_-NONE-_-NONE-",
  "source": "USAspending.gov (U.S. Department of the Treasury)"
}
```

With `includeDetails` on, each row also has `parentRecipientName`, `parentRecipientUei`, `businessCategories` (e.g. "Small Business", "Woman Owned Business"), `totalObligation`, `potentialValue`, `potentialEndDate`, `subawardCount`, `solicitationId`, `setAside`, `extentCompeted`, `numberOfOffers`, `contractPricing` and `officers`.

For loans, `amount` is the loan face value and `subsidyCost` is filled. For grants and other assistance, `cfdaNumber` / `cfdaTitle` name the Assistance Listing program.

### Pricing

Pay per result: **$1.50 per 1,000 awards** (`award-scraped`). Filters and `maxItems` apply before you are charged, and detail lookups cost nothing extra. A search that finds nothing ends with a message saying so and costs nothing.

### Limits and notes

- Data covers awards from fiscal year 2008 (2007-10-01) onward; that is the API's search limit.
- "Activity in the date range" includes older awards that were modified in that window. Turn on **New awards only** to see only fresh awards.
- Amounts are what agencies reported to USAspending; recent awards can lag by a few days to weeks, and agencies sometimes correct records later.
- Each award type is searched separately; `maxItems` is shared evenly between the types you pick (unused share rolls over to the next type).
- Recipient addresses are business addresses from federal records. No personal emails or phone numbers are included.

Data source: USAspending.gov, the official source of U.S. federal spending data, operated by the U.S. Department of the Treasury, Bureau of the Fiscal Service. Each row links back to its award page. This actor is not affiliated with or endorsed by USAspending.gov, the U.S. Department of the Treasury or any U.S. government agency.

# Actor input Schema

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

Search award descriptions, recipients and codes for any of these words (e.g. `cybersecurity`, `drone`, `janitorial`). At least 3 characters each. Empty = all awards matching the other filters.

## `awardIds` (type: `array`):

Look up specific awards by PIID, FAIN or URI (e.g. `N0002417C2100`), at any date unless you set 'From date'. Combine with other filters or use alone.

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

Which kinds of federal awards to return. Each type is searched separately and Max awards is shared evenly between them.

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

Awards with activity on or after this date (YYYY-MM-DD). Empty = 365 days ago. Earliest supported: 2007-10-01.

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

Awards with activity up to this date (YYYY-MM-DD). Empty = today.

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

Only awards first made inside the date range (skip older awards that were just modified). Best for finding who won recently.

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

Department name or abbreviation (`Department of Defense`, `DOD`, `NASA`, `HHS`) or a sub-agency as USAspending names it (`Department of the Navy`, `National Institutes of Health`). Several: separate with commas (`NASA, DOE`).

## `fundingAgencies` (type: `array`):

Agencies paying for the award, when it differs from the one awarding it (e.g. a GSA contract funded by `Department of Veterans Affairs`). Same names as above.

## `recipients` (type: `array`):

Only awards to recipients whose name or UEI contains any of these (e.g. `Booz Allen`, `Palantir`, a 12-character UEI). Track several competitors or prospects in one run.

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

One recipient name or UEI; kept for older inputs. Use 'Recipients' above for several.

## `naics` (type: `array`):

Industry codes, 2 to 6 digits (e.g. `541512` computer systems design, `5415` for the whole group). Mostly applies to contracts.

## `psc` (type: `array`):

Product and Service Codes (e.g. `D399`, `R425`). Contracts only.

## `state` (type: `array`):

Two-letter state codes where the work is done (e.g. `CA`, `TX`, `DC`).

## `recipientTypes` (type: `array`):

Only awards to recipients of these types (as the recipient registered them). Several = any of them.

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

Only awards worth at least this much. Empty = no minimum.

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

Only awards worth at most this much. Empty = no maximum.

## `excludeKeywords` (type: `array`):

Drop awards whose description or recipient name contains any of these. Applied before billing.

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

Largest awards first, or most recent award date first.

## `includeDetails` (type: `boolean`):

Adds parent company, business categories (small business, woman-owned...), potential total value, set-aside, competition and number of offers, solicitation id and top officers. One extra request per award, so slower.

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

Maximum awards for the whole run (also caps your cost). Up to 5,000.

## Actor input object example

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

# Actor output Schema

## `awards` (type: `string`):

Federal awards from USAspending.gov, one item per award.

# 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("tidyharvest/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"] }

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

```

## MCP server setup

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