# USAspending Scraper — US Government Contracts & Grants (`jeffev/usaspending-federal-awards`) Actor

Search US federal contracts, grants, loans and payments on USAspending.gov (official public data): who won (name, UEI, address), amount, agency, NAICS and PSC codes, place of performance, dates and description. Filter by keywords, agency, recipient, state, NAICS, PSC, amount and dates.

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

## Pricing

from $0.56 / 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 — US Government Contracts & Grants

Search **US federal contracts, contract vehicles (IDVs), grants, loans and direct payments** from **USAspending.gov**, the official public source of federal spending data. For each award: **who won it** (recipient name, UEI, address, city, state), **amount** and outlays, awarding and funding agency and sub-agency, contract or assistance type, **NAICS and PSC codes**, assistance listings, place of performance, start and end dates, description and a link to the award page.

Filter by **keywords, agencies, recipient, states, NAICS, PSC, amount range and dates**, sorted by amount or date.

Built for **government sales (GovCon) and competitor research**, **B2B lead generation** (companies winning federal money), grant research, journalism and spending analysis.

### Why this one

- **Recipients with UEI and address**, ready for prospecting and enrichment.
- **All award types** with the right fields for each (contracts or financial assistance).
- **Official public API**: reliable, no blocking.

### Input

Cybersecurity contracts in Texas this year above $100k:

```json
{
  "keywords": ["cybersecurity"],
  "awardType": "contracts",
  "states": ["TX"],
  "dateFrom": "2026-01-01",
  "minAmount": 100000,
  "maxAwards": 1000
}
```

Biggest wildfire grants:

```json
{
  "keywords": ["wildfire"],
  "awardType": "grants",
  "sortBy": "amount"
}
```

### Output

| Field | Description |
|---|---|
| `awardId`, `awardType`, `contractType`, `description`, `url` | award |
| `recipientName`, `recipientUei`, `recipientAddress`, `recipientCity`, `recipientState`, `recipientZip`, `recipientCountry` | recipient |
| `amount`, `totalOutlays`, `startDate`, `endDate`, `lastModified` | money and dates |
| `awardingAgency`, `awardingSubAgency`, `fundingAgency` | agencies |
| `naicsCode`, `naicsDescription`, `pscCode`, `pscDescription`, `assistanceListings` | classification |
| `placeOfPerformanceCity`, `placeOfPerformanceState`, `placeOfPerformanceCountry` | where |

### Example output

One real item from a test run (long texts and lists shortened):

```json
{
  "type": "award",
  "awardType": "contracts",
  "awardId": "FA862118F6251",
  "recipientName": "LOCKHEED MARTIN CORPORATION",
  "recipientUei": "KDT2YLB34NT6",
  "recipientAddress": "100 GLOBAL INNOVATION CIR",
  "recipientCity": "ORLANDO",
  "recipientState": "FL",
  "recipientZip": "32825",
  "recipientCountry": "USA",
  "amount": 666315748.84,
  "totalOutlays": 242708.65,
  "startDate": "2018-02-08",
  "endDate": "2027-01-31",
  "description": "IGF::OT::IGF  AFSOC ACTS AWARD OF CONTRACT FOR CLS, ENGINEERING, INSTRUCTION, CYBERSECURITY, DMO",
  "awardingAgency": "Department of Defense",
  "awardingSubAgency": "Department of the Air Force",
  "fundingAgency": "Department of Defense",
  "contractType": "DELIVERY ORDER",
  "naicsCode": "336413",
  "naicsDescription": "OTHER AIRCRAFT PARTS AND AUXILIARY EQUIPMENT MANUFACTURING",
  "pscCode": "J069",
  "pscDescription": "MAINT/REPAIR/REBUILD OF EQUIPMENT- TRAINING AIDS AND DEVICES",
  "assistanceListings": [],
  "placeOfPerformanceCity": "ORLANDO"
}
```

### Notes

- Searches cover awards from October 2007 onward (a USAspending limit).

### Feedback

Found a problem or need a field? Open an issue in the **Issues** tab: every issue is read and answered. If the actor helped you, a review on the Store helps a lot.

### How much does it cost?

You pay only for results delivered, at a fixed price per item. **Apify platform usage is included** in that price, so there are no compute costs on top. Errors and items that couldn't be found are free.

| What you get | Price | Example |
|---|---|---|
| Award | $0.0008 each | 1,000 awards = $0.80 |

The Apify **Free plan includes $5 of monthly credit**, enough for about **6,250 awards** per month at no cost. You can also set a maximum spend per run.

On paid Apify plans it gets cheaper automatically: **10% off on Starter, 20% on Scale and 30% on Business**.

# Actor input Schema

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

Words in the award description or recipient (at least 3 characters each).

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

Kind of federal award.

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

YYYY-MM-DD (default: one year ago; the earliest allowed is 2007-10-01).

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

YYYY-MM-DD (default: today).

## `maxAwards` (type: `integer`):

Maximum awards to return.

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

Order of results.

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

Top-tier agency names, e.g. 'Department of Defense', 'Department of Health and Human Services', 'National Aeronautics and Space Administration'.

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

Company or organization that received the award.

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

US state codes, e.g. TX, CA, VA.

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

Industry codes, e.g. 541512 (computer systems design).

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

Product and service codes, e.g. DA01, R425.

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

Only awards of at least this amount.

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

Only awards up to this amount.

## Actor input object example

```json
{
  "keywords": [
    "cybersecurity"
  ],
  "awardType": "contracts",
  "dateFrom": "2026-01-01",
  "maxAwards": 100,
  "sortBy": "amount"
}
```

# Actor output Schema

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

US federal awards.

# 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"
    ],
    "dateFrom": "2026-01-01",
    "maxAwards": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("jeffev/usaspending-federal-awards").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"],
    "dateFrom": "2026-01-01",
    "maxAwards": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("jeffev/usaspending-federal-awards").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"
  ],
  "dateFrom": "2026-01-01",
  "maxAwards": 100
}' |
apify call jeffev/usaspending-federal-awards --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,jeffev/usaspending-federal-awards"
        }
    }
}
```

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/0nTuedQiJv6njXf8e/builds/BAuSirS5FKraaR9qb/openapi.json
