# USAspending Federal Awards Scraper (`parselab/usaspending-federal-scraper`) Actor

Search USAspending.gov federal contracts, grants, loans and direct payments by keyword, agency, recipient, NAICS code, state and dollar amount. Each award includes the recipient, agency, amount, dates, NAICS and PSC descriptions and a direct link to the award page. Export to CSV or Excel.

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

## Pricing

from $15.00 / 1,000 results

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 Awards Scraper

This USAspending scraper searches federal contracts, grants, loans and direct payments and returns one row per award. Filter by keyword, awarding agency, recipient, NAICS code, state and dollar amount. Each award comes with the recipient and its ID, the agency and sub-agency, the amount, start and end dates, the NAICS and PSC codes with their plain-text descriptions, and a link to the award page.

Government contractors, grant writers, sales teams, journalists and analysts use it to see who is winning federal money, how much and for what.

### What can you do with this federal awards scraper?

- Find federal contracts by keyword
- See all awards won by a specific company
- List the largest contracts from an agency such as the Department of Defense
- Find federal grants in a state above a dollar amount
- Search awards by NAICS code
- Find loans and direct payments from federal programs
- Track who holds contracts that are about to end
- Build a prospect list of companies that win federal work
- Export USAspending data to CSV or Excel

### What data can you extract from USAspending?

| Field | What it holds |
|---|---|
| `awardId`, `awardUrl` | Award ID and link to the official page |
| `recipientName`, `recipientId` | Who received the award |
| `awardingAgency`, `awardingSubAgency` | Which agency paid |
| `awardAmount` | Dollar amount |
| `awardType`, `awardCategory` | Type of award, for example delivery order or project grant |
| `naicsCode`, `naicsDescription` | Industry code and name (contracts) |
| `pscCode`, `pscDescription` | Product or service code and name (contracts) |
| `description` | What the award is for |
| `startDate`, `endDate` | Period of the award |
| `placeOfPerformanceState` | State where the work happens |

### Award categories

Contracts, IDVs (indefinite delivery vehicles), grants, loans, direct payments and other financial assistance. Pick one or more per run.

### How to scrape federal awards

1. Choose the **Award Types** you want. Contracts are selected by default.
2. Add a keyword, recipient name, agency, NAICS codes, state or amount range.
3. Set the award date range. If you leave it empty, the last three years are searched.
4. Click **Start** and export the dataset as CSV, Excel or from the Apify console.

Results are sorted from the largest award to the smallest, so a small **Max Items** already gives you the biggest deals.

### Input example

```json
{
  "keywords": "cybersecurity",
  "awardTypes": ["contracts"],
  "agencies": ["Department of Defense"],
  "minAmount": 1000000,
  "maxItems": 100
}
```

### Output example

```json
{
  "awardId": "FA862118F6251",
  "recipientName": "LOCKHEED MARTIN CORPORATION",
  "recipientId": "ea75ddee-2d00-ac7f-5e72-6f42d7c88c8c-C",
  "awardingAgency": "Department of Defense",
  "awardingSubAgency": "Department of the Air Force",
  "awardAmount": 666315748.84,
  "awardType": "DELIVERY ORDER",
  "naicsCode": "336413",
  "naicsDescription": "OTHER AIRCRAFT PARTS AND AUXILIARY EQUIPMENT MANUFACTURING",
  "pscCode": "J069",
  "pscDescription": "MAINT/REPAIR/REBUILD OF EQUIPMENT- TRAINING AIDS AND DEVICES",
  "startDate": "2018-02-08",
  "endDate": "2027-01-31",
  "placeOfPerformanceState": "FL",
  "awardUrl": "https://www.usaspending.gov/award/CONT_AWD_FA862118F6251_9700_FA862115D6276_9700"
}
```

### How much does it cost to scrape USAspending?

You pay per result: $20 per 1,000 awards plus a tiny start fee. The free plan returns up to 10 awards per run.

### Good to know

- NAICS codes apply to contracts and IDVs only. Grants and loans use different program codes, so the NAICS and PSC fields are empty for them.
- The agency filter needs the agency's exact name as shown on USAspending, for example "Department of Health and Human Services".
- The award amount is the total USAspending reports for the whole award, which can cover many years.

### Who uses federal spending data?

- **Business development teams** find who holds the contracts they want to win.
- **Grant consultants** research which programs fund similar projects.
- **Sales teams** build lists of companies that receive federal money.
- **Journalists and watchdogs** follow the money by agency and state.

### FAQ

**Do I need a USAspending account?**
No. The Actor works without any login.

**How is this different from a contract opportunities list?**
Opportunities are bids that are still open. USAspending shows awards that have already been made.

**How far back can I search?**
Awards from October 2007 onward.

**Can I find every award to one company?**
Yes. Put the company name in **Recipient Name**.

### Search ideas

- The largest cybersecurity contracts from the Department of Defense
- Every grant above $500,000 awarded in your state
- All awards to one company over the last three years
- Contracts in a NAICS code that are close to their end date, which are recompete opportunities

### Automate and connect

Schedule the Actor from the Apify console to refresh the data daily or weekly. Send finished datasets to Google Sheets, Zapier, Make or n8n, or trigger a webhook when a run ends, so your reports and alerts update without manual work.

### Legal note

This Actor collects information that is publicly visible on the website. Check the source site's terms and your local rules before using the data.

### Support

Missing a field or found a bug? Open an issue from the Actor page.

# Actor input Schema

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

Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000.

## `keywords` (type: `string`):

Free-text search across award descriptions and recipient names.

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

Categories of award to include.

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

Search by recipient company or organization name. Partial match.

## `agencies` (type: `array`):

Federal agency names, e.g. 'Department of Defense'. Must match USAspending's naming.

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

Industry codes, e.g. '541512'. Applies to contracts and IDVs only.

## `state` (type: `string`):

Two-letter state code, e.g. 'CA'.

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

Only include awards at or above this dollar amount.

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

Only include awards at or below this dollar amount.

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

YYYY-MM-DD. Defaults to the last 3 years if left empty.

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

YYYY-MM-DD.

## Actor input object example

```json
{
  "maxItems": 10,
  "awardTypes": [
    "contracts"
  ],
  "agencies": [],
  "naicsCodes": []
}
```

# Actor output Schema

## `overview` (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 = {
    "maxItems": 10,
    "agencies": [],
    "naicsCodes": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("parselab/usaspending-federal-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 = {
    "maxItems": 10,
    "agencies": [],
    "naicsCodes": [],
}

# Run the Actor and wait for it to finish
run = client.actor("parselab/usaspending-federal-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 '{
  "maxItems": 10,
  "agencies": [],
  "naicsCodes": []
}' |
apify call parselab/usaspending-federal-scraper --silent --output-dataset

```

## MCP server setup

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