# USAspending Federal Awards Search (Contracts, Grants, Loans) (`open-data-tools/usaspending-federal-awards`) Actor

Search US federal contracts, grants, loans and other awards from the official USAspending.gov API. Filter by keyword, recipient, agency, NAICS, state, amount and date. Clean, flat output with a link to every award.

- **URL**: https://apify.com/open-data-tools/usaspending-federal-awards.md
- **Developed by:** [Open Data Tools](https://apify.com/open-data-tools) (community)
- **Categories:** Business, Lead generation, Agents
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

## USAspending Federal Awards Search

Search US federal **contracts, grants, loans, IDVs and direct payments** from the official [USAspending.gov](https://www.usaspending.gov) API and get clean, flat rows you can drop into a spreadsheet, CRM, or AI agent.

No API key, no login, and no scraping: it uses the US Treasury's public USAspending API, and the data is public domain.

### What you can do with it

- **Government contractors (GovCon BD):** see who is winning contracts in your NAICS code, agency, or state, and how big the awards are.
- **Competitor research:** pull every federal award a company has received by name or UEI.
- **Grant research:** find grants by keyword, agency, or state.
- **Journalists and analysts:** track federal spending on a topic ("drone", "AI", "cybersecurity") over any date range.
- **AI agents:** a single tool call returns structured award data with a link to each award.

### Input

| Field | Example |
|---|---|
| Keywords | `cybersecurity`, `cloud migration` |
| Recipient names | `Lockheed Martin` |
| Award types | Contracts, IDVs, Grants, Direct payments, Loans, Other |
| Awarding agencies | `Department of Defense` |
| NAICS codes | `541512` |
| Place of performance states | `VA`, `TX` |
| Date range | `2025-10-01` to today |
| Amount range | min / max USD |
| Sort by | Award Amount, Start Date, Last Modified Date |
| Maximum results | `100` |

Example input:

```json
{
  "keywords": ["cybersecurity"],
  "awardTypes": ["contracts"],
  "awardingAgencies": ["Department of Homeland Security"],
  "states": ["VA"],
  "startDate": "2025-10-01",
  "minAmount": 1000000,
  "maxResults": 500
}
```

### Output

One row per award:

```json
{
  "awardId": "HSHQDC17D00012",
  "awardCategory": "contracts",
  "awardType": "DELIVERY ORDER",
  "recipientName": "EXAMPLE CORP",
  "recipientUei": "ABCDEF123456",
  "awardAmount": 12500000,
  "totalOutlays": 8200000,
  "description": "CYBERSECURITY OPERATIONS SUPPORT",
  "startDate": "2025-11-03",
  "endDate": "2027-11-02",
  "awardingAgency": "Department of Homeland Security",
  "awardingSubAgency": "Cybersecurity and Infrastructure Security Agency",
  "naicsCode": "541512",
  "naicsDescription": "COMPUTER SYSTEMS DESIGN SERVICES",
  "pscCode": "DJ01",
  "placeOfPerformanceState": "VA",
  "lastModified": "2026-06-15 07:29:54",
  "usaspendingUrl": "https://www.usaspending.gov/award/CONT_AWD_..."
}
```

Export as JSON, CSV, Excel, or HTML, or fetch it through the Apify API.

### Pricing

You pay per award returned, so a small query costs cents. Set **Maximum results** (or a maximum charge per run) to cap your spend.

### Tips

- USAspending lets each request cover only one award family, so this actor queries each award type you select and combines the results.
- NAICS filters apply to contracts and IDVs only.
- Keywords need at least 3 characters.
- Data covers fiscal year 2008 onward. USAspending refreshes it daily from agency submissions, and recent awards can take a few weeks to appear.

### Data source

Data comes from the USAspending.gov API run by the US Department of the Treasury, Bureau of the Fiscal Service. It is public domain. This actor is not affiliated with or endorsed by the US government.

# Actor input Schema

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

Words to match in award descriptions and other text fields (at least 3 characters each). Example: cybersecurity, drone, cloud migration.

## `recipientNames` (type: `array`):

Company or organization names (or UEIs) to search for. Example: Lockheed Martin.

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

Which kinds of awards to include.

## `awardingAgencies` (type: `array`):

Top-tier awarding agency names exactly as USAspending lists them. Example: Department of Defense, Department of Homeland Security.

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

2 to 6 digit NAICS codes (contracts only). Example: 541512.

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

Two-letter US state codes. Example: VA, TX.

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

Only awards with activity on or after this date (YYYY-MM-DD). USAspending data starts at 2007-10-01.

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

Only awards with activity on or before this date (YYYY-MM-DD). Defaults to today.

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

Only awards worth at least this many US dollars.

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

Only awards worth at most this many US dollars.

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

Order results by this field, largest or newest first.

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

Stop after this many awards in total.

## Actor input object example

```json
{
  "keywords": [
    "cybersecurity"
  ],
  "awardTypes": [
    "contracts"
  ],
  "startDate": "2025-10-01",
  "sortBy": "Award Amount",
  "maxResults": 100
}
```

# Actor output Schema

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

One row per federal award, with a link to its USAspending.gov page.

# 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"
    ],
    "startDate": "2025-10-01"
};

// Run the Actor and wait for it to finish
const run = await client.actor("open-data-tools/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"],
    "startDate": "2025-10-01",
}

# Run the Actor and wait for it to finish
run = client.actor("open-data-tools/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"
  ],
  "startDate": "2025-10-01"
}' |
apify call open-data-tools/usaspending-federal-awards --silent --output-dataset

```

## MCP server setup

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