# USAspending Awards Scraper (`parseforge/usaspending-scraper`) Actor

Scrapes federal award and sub-award records from USAspending.gov. Returns each award as a flat row with dollar amount, recipient, agency, location, and classification codes.

- **URL**: https://apify.com/parseforge/usaspending-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Automation, Developer tools, Other
- **Stats:** 25 total users, 2 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $8.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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

[![ParseForge](https://raw.githubusercontent.com/ParseForge/apify-assets/main/banner.jpg)](https://apify.com/parseforge?fpr=vmoqkp)

### USAspending Awards Scraper

**Scrape federal award data from USAspending.gov by keyword, recipient, agency, or location, up to one million records per run.** Every award comes with its dollar amount, recipient details, awarding agency, NAICS and PSC codes, and place of performance. Export to CSV, JSON, Excel, or XML.

USAspending.gov is the official open data source for U.S. federal spending, but its Advanced Search interface limits you to manual downloads and on-screen browsing. This Actor reads the public award and sub-award feeds directly, applying every filter the website offers so you get exactly the records you need in one flat dataset. No API key, no browser automation, and no manual exports.

| Who uses it | What they scrape USAspending.gov for |
|---|---|
| Government contractors | Find which agencies are buying what you sell and who your competitors are. |
| Market researchers | Track spending trends by agency, NAICS code, or recipient location over time. |
| Nonprofits and grant writers | Identify grant programs and past recipients to target your proposals. |
| Journalists and watchdog groups | Investigate federal spending patterns and flag unusual award activity. |

### What it does

This Actor collects federal award and sub-award records from USAspending.gov and returns each one as a flat row with its dollar value, recipient, agency, location, and classification codes.

- 🔍 **Keyword search:** match award descriptions exactly as you would in the USAspending Advanced Search box.
- 🏢 **Recipient filter:** search by company name, UEI, or DUNS to pull every award for a specific vendor.
- 📅 **Date range:** set a start and end date to limit results to a specific fiscal quarter or year.
- 💰 **Award amount range:** collect only awards above or below a dollar threshold you define.
- 🌍 **Location filters:** restrict by recipient country or place of performance country from the full USAspending country list.
- 🏛️ **Agency filters:** narrow results to one or more awarding or funding agencies by name.
- 📊 **Classification codes:** filter by NAICS and PSC codes to isolate specific industries or products.
- 🏷️ **Recipient type:** select from the full set of business categories, including small business, minority-owned, veteran-owned, and nonprofit designations.
- 📋 **Award type and spending level:** choose contracts, grants, loans, IDVs, direct payments, or other financial assistance, and switch between prime awards and sub-awards.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

### What you can do with USAspending.gov data

**📈 Build a federal sales pipeline.**

A business development team searches for active IDV contracts by NAICS code and agency to find vehicles they can bid on.

**🔎 Research competitors' federal revenue.**

A market analyst enters a competitor's UEI and pulls every award that company has won in the last three fiscal years.

**🌍 Map spending by geography.**

A policy researcher filters grants by place of performance country to see how foreign aid is distributed across regions.

**📊 Monitor agency spending trends.**

A watchdog group runs a weekly scrape of all Department of Defense contracts above $1 million to track changes in procurement patterns.

### Why choose this scraper

|  | What you get |
|---|---|
| **Award amount** | The obligated and outlayed dollar values for each award. |
| **Recipient** | Company name, UEI, DUNS, and recipient type flags. |
| **Agency** | Awarding agency, funding agency, and their sub-agency offices. |
| **Location** | Recipient address and place of performance down to the country level. |
| **Classification** | NAICS and PSC codes with descriptions for industry and product analysis. |

### How it compares

This Actor focuses exclusively on USAspending.gov award and sub-award data with the full set of Advanced Search filters. Here is how it compares to other Apify actors that also pull from USAspending.

| Feature | ParseForge | SAM.gov + USAspending Scraper - Federal Contract Leads | Federal Recompete Award Finder | SAM.gov Scraper - Federal Contracts & RFP Monitor (No API Key) |
|---|---|---|---|---|
| Exclusive USAspending focus | Yes | Not listed | Yes | Not listed |
| Sub-award data | Yes | Not listed | Not listed | Not listed |
| Full recipient type filter | Yes | Not listed | Not listed | Not listed |
| Place of performance country filter | Yes | Not listed | Not listed | Not listed |
| Award amount range filter | Yes | Not listed | Not listed | Not listed |
| PSC code filter | Yes | Not listed | Yes | Not listed |

### Configure the run

Drive the Actor from keywords, recipient names, award IDs, agencies, locations, NAICS codes, PSC codes, recipient types, award types, and date or dollar ranges, alone or together, and filters run as each award is read so only matches reach your dataset. The Input tab lists every parameter.

A first run with the defaults:

```json
{
  "awardType": "contracts",
  "spendingLevel": "awards",
  "maxItems": 10
}
```

A larger pull:

```json
{
  "awardType": "contracts",
  "spendingLevel": "awards",
  "maxItems": 200
}
```

### Pricing

Pay-per-result: **$0.16 per result** collected. You pay only for the results written to your dataset.

| Results collected | Approximate cost |
|---|---|
| 100 results | $16.00 |
| 1,000 results | $160.00 |
| 10,000 results | $1600.00 |

New Apify accounts start with $5 in free credit.

### Free users

Free-plan runs return up to 10 results as a preview. [Upgrade your Apify plan](https://console.apify.com/sign-up?fpr=vmoqkp) to collect up to 1,000,000 results per run.

### Run it

1. [Create a free Apify account with $5 in credit](https://console.apify.com/sign-up?fpr=vmoqkp).
2. Open the [USAspending Awards Scraper](https://apify.com/parseforge/usaspending-scraper?fpr=vmoqkp).
3. Set your inputs and any filters, then click **Start**.
4. Export the results as CSV, Excel, JSON, or XML from the **Dataset** tab.

Run it programmatically through the [Apify API](https://docs.apify.com/api/v2) (`run-sync-get-dataset-items`) or the [ApifyClient](https://docs.apify.com/api/client/js) for JavaScript and Python.

### Use with AI agents (MCP)

Give an AI agent live access to USAspending.gov through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

```bash
claude mcp add --transport http apify "https://mcp.apify.com/?tools=parseforge/usaspending-scraper"
```

Then prompt it in plain language to run the scraper and read back the results.

### Troubleshooting

**Why am I getting no results?**

Check that your filters are not too restrictive. Try removing one filter at a time, starting with the date range or award amount range. Also verify that your keyword or recipient name matches the exact phrasing used on USAspending.gov.

**Why are my NAICS or PSC code filters not working?**

Make sure you are entering the numeric code only, without descriptions. For example, use '336411' rather than 'Aircraft Manufacturing'. The Actor passes codes directly to the USAspending API.

**The run stopped before collecting all awards I expected.**

Check the Maximum awards setting. If it is set lower than the total available matches, the Actor will stop when it reaches that number. Increase the limit and re-run.

**Why do some awards show a zero dollar amount?**

Some award records on USAspending.gov have a zero or null obligated amount, especially IDVs that are umbrella contracts with task orders awarded separately. This is expected behavior from the source data.

**Can I filter by U.S. state instead of country?**

The current input schema supports country-level filtering for recipient location and place of performance. For state-level filtering, you can export the full dataset and filter locally, or use the keyword field to search for state names in the location text.

### FAQ

| Question | Answer |
|---|---|
| Do I need a USAspending.gov API key or login? | No. This Actor reads the public search results directly. You do not need to register an account or obtain an API key. |
| How many awards can I collect in one run? | You can set the maximum up to 1,000,000 awards per run. The Actor will paginate through results until it hits your limit or exhausts the matches. |
| Can I filter by a specific company name? | Yes. Use the Recipient field to enter a company name, UEI, or DUNS number exactly as it appears on USAspending.gov. |
| What is the difference between Awards and Sub-Awards? | Awards are prime contracts, grants, loans, and other direct obligations from the federal government. Sub-awards are funds that flow from a prime recipient to a sub-recipient. Choose the spending level in the input settings. |
| Can I search by NAICS or PSC code? | Yes. Enter one or more NAICS codes or PSC codes in the dedicated fields, and the Actor will return only awards with those classifications. |
| Does this Actor handle the USAspending Advanced Search date format? | Yes. Enter dates as YYYY-MM-DD in the Start Date and End Date fields, and the Actor translates them into the correct query parameters. |
| Can I filter by recipient type, like small business or veteran-owned? | Yes. The Recipient Type field includes every category from the USAspending website, including 8(a), HUBZone, women-owned, veteran-owned, and many more. |
| What export formats are supported? | You can export your dataset in CSV, JSON, Excel, or XML from the Apify platform. |
| Can I schedule this Actor to run automatically? | Yes. Use Apify's scheduler to run the Actor daily, weekly, or on any custom cron schedule to keep your federal spending data current. |
| Does this Actor include attachment URLs or solicitation documents? | This Actor returns the award metadata as shown on USAspending.gov search results. It does not download attached documents or solicitation files. |

### Related actors

Browse the full [ParseForge collection](https://apify.com/parseforge?fpr=vmoqkp) for more scrapers.

🆘 **Need help?** Email parseforge@protonmail.com with your run ID, your input, and what you expected.

⚠️ **Disclaimer.** This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by U.S. Department of the Treasury. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

# Actor input Schema

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

Matches the first Advanced Search filter. Use phrases exactly as you would in the UI (e.g., "shipbuilding", "cyber security").

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

Exactly the same box you use in Advanced Search → Recipient. Enter names, UEIs, or DUNS values—each entry should match what you would type in the UI.

## `awardId` (type: `array`):

Equivalent to the Award ID filter. Add PIIDs, FAINs, or URIs (e.g., "N0002417C2100").

## `startDate` (type: `string`):

Advanced Search → Time Period → Date Range. Enter YYYY-MM-DD (leave empty to include all data).

## `endDate` (type: `string`):

Advanced Search → Time Period → Date Range. Enter YYYY-MM-DD (leave empty to include all data).

## `awardAmountMin` (type: `number`):

Minimum award amount in dollars. Leave empty for no minimum.

## `awardAmountMax` (type: `number`):

Maximum award amount in dollars. Leave empty for no maximum.

## `locations` (type: `array`):

Matches the Recipient Location accordion. Enter country names.

## `placeOfPerformanceLocations` (type: `array`):

Same as the Place of Performance filter. Enter country names.

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

Matches the Awarding Agency tab. Enter agency names (e.g., "Department of Energy").

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

Matches the Funding Agency tab. Enter agency names (e.g., "Department of Transportation").

## `recipientType` (type: `array`):

Same as the Recipient Type multi-select. Pick one or more of the available categories.

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

Mirrors the Award Type accordion, which groups the checkboxes for Contracts, Grants, Loans, IDVs, Direct Payments, and Other Financial Assistance.

## `spendingLevel` (type: `string`):

Same toggle as the site (Awards vs Sub-Awards).

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

Use the same codes you would select in the NAICS accordion (e.g., "336411" for Aircraft Manufacturing).

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

Product and Service Codes (PSC). Use the same codes you would select in the PSC accordion (e.g., "1520" for Aircraft, Rotary Wing).

## `sort` (type: `string`):

Matches the Sort By drop-down in Advanced Search.

## `order` (type: `string`):

Asc/Desc order, just like the UI toggle.

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

How many awards to collect per run.

## Actor input object example

```json
{
  "awardType": "contracts",
  "spendingLevel": "awards",
  "sort": "Award Amount",
  "order": "desc",
  "maxItems": 10
}
```

# Actor output Schema

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

Complete dataset with all scraped award data including financial information, recipient details, agency information, locations, classification codes, transaction history, and recipient statistics

## `overview` (type: `string`):

Overview view of awards with key fields displayed in a table format

# 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 = {
    "awardType": "contracts",
    "spendingLevel": "awards",
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/usaspending-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 = {
    "awardType": "contracts",
    "spendingLevel": "awards",
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/usaspending-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 '{
  "awardType": "contracts",
  "spendingLevel": "awards",
  "maxItems": 10
}' |
apify call parseforge/usaspending-scraper --silent --output-dataset

```

## MCP server setup

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