# USAspending Scraper - Federal Awards, Contractors & Leads (`scrapesage/usaspending-scraper`) Actor

Scrape USAspending.gov: search federal awards (contracts, grants, loans), pull full award detail (recipient, executives, place of performance, NAICS/PSC), and build US-government contractor & vendor leads with addresses and business types. Monitoring mode. No API key, no browser.

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

## Pricing

from $1.10 / 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?

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

## USAspending Scraper — Federal Awards, Contractors & Leads (Amounts, Agencies & Contacts)

> **Disclaimer:** This Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by the U.S. Department of the Treasury or any government body. All trademarks mentioned are the property of their respective owners. "USAspending" is referenced only to describe the public data source this Actor collects from.

Extract **complete US federal spending data from [USAspending.gov](https://www.usaspending.gov)** — search every federal **award** (contracts, grants, loans, direct payments) by keyword, agency, NAICS/PSC, recipient or location, pull the **full award detail** (recipient address, named executives, place & period of performance, classifications, obligations), and turn every **government contractor** into a ready-to-use **B2B lead** with address, UEI, business types and total federal dollars.

No login, no API key, no browser — fast JSON extraction straight from the official US government open-data API.

### Why this USAspending scraper?

Most scrapers dump a thin award list. This actor is a complete **federal market-intelligence + lead-gen engine**: it searches both **awards** and **recipients**, ships the **richest record in the category**, and enriches every contractor into a contactable lead.

| Data | Typical scrapers | This actor |
|---|---|---|
| Award ID, type, amount, agency, dates | ✅ | ✅ |
| Filter by keyword, NAICS, PSC, agency, location, amount | partial | ✅ |
| Contracts **+ IDVs + grants + loans + direct payments** | partial | ✅ all groups |
| Recipient **UEI, DUNS, registered address** | ❌ | ✅ |
| Recipient **business types** (small business, woman/veteran-owned, 8(a), HUBZone) | ❌ | ✅ |
| **Named executives + compensation** per award | ❌ | ✅ |
| Place & period of performance, NAICS/PSC descriptions | ❌ | ✅ |
| Obligations, outlays, sub-award totals | ❌ | ✅ |
| Recipient leaderboard by total federal $ | ❌ | ✅ |
| Lead score (0–100) per contractor | ❌ | ✅ |
| Monitoring — only new awards / new contractors | ❌ | ✅ |

### Use cases

- **GovCon lead generation** — federal contractors are high-value B2B buyers (and partners/subs). Export them with registered address, UEI, business-type set and total federal dollars (`leadScore`), then prospect, teaming or compete.
- **Competitive & market intelligence** — see exactly who wins what: filter awards by agency, NAICS/PSC or keyword and track award amounts, incumbents and expiring contracts (`endDate`) to time your capture.
- **Subcontracting & teaming** — find prime recipients in your NAICS and location, including their parent company and named executives, to build teaming pipelines.
- **Diversity & set-aside sourcing** — filter recipients by business type (small, woman-owned, veteran-owned, 8(a), HUBZone) for supplier-diversity and set-aside strategies.
- **Grant & funding research** — search grants, loans and direct payments by program, recipient and geography for funding intelligence.

### How to use

1. [Sign up for Apify](https://console.apify.com/sign-up) — the free plan is enough to try this actor.
2. Open the **USAspending Scraper**, choose a mode (**awards** or **recipients**), set your filters, and click **Start**.
3. Watch results stream into the dataset table as each record is parsed.
4. **Export** as JSON, CSV, Excel, XML, or RSS — or pull results programmatically via the [Apify API](https://docs.apify.com/api/v2).

### Input

```json
{
    "mode": "awards",
    "keywords": ["cybersecurity"],
    "awardCategories": ["contracts"],
    "timePeriodStart": "2024-01-01",
    "awardingAgencies": ["Department of Defense"],
    "naicsCodes": ["541512"],
    "includeAwardDetails": true,
    "maxResults": 200
}
```

- **mode** — `awards` (search federal awards) or `recipients` (search contractors for lead-gen).
- **keywords** — free-text match on award descriptions, recipients and IDs (awards mode).
- **awardCategories** — `contracts`, `idvs`, `grants`, `direct_payments`, `loans`, `other` (each queried separately).
- **timePeriodStart / timePeriodEnd** — action-date range (YYYY-MM-DD).
- **awardingAgencies** — top-tier agency names, e.g. `Department of Defense`.
- **naicsCodes / pscCodes** — industry / product-service code filters (contracts & IDVs).
- **recipientSearchText / recipientLocationStates / placeOfPerformanceStates / awardAmountMin / awardAmountMax** — extra award filters.
- **includeAwardDetails** *(default false)* — enrich every award with its full detail record (recipient address, executives, classifications, obligations).
- **recipientKeywords** *(recipients mode)* — contractor names to search; leave empty to list top recipients by federal dollars.
- **includeRecipientDetails** *(default true)* — enrich every recipient with address, business types, parent company and totals.
- **maxResults** — cap of award or recipient records.

### Output

Award records (`type: "award"`) in awards mode, recipient/contractor lead records (`type: "recipient"`) in recipients mode.

A recipient lead record (`type: "recipient"`):

```json
{
    "type": "recipient",
    "name": "PALANTIR TECHNOLOGIES INC.",
    "uei": "FSY4LVSBGWB7",
    "duns": "362130952",
    "totalAwardAmount": 420296739.98,
    "totalTransactions": 141,
    "address": "19505 BISCAYNE BLVD STE 2350",
    "city": "AVENTURA",
    "state": "FL",
    "zip": "33180",
    "businessTypes": ["category_business", "other_than_small_business", "us_owned_business"],
    "alternateNames": ["PALANTIR USG  INC"],
    "leadScore": 61,
    "url": "https://www.usaspending.gov/recipient/1ea8a9a4-3726-3491-9040-66950bb67606-C/latest"
}
```

An award record (`type: "award"`) carries `awardId`, `awardCategory`, `recipientName`, `awardAmount`, `awardingAgency`/`awardingSubAgency`, `startDate`/`endDate`, `naicsCode`/`pscCode`, `placeOfPerformanceState` and `url` — and with `includeAwardDetails`, also recipient `recipientUei`/`recipientAddress`/`recipientBusinessCategories`, `executives` (name + compensation), `popCity`/`popState`, `naicsDescription`/`pscDescription`, `totalObligation`, `totalOutlay` and `subawardCount`.

Fields are `null` only when the government doesn't publish that value for a record — never because the scraper skipped them.

### Monitoring — get only new records

Turn on **monitorMode** to remember everything already returned and emit only **new** records each run:

- The actor stores seen award IDs and recipient IDs in a **named key-value store** (`monitorKey` keeps separate histories per saved search).
- On the next run, already-seen awards and contractors are skipped — you only get what's new (e.g. newly posted contracts in your NAICS, or new entrants to an agency).
- This is independent of, and works perfectly alongside, **[Apify Schedules](https://docs.apify.com/platform/schedules)**: the schedule triggers the run, monitoring mode dedupes the output.

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

This Actor uses Apify's **pay-per-event** pricing: you are charged only for the results it delivers, with no monthly rental and no start fee. The events it can charge are:

- **Award scraped** - One federal award: ID, type, recipient, amount, agency, dates, NAICS/PSC, place of performance – plus (with detail) recipient UEI/address & business categories, named executives & compensation, obligations and sub-award totals.
- **Recipient lead scraped** - One contractor lead: legal name, UEI/DUNS, registered address, parent, alternate names, business types (small/woman/veteran-owned, 8(a), HUBZone), total federal dollars and a 0–100 lead score.

The current price of each event is shown on the **Pricing** tab of this page. Set a maximum total charge on the run if you want a hard cap on spend, and use the input limits to control how much the Actor fetches.

### Automate & schedule

Run this actor on autopilot and pull results into your own stack:

- **[Apify API](https://docs.apify.com/api/v2)** — start runs, fetch datasets, and manage schedules over REST.
- **[apify-client for JavaScript](https://docs.apify.com/api/client/js/)** and **[apify-client for Python](https://docs.apify.com/api/client/python/)** — official SDKs.
- **[Schedules](https://docs.apify.com/platform/schedules)** — run it daily/weekly to track new awards in your NAICS, agency or keyword.
- **[Webhooks](https://docs.apify.com/platform/integrations/webhooks)** — trigger downstream actions (CRM import, Slack alert, capture workflow) the moment a run finishes.

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'MY_APIFY_TOKEN' });

const run = await client.actor('scrapesage/usaspending-scraper').call({
    mode: 'recipients',
    recipientKeywords: ['cloud', 'cybersecurity'],
    includeRecipientDetails: true,
    maxResults: 200,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Got ${items.length} federal contractor leads`);
```

### Integrate with any app

Connect the dataset to 5,000+ apps — no code required:

- **[Make](https://docs.apify.com/platform/integrations/make)** — multi-step automation scenarios.
- **[Zapier](https://docs.apify.com/platform/integrations/zapier)** — push new contractor leads straight into your CRM.
- **[Slack](https://docs.apify.com/platform/integrations/slack)** — get notified when a monitored search finds new awards.
- **[Google Drive / Sheets](https://docs.apify.com/platform/integrations/drive)** — auto-export every run to a spreadsheet.
- **[Airbyte](https://docs.apify.com/platform/integrations/airbyte)** — pipe results into your data warehouse.
- **[GitHub](https://docs.apify.com/platform/integrations/github)** — trigger runs from commits or releases.

### Use with AI assistants (MCP)

The output is clean, LLM-ready JSON. Call this actor from Claude, ChatGPT, or any agent framework through the **[Apify MCP server](https://docs.apify.com/platform/integrations/mcp)** — ask your assistant to "find the top cybersecurity contractors for the Department of Defense with their addresses and total federal dollars" and let it run this scraper for you.

### Agent-ready: autonomous payments (x402 & Skyfire)

This actor is **agent-ready** — AI agents can discover it, run it, and **pay for it autonomously**, with no Apify account and no human in the loop. It uses [pay-per-event](https://docs.apify.com/platform/actors/publishing/monetize/pay-per-event) pricing and [limited permissions](https://docs.apify.com/platform/actors/development/permissions), so it qualifies for Apify's agentic-payment standards:

- **[x402](https://docs.apify.com/platform/integrations/x402)** — an open, HTTP-native payment protocol. Agents pay per run in USDC on the Base network directly through the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp) — no account, no API key.
- **[Skyfire](https://docs.apify.com/platform/integrations/skyfire)** — agent-to-service payments for fully autonomous AI-agent workflows.

Building an AI agent, MCP tool, or autonomous data pipeline? This scraper is ready to plug in and pay as it goes.

### More scrapers from scrapesage

Build a complete **government, B2B & competitive-intelligence stack**:

- **[SAM.gov Scraper](https://apify.com/scrapesage/sam-gov-scraper)** — federal contract *opportunities* and contacts (the pre-award sibling to this awards data).
- **[Bark Listing Scraper](https://apify.com/scrapesage/bark-listing-scraper)** — service-provider leads from Bark.
- **[LinkedIn Jobs Scraper](https://apify.com/scrapesage/linkedin-jobs-scraper)** — job postings as hiring-intent signals.
- **[Multi-ATS Job Scraper](https://apify.com/scrapesage/multi-ats-job-scraper)** — jobs from Greenhouse, Lever, Ashby, Workday & more.
- **[Facebook Ad Library Scraper](https://apify.com/scrapesage/facebook-ad-library-scraper)** — competitor ad intelligence on Meta & Instagram.
- **[Google Ads Transparency Scraper](https://apify.com/scrapesage/google-ads-transparency-scraper)** — who's advertising what on Google.
- **[Telegram Scraper](https://apify.com/scrapesage/telegram-scraper)** — channels, messages, media & search.
- **[Eventbrite Scraper](https://apify.com/scrapesage/eventbrite-scraper)** — events plus organizer leads.

### Tips

- **Mix categories carefully**: each award category (contracts, grants, loans…) is queried separately and merged, so selecting several pulls from each — `maxResults` is the global cap.
- **Lead quality**: keep `includeRecipientDetails`/`includeAwardDetails` on to capture addresses, business types and executives — it's the difference between a name and a contactable, qualified lead.
- **Narrow big searches**: combine `naicsCodes`/`pscCodes`, `awardingAgencies` and a `timePeriodStart` to focus on your market; USAspending caps deep pagination, so filtering beats scrolling.
- **Recurring monitoring**: combine `monitorMode` + [Schedules](https://docs.apify.com/platform/schedules) to capture only newly posted awards or new contractors.
- **Rate limits**: USAspending throttles heavy use — keep `maxConcurrency` modest (the default is fine).

### FAQ

**How do I find contractors in a specific industry?** Use awards mode with `naicsCodes`/`pscCodes` (and optionally an agency or keyword), or recipients mode with `recipientKeywords`. Turn on detail to get addresses and business types.

**Does it need an API key or login?** No. USAspending.gov is official US-government open data — this actor reads its public JSON API with no key, no account and no browser.

**Where does the contact/address data come from?** Directly from USAspending's public award and recipient records (registered recipient address, UEI/DUNS, business types and, for awards, the named executives the government discloses). No private data is used.

**Can I export to Google Sheets, CSV, or Excel?** Yes — one click in the dataset view, or automatically on every run via the [Google Drive integration](https://docs.apify.com/platform/integrations/drive).

**How do I monitor new federal awards automatically?** Turn on `monitorMode`, create a [Schedule](https://docs.apify.com/platform/schedules), and optionally add a [webhook](https://docs.apify.com/platform/integrations/webhooks) — you'll get only the new records each run.

**A field is null — why?** Some awards and recipients don't publish every field (e.g. executives are only disclosed above certain thresholds). Fields are `null` only when the data doesn't exist, not because the scraper skipped them.

**Is scraping USAspending legal?** This actor collects publicly available US-government open data only. You are responsible for using the data in compliance with applicable laws and the site's terms.

### Disclaimer

**This Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by the U.S. Department of the Treasury or any government body. All trademarks mentioned are the property of their respective owners.**

"USAspending" is referenced only in a descriptive, nominative sense - to identify the public data source this Actor collects from. This Actor is not an official product or service of the U.S. Department of the Treasury and is not authorised or certified by it. It collects only publicly available records; you are responsible for ensuring your use of that data complies with applicable laws, regulations and the source's own terms of use or reuse conditions.

### Need help?

Open an issue on the actor's **Issues** tab, or visit the [Apify help center](https://help.apify.com/). Feature requests are welcome — this actor is actively maintained.

# Actor input Schema

## `mode` (type: `string`):

<code>awards</code> = search federal awards (contracts, grants, loans…). <code>recipients</code> = search government contractors/recipients for lead generation.

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

Free-text keywords to match award descriptions, recipients and identifiers, e.g. <code>cybersecurity</code>, <code>cloud migration</code>. Awards mode only.

## `awardCategories` (type: `array`):

Which award groups to search (each is queried separately): <code>contracts</code>, <code>idvs</code>, <code>grants</code>, <code>direct\_payments</code>, <code>loans</code>, <code>other</code>. Awards mode only.

## `timePeriodStart` (type: `string`):

Only awards with action on/after this date (YYYY-MM-DD). Defaults to FY2008 start.

## `timePeriodEnd` (type: `string`):

Only awards with action on/before this date (YYYY-MM-DD). Defaults to today.

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

Filter by top-tier awarding agency name exactly as USAspending lists it, e.g. <code>Department of Defense</code>, <code>Department of Health and Human Services</code>. Awards mode only.

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

Filter contracts/IDVs by NAICS industry code(s), e.g. <code>541512</code>. Awards mode only.

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

Filter contracts/IDVs by Product/Service Code(s), e.g. <code>D310</code>. Awards mode only.

## `recipientSearchText` (type: `array`):

Limit awards to recipients whose name matches, e.g. <code>lockheed</code>. Awards mode only.

## `recipientLocationStates` (type: `array`):

Two-letter US state codes for the recipient's location, e.g. <code>CA</code>, <code>VA</code>. Awards mode only.

## `placeOfPerformanceStates` (type: `array`):

Two-letter US state codes for where the work is performed, e.g. <code>TX</code>. Awards mode only.

## `awardAmountMin` (type: `integer`):

Only awards at or above this dollar amount. Awards mode only.

## `awardAmountMax` (type: `integer`):

Only awards at or below this dollar amount. Awards mode only.

## `sortAwardsBy` (type: `string`):

Field to sort awards by (descending).

## `includeAwardDetails` (type: `boolean`):

For every award, fetch the full detail record: recipient UEI/address & business categories, named executives & compensation, place & period of performance, NAICS/PSC descriptions, obligations and sub-award totals. One extra request per award.

## `recipientKeywords` (type: `array`):

Names to search government recipients/contractors by, e.g. <code>lockheed</code>, <code>palantir</code>. Leave empty to list the top recipients by federal dollars. Recipients mode only.

## `recipientAwardType` (type: `string`):

Which spending to rank recipients by. Recipients mode only.

## `includeRecipientDetails` (type: `boolean`):

For every recipient, fetch its full profile: registered address, UEI/DUNS, parent company, alternate names/subsidiaries, business types (small business, woman/veteran-owned, 8(a), HUBZone…) and total federal transactions. One extra request per recipient.

## `maxResults` (type: `integer`):

Maximum number of award or recipient records to return.

## `monitorMode` (type: `boolean`):

Remember awards/recipients already returned in previous runs (in a named key-value store) and emit only NEW ones each run. Works alongside Apify Schedules — schedule the run, this dedupes the output.

## `monitorKey` (type: `string`):

Name for the monitoring memory. Use a distinct key per saved search so their 'seen' histories stay separate.

## `maxConcurrency` (type: `integer`):

Parallel detail requests. USAspending rate-limits heavy use — keep this modest.

## `proxyConfiguration` (type: `object`):

Proxy settings. The default Apify Proxy is enough — USAspending.gov is open government data with no anti-bot.

## Actor input object example

```json
{
  "mode": "awards",
  "keywords": [
    "cybersecurity"
  ],
  "awardCategories": [
    "contracts"
  ],
  "sortAwardsBy": "Award Amount",
  "includeAwardDetails": false,
  "recipientAwardType": "all",
  "includeRecipientDetails": true,
  "maxResults": 100,
  "monitorMode": false,
  "monitorKey": "default",
  "maxConcurrency": 6,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

All scraped award and recipient records as JSON items in the default dataset.

# 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"
    ],
    "awardCategories": [
        "contracts"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapesage/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 = {
    "keywords": ["cybersecurity"],
    "awardCategories": ["contracts"],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("scrapesage/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 '{
  "keywords": [
    "cybersecurity"
  ],
  "awardCategories": [
    "contracts"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call scrapesage/usaspending-scraper --silent --output-dataset

```

## MCP server setup

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