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

Extract US federal contracts, IDVs, grants and loans from USAspending.gov. Filter by agency, NAICS, PSC, state, keyword and award size.

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

## Pricing

from $3.50 / 1,000 record scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#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

Extract **US federal contracts, grants, loans and IDVs** from [USAspending.gov](https://www.usaspending.gov) — the official open-data source for all federal spending. Filter by **agency, NAICS code, PSC code, state, keyword, recipient and award size**, then export clean, structured records to JSON, CSV or Excel.

### What does USAspending Federal Awards Scraper do?

This Actor pulls award-level federal spending records straight from the official USAspending API and turns them into a flat, analysis-ready dataset. Every record includes the **recipient name and UEI, award amount, awarding and funding agency, NAICS and PSC classification, period of performance, place of performance, and a direct link back to the source award page**.

Because it reads an official government API, there is **no scraping of protected pages, no proxies, no CAPTCHAs and no anti-bot fragility**. Runs are fast, cheap and reliable.

On the Apify platform you also get scheduled runs, a REST API, webhooks, and integrations with Google Sheets, Airtable, Slack, Make and Zapier — so you can turn this into a recurring federal-contract feed without writing any glue code.

### Why use this Actor?

- **Government contracting lead generation** — find every prime contractor winning work in your NAICS code and target them for subcontracting or teaming.
- **Competitive intelligence** — track exactly what your competitors are winning, from which agencies, and for how much.
- **Market sizing** — quantify total federal spend in a category, agency or state before you invest in a capture effort.
- **Recruiting and staffing** — identify companies that just won large awards and are about to hire.
- **Grant research** — surface federal grant and assistance awards by CFDA program and recipient.
- **Finance and research** — track federal revenue exposure for public companies and their suppliers.

Doing this by hand on the USAspending website means paging through results and exporting one slice at a time. This Actor gives you the whole filtered set in one run, on a schedule, through an API.

### How to use USAspending Federal Awards Scraper

1. Click **Try for free**.
2. Pick your **award categories** — Contracts and IDVs are the standard choice for contracting lead-gen.
3. Set a **start and end date** for the award action period.
4. Add filters that narrow the set: agency, NAICS, PSC, state, keywords or a minimum award amount.
5. Set **Maximum results** so you control exactly how much you pull.
6. Click **Start** and wait for the run to finish.
7. Download the results as **JSON, CSV, Excel, HTML or XML**, or pull them from the API.

### Input

All fields are optional except award categories. A typical lead-generation input looks like this:

```json
{
  "awardCategories": ["contracts", "idvs"],
  "startDate": "2026-01-01",
  "endDate": "2026-08-01",
  "awardingAgency": "Department of Defense",
  "naicsCodes": ["541512"],
  "placeOfPerformanceStates": ["VA", "MD"],
  "minAwardAmount": 500000,
  "sortBy": "award_amount",
  "sortOrder": "desc",
  "maxResults": 1000
}
```

| Field | Type | Description |
| --- | --- | --- |
| `awardCategories` | array | `contracts`, `idvs`, `grants`, `direct_payments`, `loans`, `other` |
| `startDate` / `endDate` | string | Award action period, `YYYY-MM-DD`. Defaults to the last 90 days |
| `keywords` | array | Free-text search across descriptions and recipient names |
| `awardingAgency` | string | Top-tier awarding agency, e.g. `Department of Defense` |
| `fundingAgency` | string | Top-tier funding agency |
| `recipientSearch` | array | Match recipients by name, e.g. `Leidos` |
| `naicsCodes` | array | Industry codes, e.g. `541512` |
| `pscCodes` | array | Product & Service Codes, e.g. `R425` |
| `placeOfPerformanceStates` | array | Two-letter state codes, e.g. `VA` |
| `minAwardAmount` / `maxAwardAmount` | integer | Award value bounds in USD |
| `sortBy` / `sortOrder` | string | Sort by award amount, last modified or start date |
| `maxResults` | integer | Hard cap on records returned |

### Output

Each dataset item is one federal award:

```json
{
  "awardId": "W9126G24C0004",
  "awardCategory": "contracts",
  "uniqueAwardKey": "CONT_AWD_W9126G24C0004_9700_-NONE-_-NONE-",
  "recipientName": "CLARK CONSTRUCTION GROUP LLC",
  "recipientUei": "KDT2YLB34NT6",
  "awardAmount": 620581383,
  "totalOutlays": 242708.65,
  "description": "DESIGN-BUILD CONSTRUCTION OF THE VETERANS AFFAIRS HEALTH CARE CENTER, EL PASO, TX",
  "awardingAgency": "Department of Defense",
  "awardingSubAgency": "Department of the Army",
  "naicsCode": "236220",
  "naicsDescription": "COMMERCIAL AND INSTITUTIONAL BUILDING CONSTRUCTION",
  "pscCode": "Y1DA",
  "pscDescription": "CONSTRUCTION OF HOSPITALS AND INFIRMARIES",
  "startDate": "2023-12-19",
  "endDate": "2028-02-29",
  "placeOfPerformanceState": "TX",
  "usaspendingUrl": "https://www.usaspending.gov/award/CONT_AWD_W9126G24C0004_9700_-NONE-_-NONE-"
}
```

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

#### Data fields

| Field | Description |
| --- | --- |
| `awardId` | Federal award identifier (PIID, FAIN or URI) |
| `uniqueAwardKey` | Stable unique key — use this to deduplicate across runs |
| `recipientName`, `recipientUei`, `recipientId` | Recipient identity |
| `awardAmount`, `totalOutlays`, `subsidyCost` | Award value and money actually disbursed |
| `description` | Free-text description of the work |
| `awardingAgency`, `awardingSubAgency` | Who issued the award (plus codes) |
| `fundingAgency`, `fundingSubAgency` | Who paid for it (plus codes) |
| `naicsCode`, `naicsDescription` | Industry classification |
| `pscCode`, `pscDescription` | Product & Service Code |
| `cfdaNumber`, `cfdaTitle` | Assistance-listing program, for grants and loans |
| `startDate`, `endDate`, `baseObligationDate`, `lastModifiedDate` | Key dates |
| `placeOfPerformanceState`, `placeOfPerformanceCountry` | Where the work happens |
| `defCodes` | Disaster/emergency funding codes |
| `usaspendingUrl` | Direct link to the award on USAspending.gov |

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

This Actor is priced **per award record returned**. You are charged only for records that actually land in your dataset, and the **Maximum results** field is a hard ceiling — so your cost per run is predictable and capped before you start.

Because this Actor uses an official JSON API rather than a headless browser, it needs no proxies and very little memory, which keeps the underlying platform cost low.

### Tips

- **Narrow filters run much faster.** Broad, unfiltered queries make USAspending do a lot of work server-side and a single page can take ~30 seconds. Adding an agency, NAICS code or minimum award amount speeds runs up dramatically.
- **Use `uniqueAwardKey` to deduplicate** when you run on a schedule — awards get modified over time and will reappear.
- **Filter by `lastModifiedDate`** (sort by *Last modified date*) to build an incremental feed that catches new and updated awards.
- **Contracts and IDVs are different things.** A contract is a specific award; an IDV is a vehicle that orders get placed against. Include both for a complete picture of an agency's buying.
- **Award amount vs outlays.** `awardAmount` is what was obligated; `totalOutlays` is what has actually been paid out so far.

### FAQ

**Is scraping USAspending data legal?**
Yes. USAspending.gov is an official US government open-data source published under the DATA Act, and this Actor uses its public, documented API. The data is public domain. That said, this is general information rather than legal advice — if you plan to redistribute the data commercially, check your own obligations.

**How fresh is the data?**
USAspending typically publishes contract actions within a few days of the action date. Grant and assistance data can lag longer. This Actor always reads live data at run time.

**Why did I get fewer results than my maximum?**
Your filters matched fewer awards than the cap. That's normal — the cap is a ceiling, not a target.

**Can I get subaward data?**
Not in this version. This Actor returns prime awards. If you need subawards, open an issue and let me know.

**Can I get more fields?**
The Actor returns the full standard field set for each award category. If you need something specific from the USAspending API that isn't here, open an issue.

### Support

Found a bug or need a field that isn't here? Open an issue on the **Issues** tab and I'll take a look. Custom federal-data pipelines and bespoke scraping work are also available on request.

# Actor input Schema

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

Which kinds of federal awards to pull. Contracts and IDVs are the standard choice for government-contracting lead generation.

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

Beginning of the award action period (YYYY-MM-DD). Defaults to 90 days ago.

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

End of the award action period (YYYY-MM-DD). Defaults to today.

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

Free-text search across award descriptions and recipient names, e.g. "cybersecurity", "logistics support".

## `awardingAgency` (type: `string`):

Top-tier agency that issued the award, spelled exactly as USAspending does, e.g. "Department of Defense", "Department of Veterans Affairs".

## `fundingAgency` (type: `string`):

Top-tier agency that funded the award. Often the same as the awarding agency.

## `recipientSearch` (type: `array`):

Filter to recipients whose name matches these terms, e.g. "Booz", "Leidos".

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

Industry codes to include, e.g. 541512 (computer systems design), 236220 (commercial construction).

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

Product & Service Codes to include, e.g. R425 (engineering support), D302 (IT systems development).

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

Two-letter US state codes where the work is performed, e.g. VA, TX, CA.

## `minAwardAmount` (type: `integer`):

Skip awards below this dollar value. Useful for filtering out micro-purchases.

## `maxAwardAmount` (type: `integer`):

Skip awards above this dollar value.

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

Which field to order results by.

## `sortOrder` (type: `string`):

Direction to apply to the sort field.

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

Hard cap on how many award records to return. You are charged per record returned.

## Actor input object example

```json
{
  "awardCategories": [
    "contracts"
  ],
  "keywords": [
    "cybersecurity"
  ],
  "sortBy": "award_amount",
  "sortOrder": "desc",
  "maxResults": 1000
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `runSummary` (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"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("bercikgroup/usaspending-federal-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("bercikgroup/usaspending-federal-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 bercikgroup/usaspending-federal-awards-scraper --silent --output-dataset

```

## MCP server setup

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