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

Scrape USAspending: who won US federal contracts and grants, enriched with each winner's address, UEI and small-business or socioeconomic status. Filter by keyword, NAICS, agency, state, amount and award date, for government sales and competitor tracking.

- **URL**: https://apify.com/dataio/usaspending-federal-awards.md
- **Developed by:** [Tom Awake](https://apify.com/dataio) (community)
- **Categories:** Lead generation, MCP servers
- **Stats:** 2 total users, 1 monthly users, 50.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 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

### What does USAspending Scraper do?

Export US federal contract and grant awards from USAspending.gov — **with
the winner's address, UEI and socioeconomic status attached**.

**No login. No API key. No proxies.**

### The field that makes this different

Award lists are easy to find. What they don't tell you is *what kind of
company won*.

Federal primes carry subcontracting obligations toward small businesses —
8(a), HUBZone, woman-owned, service-disabled-veteran-owned. Finding a
company that has **already won work in your NAICS code** *and* **qualifies
as a small business** is the whole teaming problem, and it is not something
a raw award feed answers.

This Actor looks up every distinct winner and attaches:

| Field | Example |
|---|---|
| `recipientUei` | ZE6ZM6NKSV43 |
| `recipientAddress`, `recipientCity`, `recipientState`, `recipientZip` | 500 W Main Street, Louisville, KY |
| `smallBusiness` | true / false |
| `womanOwned`, `veteranOwned`, `serviceDisabledVeteranOwned` | |
| `hubZone`, `minorityOwned`, `nativeAmericanOwned`, `alaskanNativeOwned` | |
| `nonprofit`, `higherEducation` | |
| `recipientTotalAwarded`, `recipientTransactions` | lifetime federal volume |
| `businessTypes` | the full raw list |

`smallBusiness` distinguishes a measured *no* from missing information:
USAspending publishes `other_than_small_business` explicitly, so a `false`
here means the government says so, not that the field was empty.

**A real result.** Contracts in NAICS 541512 (computer systems design),
small-business winners only: 20 companies kept, 201 filtered out — Anduril
Industries, Synergy Business Innovation & Solutions, Veterans EZ Info — each
with a full address and a track record in the code you care about.

### Output

One row per award:

`awardId`, `recipientName`, `awardAmount`, `awardingAgency`,
`awardingSubAgency`, `contractType`, `startDate`, `endDate`, `description`,
`naicsCode`, `naicsDescription`, `pscCode`, `pscDescription`,
`placeOfPerformanceState`, `usaspendingUrl`, plus every enrichment field
above.

### Input

```json
{
  "keywords": ["cybersecurity"],
  "awardType": "contracts",
  "startDate": "2026-01-01",
  "endDate": "2026-12-31",
  "enrichRecipient": true,
  "maxItems": 50
}
```

| Field | Default | Notes |
|---|---|---|
| `keywords` | — | Searched across descriptions and recipients |
| `awardType` | `contracts` | Contracts, grants, direct payments, loans, other |
| `startDate` / `endDate` | 2026 | Award period |
| `enrichRecipient` | `true` | Adds address, UEI and business status |
| `smallBusinessOnly` | `false` | Keeps only small-business winners |
| `maxItems` | `50` in the form, `300` if omitted via API | Up to 20,000 |
| `naicsCodes` | — | e.g. `541512` |
| `agency` | — | e.g. `Department of Defense` |
| `states` | — | Place of performance, e.g. `CA`, `VA` |
| `minAmount` | — | Filters out small awards |

Run it with no changes and it returns 50 enriched cybersecurity contracts
from the last thirty days, in about a minute. Raise `maxItems` for more:
winner profiles are fetched six at a time and cached within a run.

### Use cases

- **Teaming and subcontracting** — find small businesses already winning in
  your NAICS code, with their address and UEI.
- **Competitive intelligence** — see who wins from which agency, at what
  size, over what period.
- **Market sizing** — total obligated value by industry, agency or state.
- **Capture planning** — track incumbents and contract end dates to time a
  recompete.
- **Supplier due diligence** — lifetime federal volume and transaction count
  per company.

### Running this as a scheduled watch

New federal awards are published continuously, and each one names a
winner you may want to reach — as a competitor, a supplier, or a prime
looking for small-business subcontractors.

```json
{
  "keywords": ["cybersecurity"],
  "awardType": "contracts",
  "awardedWithinDays": 30,
  "maxItems": 200
}
```

Thirty days rather than seven: award data reaches USAspending with a
lag, so a shorter window returns very little.

**Why not fixed `startDate` / `endDate`?** A schedule replays the same
input every time. A fixed range returns the same awards at every run and
charges for them again. `awardedWithinDays` overrides both dates and
moves the window on its own.

***

### Notes and limits

- **Enrichment costs one lookup per distinct winner**, cached within a run.
  A query spanning many companies takes longer; turn `enrichRecipient` off
  for a fast, thinner export.
- **`smallBusinessOnly` filters after enrichment**, so the Actor may read
  several pages to fill your limit — in testing, 221 awards were examined to
  return 20 small-business winners. That is the point, but plan the runtime.
- Grants carry no NAICS code; those fields come back empty for them.
- Status reflects what was registered at award time and can go stale — a
  company may outgrow its small-business size standard.
- Amounts are as published, including very large multi-year vehicles that
  can dominate a sort by amount.
- Requests are paced out of courtesy to a free public service.
- Not affiliated with USAspending.gov or the US government.

### How much does it cost?

You pay per award returned: **$0.006 each**, that is $6.00 per 1,000. There is no start fee, and subscription plans pay less per award.

The example input below asks for up to 50 awards, so it costs **$0.30 at most**.

If a run reaches the spending limit you set, the output stops at that limit and never goes past it. You are never charged for rows that were not delivered.

### Use USAspending Scraper as an API

Call it from your own code with the Apify client, here in Python:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("DataIO/usaspending-federal-awards").call(run_input={
    'keywords': ['cybersecurity'],
    'awardType': 'contracts',
    'awardedWithinDays': 30,
    'maxItems': 50,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

It also works from JavaScript, Make, Zapier, n8n, and from AI agents through the Apify MCP server.

### Other actors you might like

- [UK Contracts Finder Scraper](https://apify.com/DataIO/uk-public-contract-awards): Tenders & Awards
- [TED Tenders Scraper](https://apify.com/DataIO/ted-eu-tenders-procurement): EU Public Procurement
- [Federal Register Scraper](https://apify.com/DataIO/federal-register-comment-deadlines): Comment Deadlines

### FAQ

#### Is it legal to use this data?

The actor reads public data from its official source, without logging in and without bypassing any access control. What you do with the data, for example contacting people listed in it, is your responsibility under the laws that apply to you, such as GDPR in Europe.

#### Can I run it on a schedule?

Yes. See *Running this as a scheduled watch* above: use the rolling-window setting so each run returns only what is new.

#### Can AI agents use it?

Yes. It is available through the Apify MCP server, and every input field is described in its input schema, so an agent can call it directly.

# Actor input Schema

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

Searched across award descriptions and recipients, for example "drone", "cybersecurity", "logistics". Leave empty for every award in the period.

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

Contracts are what most contractors care about. Grants matter for research and non-profits.

## `awardedWithinDays` (type: `integer`):

Rolling window, for a scheduled watch: 30 returns awards made in the last thirty days. Unlike a fixed date range, this moves on its own, so a monthly schedule returns only new awards. Overrides Awarded from and Awarded until.

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

YYYY-MM-DD.

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

YYYY-MM-DD.

## `enrichRecipient` (type: `boolean`):

Adds one lookup per distinct winner (cached), giving address, UEI, DUNS and socioeconomic flags. This is what turns an award list into a partner list. Turn it off for a faster, thinner export.

## `smallBusinessOnly` (type: `boolean`):

Keeps only winners flagged as a small business. Requires the enrichment above, since the flag comes from the winner's profile.

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

One row per award. With 'small-business winners only' enabled, the Actor reads further pages to fill this limit, so a high value takes longer.

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

Industry codes, for example 541512 (computer systems design). Leave empty for all.

## `agency` (type: `string`):

Exact top-tier agency name, for example "Department of Defense" or "Department of Energy".

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

Two-letter codes, for example CA, TX, VA.

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

Filters out small awards.

## Actor input object example

```json
{
  "keywords": [
    "cybersecurity"
  ],
  "awardType": "contracts",
  "awardedWithinDays": 30,
  "startDate": "2026-01-01",
  "endDate": "2026-12-31",
  "enrichRecipient": true,
  "smallBusinessOnly": false,
  "maxItems": 50
}
```

# Actor output Schema

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

Every row produced by the run, in JSON.

# 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"
    ],
    "awardedWithinDays": 30,
    "startDate": "2026-01-01",
    "endDate": "2026-12-31",
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("dataio/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"],
    "awardedWithinDays": 30,
    "startDate": "2026-01-01",
    "endDate": "2026-12-31",
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("dataio/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"
  ],
  "awardedWithinDays": 30,
  "startDate": "2026-01-01",
  "endDate": "2026-12-31",
  "maxItems": 50
}' |
apify call dataio/usaspending-federal-awards --silent --output-dataset

```

## MCP server setup

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