# USAspending Federal Contract Awards Scraper (`talcoe/usaspending-awards`) Actor

Pulls federal contract awards from the USAspending.gov API filtered by NAICS code, agency, state and keyword, with clean fields for lead generation, priced per result returned.

- **URL**: https://apify.com/talcoe/usaspending-awards.md
- **Developed by:** [M Usama](https://apify.com/talcoe) (community)
- **Categories:** Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 results

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

### What does USAspending Federal Contract Awards Scraper do?

It pulls federal contract award records straight from USAspending.gov, the official public database of US government spending, and returns clean fields for each award: recipient name, award amount, awarding agency, NAICS code, description, recipient location and dates. Government contractors, subcontractors and market researchers use it to find who is winning contracts, in which industries, and from which agencies. Filters keep each run small and focused, and pricing is per result returned.

### Data source

The public JSON API behind USAspending.gov's Advanced Search (`POST /api/v2/search/spending_by_award/` at `api.usaspending.gov`), refreshed daily by USAspending from federal award systems.

### Why use it?

- Lead generation: find companies already winning contracts in your NAICS code, state or agency to identify teaming partners or competitors.
- Market research: see which agencies are spending on a given industry and how large the awards run.
- Competitive intelligence: track a competitor's federal contract wins over time.
- Replaces manually paging through USAspending's website or paying for a subscription data feed.

### How to use it

1. Open the Actor and set the filters: NAICS code, recipient state, awarding agency, keywords, and a start date.
2. Click Start. Download results as JSON, CSV or Excel, or read them through the API.
3. Add a Schedule and an Integration (Slack, Google Sheets, webhook) to get new awards automatically.

### Input

| Field | Description |
|---|---|
| `keywords` | Keyword search across award descriptions, for example cybersecurity. Leave blank to match all. |
| `naicsCode` | Filter by NAICS code, for example 541511 for custom computer programming services. Leave blank for all industries. |
| `state` | Two letter US state code for the award recipient, for example TX. Leave blank for all states. |
| `awardingAgency` | Top tier awarding agency name, for example Department of Defense. Leave blank for all agencies. |
| `startDate` | Only include awards with an action date on or after this date. The end of the window is always today. |
| `maxResults` | Hard stop for the run. You are billed per result, so this caps the cost. |
| `proxyConfiguration` | Apify proxy is recommended for larger runs. |

Example input:

```json
{
    "naicsCode": "541511",
    "state": "",
    "awardingAgency": "",
    "keywords": "",
    "startDate": "2025-01-01",
    "maxResults": 60
}
```

### Output

Every record has the same shape:

```json
{
    "id": "CONT_AWD_75FCMC20F0080_7530_GS35F393CA_4732",
    "recipientName": "GENERAL DYNAMICS INFORMATION TECHNOLOGY, INC.",
    "awardAmount": 902031452,
    "awardingAgency": "Department of Health and Human Services",
    "awardingSubAgency": "Centers for Medicare and Medicaid Services",
    "naicsCode": "541511",
    "naicsDescription": "CUSTOM COMPUTER PROGRAMMING SERVICES",
    "description": "CLOUD PRODUCTS&TOOLS (CPT)",
    "recipientState": "VA",
    "recipientCity": "FALLS CHURCH",
    "startDate": "2020-09-01",
    "endDate": "2025-06-30",
    "awardId": "75FCMC20F0080",
    "contractAwardType": "DELIVERY ORDER",
    "fundingAgency": "Department of Health and Human Services",
    "recipientUei": "SMNWM6HN79X5",
    "placeOfPerformanceState": "VA",
    "url": "https://www.usaspending.gov/award/CONT_AWD_75FCMC20F0080_7530_GS35F393CA_4732",
    "scrapedAt": "2026-09-27T08:32:11.859Z"
}
```

| Field | Meaning |
|---|---|
| `id` | Stable key (USAspending's generated award ID), safe for deduplication between runs |
| `recipientName` | Company or organization that received the award |
| `awardAmount` | Total obligated contract value in US dollars |
| `awardingAgency` | Top tier federal agency that awarded the contract |
| `awardingSubAgency` | Sub agency or component within the awarding agency |
| `naicsCode` / `naicsDescription` | Industry classification code and its description |
| `description` | Free text description of the work covered by the award |
| `recipientState` / `recipientCity` | Location of the awarded company |
| `startDate` / `endDate` | Period of performance for the contract |
| `awardId` | Contract identifier (PIID) as published by the awarding agency |
| `contractAwardType` | Contract type, for example Delivery Order or Definitive Contract |
| `fundingAgency` | Agency whose funds pay for the award, when different from the awarding agency |
| `recipientUei` | Recipient's Unique Entity Identifier (replaces DUNS) |
| `placeOfPerformanceState` | State where the contracted work is performed |
| `url` | Link to the award's page on USAspending.gov |
| `scrapedAt` | When this Actor pulled the record |

### Pricing

Pay per event: a small fee when a run starts, then a fixed price per result returned. You only pay for records that pass your filters. Set `maxResults` to cap any run.

### Limitations

- Contract awards only (types A, B, C, D). Grants, loans and other assistance awards are not included, since NAICS filtering does not apply to them.
- Data reflects what USAspending has processed from federal award systems, which can lag a few days behind an agency's own announcement.
- NAICS, state and agency filters narrow results with AND logic, so combining several very specific filters can return zero rows.

### FAQ

**Is this legal?** The Actor reads USAspending.gov's public JSON API, the same one that powers its website, and stores only federal award information the government publishes for public accountability. You are responsible for how you use the data.

**Something is missing or broken?** Open an issue in the Issues tab; response time is usually under a day.

# Actor input Schema

## `keywords` (type: `string`):

Keyword search across award descriptions, for example cybersecurity. Leave blank to match all.

## `naicsCode` (type: `string`):

Filter by NAICS code, for example 541511 for custom computer programming services. Leave blank for all industries.

## `state` (type: `string`):

Two letter US state code for the award recipient, for example TX. Leave blank for all states.

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

Top tier awarding agency name, for example Department of Defense. Leave blank for all agencies.

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

Only include awards with an action date on or after this date. The end of the window is always today.

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

Hard stop for the run. You are billed per result, so this caps the cost.

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

Apify proxy is recommended for larger runs.

## Actor input object example

```json
{
  "keywords": "",
  "naicsCode": "541511",
  "state": "",
  "awardingAgency": "",
  "startDate": "2025-01-01",
  "maxResults": 60,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `results` (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": "",
    "naicsCode": "541511",
    "state": "",
    "awardingAgency": "",
    "startDate": "2025-01-01",
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("talcoe/usaspending-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": "",
    "naicsCode": "541511",
    "state": "",
    "awardingAgency": "",
    "startDate": "2025-01-01",
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("talcoe/usaspending-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": "",
  "naicsCode": "541511",
  "state": "",
  "awardingAgency": "",
  "startDate": "2025-01-01",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call talcoe/usaspending-awards --silent --output-dataset

```

## MCP server setup

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