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

Get US federal contracts, grants, loans and IDVs from USAspending.gov: recipient name and UEI, award amount, awarding agency, dates, NAICS/PSC codes and place of performance. Filter by keyword, agency, recipient, date, state. No API key.

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

## Pricing

from $2.13 / 1,000 awards

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

![USAspending Scraper | Federal Contracts & Grants](https://api.apify.com/v2/key-value-stores/Ll7RrWtDkZYOrBvfE/records/usaspending-gov-public-records-search-banner-04cd93d8.png)

This actor returns US federal awards from USAspending.gov, one row per award. Each row has the recipient name and UEI, the award amount and total outlays, the awarding and funding agency, start and end dates, NAICS/PSC codes and the place of performance. Search by keyword, agency, recipient, date, state, industry code or amount, without an API key.

### What does USAspending Scraper do?

It searches the official USAspending.gov award search and returns flat, ready-to-use rows for contracts, IDVs, grants, loans, direct payments and other assistance. You can combine many keywords, recipients and award categories in one run. It suits government-contracting business developers, grant writers, journalists, researchers and compliance analysts who need to know who received federal money for what.

### How to scrape USAspending.gov awards

![How USAspending Scraper works: Validates agencies, dates and codes before the first request; Queries the official USAspending.gov award search API; Runs one search per keyword, recipient and category;](https://api.apify.com/v2/key-value-stores/Ll7RrWtDkZYOrBvfE/records/usaspending-gov-public-records-search-how-6e879bd6.png)

1. Open the actor in Apify Console and go to the **Input** tab.
2. Enter keywords, or leave them empty and filter by agency, recipient, state, NAICS or dates.
3. Choose the award categories (default: contracts and grants).
4. Set **Max awards per search** and, if needed, **Max awards in total**.
5. Click **Start** and download the dataset as JSON, CSV or Excel.

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

Price per event by Apify plan:

| Event | Free | Bronze | Silver | Gold and above |
|---|---|---|---|---|
| Award | $2.50 per 1,000 | $2.25 per 1,000 | $2.00 per 1,000 | $1.75 per 1,000 |
| Actor start | $0.00005 | $0.00005 | $0.00005 | $0.00005 |

A test run with the API example input below returned 200 rows in 5 s.

You pay per award returned: $2.50 per 1,000 awards, plus a tiny start fee of $0.00005 per run (charged per GB of memory). Searches with no matches are free.

| Scenario | Awards | Cost on the Free plan |
|---|---|---|
| Quick look: default run, 100 awards for one keyword and category | 100 | about $0.25 |
| One vendor's contracts and IDVs, 2 searches of 100 | 200 | about $0.50 |
| Two keywords × contracts and grants, 250 each | 1,000 | about $2.50 |
| Market scan, 5,000 awards | 5,000 | about $12.50 |

### Input

![USAspending Scraper input example: Keywords, Award categories, State filter, Sort by, Max awards per search, Max awards in total](https://api.apify.com/v2/key-value-stores/Ll7RrWtDkZYOrBvfE/records/usaspending-gov-public-records-search-input-64767f04.png)

All fields are optional. An empty input returns the 100 largest contracts and the 100 largest grants since fiscal year 2008.

| Field | What it does |
|---|---|
| `queries` | Keywords, each one a separate search (at least 3 characters) |
| `awardCategories` | contracts, grants, idvs, loans, directPayments, other |
| `agencies` | Top-level awarding agencies by name or abbreviation (DOD, NASA, Department of Energy) |
| `recipients` | Recipient names or UEIs, each a separate search |
| `startDate`, `endDate` | Action date range, YYYY-MM-DD, from 2007-10-01 |
| `states` | Two-letter state or territory codes |
| `stateFilter` | `placeOfPerformance` (default) or `recipient`: what `states` matches. IDVs have no place of performance, so they are always matched by recipient address |
| `naicsCodes`, `pscCodes` | Industry and product/service codes (contracts and IDVs only) |
| `minAmount`, `maxAmount` | Award amount range in USD (loan value for loans) |
| `sortBy` | Largest amount first (default) or newest start date first |
| `maxItemsPerSearch`, `maxItems` | Caps per search (default 100) and per run (default 1000) |

```json
{
  "queries": ["cybersecurity"],
  "awardCategories": ["contracts"],
  "startDate": "2023-10-01",
  "endDate": "2024-09-30",
  "maxItemsPerSearch": 500
}
```

### What data can you extract from USAspending?

![USAspending Scraper output example: Award ID, Recipient, Amount (USD), Category, Type](https://api.apify.com/v2/key-value-stores/Ll7RrWtDkZYOrBvfE/records/usaspending-gov-public-records-search-output-9ce29b68.png)

| Field | Description |
|---|---|
| `awardId`, `id`, `url` | Award ID, internal ID and USAspending page |
| `query`, `recipientSearch`, `position` | Which search found the award and its rank |
| `awardCategory`, `awardType` | Category searched and award type |
| `description` | Award description |
| `recipientName`, `recipientUei`, `recipientUrl` | Recipient and profile link |
| `recipientCity`, `recipientState`, `recipientCountry` | Recipient location |
| `amount`, `totalOutlays`, `loanValue`, `subsidyCost` | Money (amount is empty for loans) |
| `awardingAgency`, `awardingSubAgency`, `fundingAgency`, `fundingSubAgency` | Agencies |
| `startDate`, `endDate`, `baseObligationDate`, `updatedAt` | Dates |
| `naicsCode`, `pscCode`, `cfdaNumber`, `cfdaTitle` (and descriptions) | Classification codes |
| `defCodes` | Disaster emergency fund codes |
| `popCity`, `popState`, `popCountryCode`, `popZip` | Place of performance |

Example row (shortened):

```json
{
  "awardId": "HQ085722F8003",
  "url": "https://www.usaspending.gov/award/CONT_AWD_HQ085722F8003_9700_HQ079617D0001_9700",
  "query": "cybersecurity",
  "position": 1,
  "awardCategory": "contracts",
  "awardType": "DELIVERY ORDER",
  "recipientName": "AMENTUM TECHNOLOGY, INC.",
  "recipientUei": "DTRJLHVLK8F4",
  "amount": 524055138.18,
  "totalOutlays": 169456787.25,
  "currency": "USD",
  "awardingAgency": "Department of Defense",
  "awardingSubAgency": "Missile Defense Agency",
  "startDate": "2022-09-05",
  "endDate": "2025-09-01",
  "naicsCode": "541712",
  "pscCode": "AC23",
  "popCity": "COLORADO SPRINGS",
  "popState": "CO",
  "scrapedAt": "2026-11-04T17:56:15.726Z"
}
```

### Use cases

- **GovCon market scans:** find the largest contracts for a topic, with NAICS/PSC codes and recipient UEI.
- **Vendor and competitor tracking (KYB):** list every contract and IDV of a company or UEI.
- **Agency spending analysis:** see what the Department of Energy or NASA awarded for a topic.
- **Grant prospecting:** find grants of an agency performed in a given state, or awards to recipients located there (`stateFilter: recipient`).
- **New-award feed:** sort by newest to follow fresh awards for a NAICS code and state.

### Limitations

- One row per award found by one search: the same award found by two keywords appears twice, once per keyword.
- IDVs carry no place of performance in USAspending, so `states` always matches their recipient address.
- Sub-awards, analytics and monitoring modes are not included.
- Agencies must be top-level (parent departments); sub-agencies such as Army are rejected. Put them in keywords instead.
- NAICS and PSC filters apply only to contracts and IDVs; other categories are skipped with a warning.
- Sorting by newest returns at most 50,000 awards per search; sorting by amount has no such cap.
- Search covers actions since 2007-10-01. Many fields can be empty, for example `recipientUei` for aggregated recipients and `amount` for loans (use `loanValue`).
- The source can be slow (some answers take minutes); the actor retries failed requests.

### Tips and troubleshooting

- Each keyword × recipient × category is a separate search, so many values multiply the searches. Use `maxItemsPerSearch` and `maxItems` to control size.
- For more than 100 awards raise `maxItemsPerSearch`; sort by amount to go past 50,000.
- A run with 0 rows is valid: check dates (future dates usually return nothing) and state codes. If a place-of-performance state filter returns nothing, try `stateFilter: recipient`.
- Keywords shorter than 3 characters, unknown agencies, reversed date ranges or min above max stop the run with a message before any request.
- No proxy is needed.

### API, MCP and integrations

Run the actor from your code with the same JSON input as in Console. Your API token is in [Console → Settings → API & Integrations](https://console.apify.com/settings/integrations).

**Python** (`pip install apify-client`):

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("genial_candlestand/usaspending-federal-awards-scraper").call(run_input={
    "queries": ["cybersecurity"],
    "awardCategories": ["contracts", "grants"],
    "maxItemsPerSearch": 100,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

**Node.js** (`npm install apify-client`):

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

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('genial_candlestand/usaspending-federal-awards-scraper').call({
    "queries": ["cybersecurity"],
    "awardCategories": ["contracts", "grants"],
    "maxItemsPerSearch": 100,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

**HTTP** — one request runs the actor and returns the results (runs up to 5 minutes; longer ones: [run asynchronously](https://docs.apify.com/api/v2/act-runs-post)):

```bash
curl -X POST "https://api.apify.com/v2/acts/genial_candlestand~usaspending-federal-awards-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"queries":["cybersecurity"],"awardCategories":["contracts","grants"],"maxItemsPerSearch":100}'
```

**AI agents (MCP).** Add the actor as a tool of the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp). Claude Code:

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

Claude Desktop, Cursor or VS Code: `{"mcpServers": {"apify": {"url": "https://mcp.apify.com?tools=genial_candlestand/usaspending-federal-awards-scraper"}}}`. Then ask, for example:

- "Find the 50 largest cybersecurity contracts awarded in fiscal year 2024"
- "List all contracts and IDVs of Lockheed Martin from USAspending"
- "Show USDA broadband grants performed in Texas"

**Integrations.** Run it on a schedule with [Apify Schedules](https://docs.apify.com/platform/schedules) and send the results to Google Sheets, Slack, Zapier, Make, n8n or your webhook — see [Apify integrations](https://docs.apify.com/platform/integrations).

### FAQ

**Is it legal to scrape USAspending.gov?**<br>
USAspending is the official, public US government spending site. The actor reads public award data only; you are responsible for how you use it and for complying with applicable laws.

**Do I need an API key?**<br>
No. The actor uses the open USAspending.gov API without login or key.

**How is it different from other USAspending actors?**<br>
It returns 40 fields per row including UEI, NAICS/PSC with titles, outlays and loan values, accepts agency names in any case or as abbreviations, and prices at $2.50 per 1,000 awards with no result cap on the free plan.

**Can I search by UEI?**<br>
Yes. Enter the 12-character UEI in Recipients, for example KDT2YLB34NT6.

### Also useful

- [SEC EDGAR Filings Search](https://apify.com/genial_candlestand/sec-edgar-filings-search) — add US company filings by keyword, company, form and date
- [Google News Scraper](https://apify.com/genial_candlestand/google-news-articles-search-scraper) — follow news coverage of the agencies and vendors you track

# Actor input Schema

## `queries` (type: `array`):

Words to look for in award descriptions, recipient names and award IDs, e.g. cybersecurity. Each keyword is a separate search and needs at least 3 characters. Leave empty to filter by the other fields only.

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

Which kinds of awards to search: contracts, grants, IDVs, loans, direct payments or other. Each category is searched separately and labelled in the awardCategory column.

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

Top-level agencies by name or abbreviation in any case, e.g. Department of Energy, NASA, DOD. Several agencies mean any of them. Sub-agencies such as Army are not accepted: use the parent department.

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

Vendor or grantee names, or 12-character UEIs, e.g. Lockheed Martin or KDT2YLB34NT6. Each recipient is a separate search, combined with each keyword.

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

Awards with an action (obligation or modification) on or after this date, YYYY-MM-DD. The earliest supported date is 2007-10-01; earlier dates are raised to it with a warning. Only the end date given: the start is 2007-10-01.

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

Awards with an action on or before this date, YYYY-MM-DD. Must not be before From date. Only the start date given: the end is today.

## `states` (type: `array`):

Two-letter US state or territory codes, e.g. VA, TX, DC, PR. Several codes mean any of them. By default they match the place of performance; set State filter to recipient to match the recipient address. IDVs are always matched by recipient address.

## `stateFilter` (type: `string`):

What States matches: where the work is performed (placeOfPerformance) or where the recipient is located (recipient). IDVs always use the recipient address. No effect without States.

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

Industry codes of 2 to 6 digits, e.g. "541512" or "54" (prefix). Contracts and IDVs only: other selected categories are skipped with a warning.

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

Product and Service Codes of 1 to 4 letters or digits, e.g. "R425" or "D3". Contracts and IDVs only: other selected categories are skipped with a warning.

## `minAmount` (type: `number`):

Only awards worth at least this many US dollars (award amount; loan value for loans).

## `maxAmount` (type: `number`):

Only awards worth at most this many US dollars (award amount; loan value for loans). Must not be below the minimum.

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

Largest awards first (amount; loan value for loans), or newest first by start date (issued date for loans). Newest returns at most 50,000 awards per search.

## `maxItemsPerSearch` (type: `integer`):

Stop each search (one keyword × recipient × category) after this many awards.

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

Stop the whole run after this many awards across all searches.

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

Not needed: USAspending is an open government API. Turn on only if your network is blocked.

## Actor input object example

```json
{
  "queries": [
    "cybersecurity"
  ],
  "awardCategories": [
    "contracts",
    "grants"
  ],
  "stateFilter": "placeOfPerformance",
  "sortBy": "amount",
  "maxItemsPerSearch": 100,
  "maxItems": 1000,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Dataset with all awards

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

Awards in the overview view

# 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 = {
    "queries": [
        "cybersecurity"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("genial_candlestand/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 = { "queries": ["cybersecurity"] }

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

```

## MCP server setup

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