# US Federal Contract Awards Scraper – USAspending.gov API (`zhucl1006/us-federal-contract-awards-usaspending`) Actor

Search US federal contract awards from the official USAspending.gov API by keyword, NAICS, PSC, agency, recipient, state, date and value. Clean records with recipient UEI and award links, plus recipient/agency spend rankings. No API key. $1.50 per 1,000 awards.

- **URL**: https://apify.com/zhucl1006/us-federal-contract-awards-usaspending.md
- **Developed by:** [leo zhu](https://apify.com/zhucl1006) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 award records

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/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

## US Federal Contract Awards (USAspending.gov) & Contractor Spend Rankings

**$1.50 per 1,000 award records · official USAspending.gov API · no login or API key · CSV, Excel, JSON or API.**

Search **US federal government contract awards** from the official **USAspending.gov** API (U.S. Treasury) and get clean award records with **recipient UEI, NAICS, PSC, agency, place of performance and a direct USAspending link** - or a ready-made **spend ranking** of top contractors, agencies, sub-agencies, NAICS, PSC codes or states.

For GovCon bid & capture teams, B2B sales, subcontractor prospecting, market researchers and journalists.

**Keywords:** federal contracts, government contract awards, USAspending API, FPDS contract data, federal contractors list, DoD contracts, NAICS / PSC award search, GovCon lead generation, IDIQ / GWAC, federal grants.

### Use cases

- **Lead generation**: companies that just won federal contracts in your NAICS (new awards in the last 14 days by default) - prime targets for subcontracting, staffing, software and financing offers.
- **Competitor intelligence**: every award won by a competitor (`recipients: ["Booz Allen"]`).
- **Market research**: who buys what - rank agencies or contractors by awarded value for any NAICS/PSC.
- **Monitoring**: schedule daily/weekly runs to get new awards matching your filters.

### What you get

| Field | Example |
|---|---|
| `awardId`, `awardType` | 36C10B26F0287, DELIVERY ORDER |
| `recipientName`, `recipientUei`, `recipientProfileUrl` | THUNDERCAT TECHNOLOGY, LLC, UER4AJLUB8D5 |
| `awardAmount`, `totalOutlays` | 359034041.28 (USD) |
| `awardingAgency`, `awardingSubAgency`, `fundingAgency` | Department of Veterans Affairs |
| `description` | INTERSYSTEMS SOFTWARE UPDATES AND TECHNICAL ASSISTANCE |
| `naicsCode`, `naicsDescription`, `pscCode`, `pscDescription` | 541519, DA01 |
| `placeOfPerformanceState`, `...Zip`, `...Country` | VA, 20190, USA |
| `baseObligationDate`, `startDate`, `endDate`, `lastModifiedDate` | 2025-10-01 |
| `usaspendingUrl` | https://www.usaspending.gov/award/CONT_AWD\_... |

**Spend ranking rows** (`outputMode` = `summary`/`both`): total awarded, award count, average/median/max, share of total, distinct agencies/recipients, first/last start date and top 5 counterparties.

### How to use

1. Set a date range (default: last 14 days) and keep **Date applies to = New awards only** for fresh wins.
2. Add filters: keywords, NAICS, PSC, agency (partial names like "DOD", "Veterans Affairs" are resolved automatically), recipient, state, min/max amount.
3. Pick award type (contracts by default; IDVs, grants and loans also supported), set `maxItems`, run, export.

Example input:

```json
{"keywords": ["cybersecurity"], "naicsCodes": ["5415"], "minAmount": 100000, "maxItems": 200}
```

### Pricing

Pay per event: **$0.005 per run start**, **$0.0015 per award record** and **$0.01 per ranking row**. 1,000 awards ≈ $1.50. Set "Maximum cost per run" to cap spend - the actor stops cleanly at your limit.

### Notes

- Data: USAspending.gov, public domain U.S. government data. Award data mostly comes from FPDS; recent awards can appear with a short delay.
- Award amount is the award's total obligated value as reported by USAspending.
- **Department of Defense contract awards are published with a 90-day delay** (DoD policy), so recent DoD awards appear only for older date ranges. Other agencies usually appear within days.
- Only business/award data - no personal contact data is collected. The search API covers FY2008 (2007-10-01) onwards; one run returns up to 10,000 awards.
- Not affiliated with the U.S. government.

# Actor input Schema

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

Start of the date range (YYYY-MM-DD). Default: 14 days ago. Earliest 2007-10-01. Wide ranges with no filters return many awards - keep maxItems sensible.

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

End of the date range (YYYY-MM-DD, inclusive). Default: today.

## `dateType` (type: `string`):

'New awards only' finds contracts first awarded in the range - best for fresh leads.

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

Words or phrases searched in award descriptions, recipient names and IDs (USAspending keyword search).

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

NAICS codes or prefixes, e.g. 541512 (computer systems design), 5415, 236220.

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

Product/Service Codes, e.g. D318, R425, DA01.

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

Partial agency names or abbreviations, e.g. 'Department of Defense', 'DOD', 'Veterans Affairs', 'NASA', or a sub-agency like 'Army Corps of Engineers'.

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

Recipient (contractor) names or UEIs, e.g. 'Booz Allen', 'TJNDFEALGTB5'.

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

Two-letter US state codes, e.g. VA, TX, CA.

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

Only awards with at least this total value.

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

Only awards up to this total value.

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

USAspending award category.

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

Order of results (also decides which awards are kept when maxItems cuts the list).

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

Maximum award records to output (0 = no limit, capped at 10,000 per run). You pay per record.

## `outputMode` (type: `string`):

Award records and/or a ranking of top recipients/agencies/NAICS/PSC/states (ranking uses up to 10,000 matching awards).

## `summaryBy` (type: `string`):

Grouping for the spend ranking.

## `summaryTopN` (type: `integer`):

Top N ranking rows (0 = all).

## Actor input object example

```json
{
  "dateType": "new_awards_only",
  "keywords": [
    "software"
  ],
  "awardType": "contracts",
  "sortBy": "amountDesc",
  "maxItems": 200,
  "outputMode": "records",
  "summaryBy": "recipient",
  "summaryTopN": 50
}
```

# Actor output Schema

## `results` (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": [
        "software"
    ],
    "maxItems": 200
};

// Run the Actor and wait for it to finish
const run = await client.actor("zhucl1006/us-federal-contract-awards-usaspending").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": ["software"],
    "maxItems": 200,
}

# Run the Actor and wait for it to finish
run = client.actor("zhucl1006/us-federal-contract-awards-usaspending").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": [
    "software"
  ],
  "maxItems": 200
}' |
apify call zhucl1006/us-federal-contract-awards-usaspending --silent --output-dataset

```

## MCP server setup

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

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/jmHIpKg6wc7Hi9U5d/builds/zSeeB5g7joAKeVdkQ/openapi.json
