# US Federal Contract Awards: Winners & Amounts (USAspending) (`dottti/us-federal-awards`) Actor

Who won US federal contracts and for how much, from the official USAspending.gov API. Filter by keyword, NAICS, PSC, agency, winner, state, dates and amount. Competition and number of offers included. Optional SAM.gov notices with your own key.

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

## Pricing

from $2.10 / 1,000 award delivereds

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

## US Federal Contract Awards: Winners & Amounts (USAspending)

See who won US federal contracts and for how much. The data comes from the official [USAspending.gov](https://www.usaspending.gov) API run by the US Treasury, and you get it back as clean JSON, CSV or Excel. No API key, login or proxy is needed.

Optional second mode: contract notices from [SAM.gov](https://sam.gov) (award notices, solicitations, sources sought) using **your own** free SAM.gov API key.

- **First run:** the form is prefilled with the keyword `cybersecurity` and 25 results. Click **Start** and you get the 25 largest cybersecurity contracts signed in the last 90 days, with winner, amount, total value, competition and number of offers, in about 10 seconds.
- US government data is public domain.

### Who uses this

- **Bid and capture teams** see who wins in their NAICS or PSC codes, at which agencies, for how much, and how many offers each award drew.
- **Sales teams** find companies that just won federal work, by state or agency.
- **Competitor tracking:** enter a company name or UEI and get every award it won.
- **Analysts** track spending by agency, industry and state over time.

### What you get

One row per award. A real row from a test run on 5 November 2026:

```json
{
  "awardId": "70T03026F7667N105",
  "awardCategory": "contract",
  "awardType": "DELIVERY ORDER",
  "recipientName": "22ND CENTURY TECHNOLOGIES, INC.",
  "recipientUei": "QT2VZ9L1VPQ1",
  "recipientCity": "MCLEAN",
  "recipientState": "VA",
  "awardingAgency": "Department of Homeland Security",
  "awardingSubAgency": "Transportation Security Administration",
  "amountObligated": 26688060.78,
  "dateSigned": "2026-09-28",
  "startDate": "2026-09-30",
  "endDate": "2027-09-29",
  "naicsCode": "541512",
  "naicsDescription": "COMPUTER SYSTEMS DESIGN SERVICES",
  "pscCode": "DA01",
  "pscDescription": "IT AND TELECOM - BUSINESS APPLICATION/APPLICATION DEVELOPMENT SUPPORT SERVICES (LABOR)",
  "description": "TSA REQUIRES ROBUST, SCALABLE, AND ADAPTIVE OPERATIONS AND MAINTENANCE SUPPORT. ...",
  "placeOfPerformanceCity": "MCLEAN",
  "placeOfPerformanceState": "VA",
  "placeOfPerformanceZip": "22102",
  "placeOfPerformanceCountry": "USA",
  "currentValue": 26688060.78,
  "totalValue": 142042198.38,
  "potentialEndDate": "2031-09-29",
  "awardingOffice": "ENTERPRISE INFORMATION TECHNOLOGY",
  "extentCompeted": "FULL AND OPEN COMPETITION",
  "numberOfOffers": 6,
  "setAside": null,
  "solicitationProcedures": "SUBJECT TO MULTIPLE AWARD FAIR OPPORTUNITY",
  "pricingType": "FIRM FIXED PRICE",
  "solicitationId": "70T03026Q7667N021",
  "parentAwardId": "47QTCA24D002S",
  "parentAwardType": "FSS",
  "parentAwardAgency": "General Services Administration",
  "detailsIncluded": true,
  "usaspendingId": "CONT_AWD_70T03026F7667N105_7013_47QTCA24D002S_4732",
  "url": "https://www.usaspending.gov/award/CONT_AWD_70T03026F7667N105_7013_47QTCA24D002S_4732",
  "source": "USAspending.gov"
}
```

What the money fields mean:

- `amountObligated`: money the government has committed to the award so far.
- `currentValue`: base plus the options exercised so far.
- `totalValue`: base plus all options, the most the award can be worth (for grants: total funding).
- `numberOfOffers`: offers received, as reported by the agency. Some awards leave it empty (in a 300-award test, 176 had it).
- `extentCompeted` and `setAside` show whether the award was full and open, sole source, or set aside (small business, 8(a), SDVOSB, HUBZone and so on).

Fields the agency left empty come back as `null`. Also included: funding agency, recipient parent company, recipient business categories, sub-award count, last modified date, and for grants the assistance listing (CFDA).

### How to use it

1. Pick a **date range** (empty = the last 90 days). By default it means awards **signed** in the range. You can switch to "any activity" (includes modifications and new money on older awards).
2. Narrow it with **keywords**, **NAICS**, **PSC**, **agency**, **recipient**, **state** or **amount**.
3. Set **Maximum results** as your cost cap and run.

#### Example: IT services awards in Virginia from the Department of Defense

```json
{
  "agencies": ["DOD"],
  "naicsCodes": ["5415"],
  "placeOfPerformanceStates": ["VA"],
  "minAmount": 100000,
  "dateFrom": "2026-04-01",
  "dateTo": "2026-07-31",
  "maxResults": 500
}
```

#### Example: everything a competitor won this year

```json
{
  "recipients": ["booz allen"],
  "dateFrom": "2026-01-01",
  "sortBy": "newest",
  "maxResults": 1000
}
```

#### Example: SAM.gov award notices with your own key

```json
{
  "mode": "opportunities",
  "samApiKey": "your-own-sam-gov-key",
  "naicsCodes": ["541512"],
  "samNoticeTypes": ["a"],
  "dateFrom": "2026-10-01"
}
```

Get a free key at sam.gov: sign in, open Account Details and request a public API key. The key is a secret input: it is sent only to api.sam.gov and never written to the dataset or the log. SAM.gov limits how many requests a key can make per day. Keys without a SAM.gov role get a small quota, so the Actor asks for 1,000 notices per request.

#### Weekly report

Save your filters as a task and add a weekly schedule with the date fields left empty. Each run then returns the awards of the last 90 days. Sort by "newest" to see the latest first.

### Pricing

You pay per award (or SAM.gov notice) delivered to your dataset. Platform usage is included in the price. The current price is on the Pricing tab. `maxResults` and your run's maximum cost cap the cost of any run.

### How it works and limits

- **Department of Defense data is published about 90 days late.** This is US policy, not this Actor. On 5 November 2026 USAspending.gov had about 200,000 to 350,000 DoD contracts per month up to July 2026, but only 116 for August, 24 for September and 1 for October. For DoD, use a date range that ends at least 90 days ago. The run's status message reminds you when it matters.
- Data is as fresh as USAspending.gov. Civilian agencies usually report within days.
- Searches start at 1 October 2007 (a USAspending.gov API limit).
- "Include competition details" makes one extra request per award to read total value, competition, offers, set-aside and parent contract. It is on by default. In tests, a run with details delivered about 8 awards per second and one without details about 100 per second.
- "Newest first" sorting reads at most 10,000 awards per award type (the API's page limit for date sorts). "Largest amount first" and "recently modified" have no such limit.
- NAICS and PSC filters apply to contracts and IDVs only.
- The Actor is polite to the API. When USAspending.gov is busy (HTTP 429 or 5xx) it waits and retries, honouring Retry-After.
- **Long runs never end empty.** Every award is saved the moment it is found. Shortly before the run timeout the Actor stops, keeps everything found and ends as SUCCEEDED with a status message that says so.
- If the platform restarts the run (a migration), it continues where it stopped. Awards already delivered are not delivered or charged again.
- Bad input values (a 2-letter keyword, a NAICS code with letters, "Virginia" instead of "VA") are skipped and listed in the status message, so the run still finishes.
- The SAM.gov mode was built to the SAM.gov Get Opportunities v2 documentation. SAM.gov takes one value per filter, so several NAICS codes, notice types or states mean several requests against your key's daily quota.
- Executive compensation names that USAspending.gov publishes for some recipients are not copied.

### Development

```bash
npm install
npm test          # unit tests on saved USAspending.gov responses
node src/main.js  # local run, reads storage/key_value_stores/default/INPUT.json
```

# Actor input Schema

## `mode` (type: `string`):

awards: federal awards from USAspending.gov (who won, for how much). No key needed. opportunities: contract notices from SAM.gov (solicitations, award notices). Needs your own free SAM.gov API key below.

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

Words to search for. USAspending.gov matches them against the award description, recipient and other text fields (at least 3 characters each; an award matches if any keyword matches). In SAM.gov mode they are matched against the notice title. Leave empty for every award the other filters allow.

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

Industry codes, 2 to 6 digits. A short code matches every code under it, for example 5415 matches 541511 and 541512. Contracts and IDVs only.

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

Product and Service Codes, for example D (all IT services), DA01 or R425. Contracts and IDVs only.

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

Agency names or abbreviations, for example DOD, Department of Veterans Affairs, NASA, or a sub-agency such as Department of the Army. A part of a name matches every agency containing it; the log shows which agencies were used.

## `agencyType` (type: `string`):

awarding: the agency that signed the award (usual). funding: the agency that pays for it.

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

Company names or 12-character UEIs, for example a competitor. Matches part of the name.

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

Two-letter US state codes where the work is done, for example VA, MD, DC.

## `awardTypes` (type: `array`):

Contracts are the default. IDVs are umbrella vehicles (GWACs, BPAs, IDIQs) that orders are placed under. Grants, loans, direct payments and other assistance are also available. Each type is searched in turn.

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

Start of the date range, YYYY-MM-DD. Leave empty for 90 days ago (30 days ago in SAM.gov mode). USAspending.gov searches start at 2007-10-01.

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

End of the date range, YYYY-MM-DD. Leave empty for today.

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

signed: awards first signed in the range (new awards). activity: awards with any action in the range, including modifications and new obligations on older awards. modified: awards whose record was last changed in the range.

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

Only awards with at least this amount obligated, in US dollars.

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

Only awards with at most this amount obligated, in US dollars.

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

amount: largest awards first. newest: most recently signed first (reads at most 10,000 awards per award type; narrow the dates for more). recentlyModified: most recently updated records first.

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

Stop after this many awards (or SAM.gov notices). This also caps the cost of a run.

## `includeDetails` (type: `boolean`):

Adds total value (base and all options), competition (full and open, sole source, set-aside), number of offers received, pricing type, parent contract and recipient business categories. Takes one extra request per award. Turn off for faster, larger pulls of search fields only.

## `detailConcurrency` (type: `integer`):

How many award detail requests run at once (1 to 8). The default is polite to USAspending.gov.

## `samApiKey` (type: `string`):

Your own free public API key from sam.gov (sign in, Account Details, API key). Only used in SAM.gov mode, sent only to api.sam.gov, never written to the dataset or log. Keys without a SAM.gov role have a small daily request limit; each request returns up to 1,000 notices.

## `samNoticeTypes` (type: `array`):

SAM.gov mode only. Award Notice is the default. One request is made per type.

## Actor input object example

```json
{
  "mode": "awards",
  "keywords": [
    "cybersecurity"
  ],
  "agencyType": "awarding",
  "awardTypes": [
    "contracts"
  ],
  "dateType": "signed",
  "sortBy": "amount",
  "maxResults": 25,
  "includeDetails": true,
  "detailConcurrency": 4,
  "samNoticeTypes": [
    "a"
  ]
}
```

# Actor output Schema

## `awards` (type: `string`):

Award ID, winner and UEI, agency, amount obligated, total value, dates, NAICS, PSC, place of performance, competition and number of offers, and a link to the award on USAspending.gov.

# 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"
    ],
    "maxResults": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("dottti/us-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"],
    "maxResults": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("dottti/us-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"
  ],
  "maxResults": 25
}' |
apify call dottti/us-federal-awards --silent --output-dataset

```

## MCP server setup

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