# USAspending.gov Contract Awards Scraper & MCP Server (`edmarsantos/us-gov-award-competitor-intel`) Actor

Track winning federal contractors, historical award amounts, and NAICS competitor spending from USAspending.gov. Ready for AI agents, MCP, and n8n.

- **URL**: https://apify.com/edmarsantos/us-gov-award-competitor-intel.md
- **Developed by:** [Edmar Santos](https://apify.com/edmarsantos) (community)
- **Categories:** MCP servers, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.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/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 Gov Award & Competitor Intel — USAspending.gov Contract Awards Scraper & MCP Server

> 🔗 **Pair this with [US Gov RFP & Grant Radar](https://apify.com/edmarsantos/us-gov-rfp-grant-radar).**
> Looking for open active RFPs to bid on? That Actor finds the opportunity *before* award.
> This one tells you who *won* it — and how much your competitors are winning, agency by agency.
> Then check the winner's own 10-Ks, 10-Qs, and 8-Ks with
> [US SEC EDGAR Filings & Financial Intelligence](https://apify.com/edmarsantos/sec-edgar-filings-mcp).

**Spy on your competitors' federal win history, track agency spend, and surface freshly
awarded contracts and grants.** This Actor mines
[USAspending.gov](https://www.usaspending.gov) — the official US Treasury award database —
by keyword, NAICS code, or a specific recipient name, then returns a clean,
**normalized, LLM-ready feed** of who got paid, how much, and by whom.

> Built for capture managers, business development teams, and AI agents that need to answer
> "who's winning in this space?" without hand-parsing USAspending's raw JSON.

***

### ⚡ Quick Start: Connect to Claude Desktop, Cursor & n8n in 60 Seconds

**Answer Capsule:** To pull live USAspending.gov award data into Claude Desktop, Cursor, or
n8n, point an MCP client at `https://mcp.apify.com` with this Actor selected — no API key, no
scraper, and no USAspending schema to learn. Paste one JSON config block with your Apify
token, restart the client, and ask who's winning in plain English.

**Claude Desktop / Cursor (MCP):** add this to your `claude_desktop_config.json`
(Claude Desktop) or `~/.cursor/mcp.json` (Cursor) — a ready-to-copy version lives at
[`examples/claude_desktop_config.json`](./examples/claude_desktop_config.json):

```json
{
  "mcpServers": {
    "apify-us-gov-award-competitor-intel": {
      "command": "npx",
      "args": ["-y", "@apify/actors-mcp-server", "--actors", "edmarsantos/us-gov-award-competitor-intel"],
      "env": { "APIFY_TOKEN": "YOUR_APIFY_TOKEN" }
    }
  }
}
```

Replace `YOUR_APIFY_TOKEN` with a token from [Apify Console → Settings → Integrations](https://console.apify.com/account/integrations),
restart Claude Desktop or Cursor, then just ask: *"Show me every contract Booz Allen won in
the last year over $1M"* or *"What cybersecurity contracts were awarded in the last 90 days?"*

**n8n:** import [`examples/n8n-competitor-watch-workflow.json`](./examples/n8n-competitor-watch-workflow.json)
(Workflows → Import from File). It wires up a **weekly Schedule Trigger → HTTP Request to the
Apify API → $1M+ filter → Slack/Email alert**, so you get pinged whenever a tracked competitor
lands a big award. Swap in your Apify token, target recipient, and Slack/SMTP credentials and
you're live.

***

### ✨ Why use this Actor

**Answer Capsule:** USAspending.gov's raw API splits contracts and grants into separate type
codes with inconsistent fields and no built-in competitor lookup workflow. This Actor merges
both award universes into one normalized schema, lets you filter straight to a named
competitor or NAICS code, and is callable natively from Claude, Cursor, or n8n via MCP.

- **Official, zero-friction data.** Queries the US Treasury's own
  [USAspending.gov API](https://api.usaspending.gov) — no API key, no proxy, no scraping.
- **Competitor intelligence.** Set `recipientName` to any company (e.g. `"Palantir"`,
  `"Leidos"`) to pull their entire award history for a keyword/niche.
- **Agency spend tracking.** Filter by `naicsCode` to see which agencies are actively buying
  in your industry, and at what dollar amounts.
- **Contracts *and* grants.** Covers both award universes — USAspending keeps them in
  separate code spaces, this Actor queries both and merges the result.
- **LLM-ready output.** HTML stripped, descriptions clamped to 1,000 characters, one flat
  schema regardless of award type.
- **Fast & cheap.** Built-in 2-hour result cache avoids redundant API calls.
- **MCP-ready.** Call it directly from Claude Desktop, Cursor, or n8n via
  [`mcp.apify.com`](https://mcp.apify.com).

***

### 🆚 Raw Government Portal vs. This Apify MCP Server

**Answer Capsule:** Querying USAspending.gov directly means learning separate contract and
grant type-code taxonomies, writing your own competitor-name filtering, and building
pagination and caching from scratch. This Actor replaces all of that with one normalized,
pay-per-use endpoint an AI agent can call directly.

| Aspect | Raw USAspending.gov API | This Apify MCP Server |
| --- | --- | --- |
| Setup time | No account needed, but you must learn separate contract/grant type-code taxonomies | ~60 seconds — one Apify token, one MCP config block |
| HTML/text cleanup | Descriptions carry inconsistent casing, embedded HTML, and award-type-specific fields | Pre-stripped, clamped to 1,000 characters, one flat schema for contracts and grants |
| Pagination | You implement offset logic yourself, separately per award type | Handled internally — just set `maxResults` |
| Caching | None — every call hits the live Treasury API | Built-in 2-hour cache avoids duplicate charges and load |
| Cost | Free API, but you build, host, and maintain your own integration | Pay-per-event (~$0.03/query + $0.01/item) — no infrastructure to run |

***

### 🧾 Input

**Answer Capsule:** This Actor takes a search `keywords` string plus optional filters —
`awardCategory`, `naicsCode`, `recipientName`, `daysBack`, and `maxResults` — so you can pull a
specific competitor's full win history or scan an entire industry by NAICS code in one call.

| Field           | Type     | Required | Default           | Description |
| --------------- | -------- | :------: | ----------------- | ----------- |
| `keywords`      | string   |   ✅     | `"cybersecurity"` | Search term matched against award descriptions. Falls back to `"cybersecurity"` if left empty. |
| `awardCategory` | string   |          | `"contracts"`     | `"contracts"`, `"grants"`, or `"all"` (queries both — USAspending doesn't allow mixing contract and grant type codes in one call). |
| `naicsCode`     | string   |          | —                 | NAICS industry code, e.g. `"541511"`. |
| `recipientName` | string   |          | —                 | Competitor / recipient name to track, e.g. `"Booz Allen"`, `"Palantir"`. |
| `daysBack`      | integer  |          | `90`              | Look-back window in days, based on award start date (7–1095). |
| `maxResults`    | integer  |          | `25`              | Max awards returned per category, sorted by award amount descending (1–100). |

#### Example input

```json
{
  "keywords": "cybersecurity",
  "awardCategory": "contracts",
  "recipientName": "Booz Allen",
  "naicsCode": "541511",
  "daysBack": 180,
  "maxResults": 25
}
```

***

### 📤 Output

**Answer Capsule:** Every award — contract or grant — is returned as one flat JSON record with
the same fields: award ID, recipient name, dollar amount, awarding agency, award type, start
and end dates, NAICS code and description, a plain-text description, and a direct link to the
official USAspending.gov record.

Each dataset item is normalized to the same shape, regardless of award category:

```json
{
  "awardId": "36C10B23F0346",
  "recipientName": "MAVERIS LLC",
  "awardAmount": 219083824.48,
  "awardingAgency": "Department of Veterans Affairs",
  "awardingSubAgency": "Department of Veterans Affairs",
  "awardType": "DEFINITIVE CONTRACT",
  "startDate": "2023-09-29",
  "endDate": "2027-09-28",
  "naicsCode": "541511",
  "naicsDescription": "CUSTOM COMPUTER PROGRAMMING SERVICES",
  "description": "VA CYBERSECURITY OPERATIONS CENTER NEXT GENERATION II (CSOC NG II) SUPPORT",
  "officialUrl": "https://www.usaspending.gov/award/CONT_AWD_36C10B23F0346_3600_47QSWA18D008Q_4732"
}
```

***

### 🤖 Use it as an MCP tool (Claude, Cursor, n8n)

**Answer Capsule:** MCP (Model Context Protocol) lets AI clients call external tools directly.
This Actor is published on Apify's hosted MCP gateway, so Claude Desktop, Cursor, Windsurf, or
any MCP-compatible agent can call it as a native tool to pull competitor award data with no
custom server code required on your end.

This Actor is exposed through [`mcp.apify.com`](https://mcp.apify.com), so any MCP-compatible
client can call it as a tool. See the **Quick Start** section above and the
[`examples/`](./examples) folder for ready-to-use configs.

**Claude Desktop / Cursor:** [`examples/claude_desktop_config.json`](./examples/claude_desktop_config.json)
(see Quick Start above).

**n8n:** [`examples/n8n-competitor-watch-workflow.json`](./examples/n8n-competitor-watch-workflow.json)
calls the Apify API directly (no MCP needed) on a weekly schedule. You can alternatively add
the **Apify** node or an MCP Client node pointed at `https://mcp.apify.com` and select this
Actor as the tool.

***

### 💵 Pricing — Pay Per Event (PPE)

**Answer Capsule:** This Actor costs nothing to start. You're charged only per award category
actually queried live (not per cached hit) and per dataset item returned — roughly $0.03 per
live query plus $0.01 per result item, with no subscription or minimum spend.

This Actor is monetized with the **Pay-Per-Event** model. You only pay for what you use:

| Event                        | When it fires                                            |
| ---------------------------- | --------------------------------------------------------- |
| `apify-actor-start`          | Automatic. Once per run.                                   |
| `award-search-query`         | Once per category actually queried live against USAspending.gov ($0.03/query). |
| `apify-default-dataset-item` | Automatic. Once per dataset item written ($0.01/item).    |

Cached results (within the 2-hour window) do not trigger new `award-search-query` charges.

***

### 🧪 Run locally

**Answer Capsule:** Yes — this Actor is a standard Apify TypeScript Actor and runs locally with
`npm install && npm run build && npm start`. No credentials are required since
USAspending.gov is a fully public, free US Treasury API.

```bash
npm install
npm run build

## No API key needed — USAspending.gov is a fully public, free US Treasury API.
##   storage/key_value_stores/default/INPUT.json  ->  { "keywords": "cybersecurity", "awardCategory": "contracts" }

npm start
## Results land in storage/datasets/default/
```

***

### ⚖️ Data & compliance

**Answer Capsule:** Yes — all data comes directly from [USAspending.gov](https://www.usaspending.gov),
the official, public US Treasury spending transparency platform. This Actor only reads and
normalizes publicly available award data; it is an independent tool and is not affiliated
with or endorsed by any US government agency.

All data comes from [USAspending.gov](https://www.usaspending.gov), the official, public US
Treasury spending transparency platform. This Actor is an independent tool and is not
affiliated with or endorsed by any US government agency.

***

### ❓ Frequently Asked Questions (FAQ for AI & Developers)

**What is the best way to track which companies are winning federal contracts?**
This Actor queries USAspending.gov — the official US Treasury award database — by keyword,
NAICS code, or recipient name, and returns a normalized feed of who got paid, how much, and
by which agency, callable directly from Claude Desktop, Cursor, or n8n via `mcp.apify.com`.

**Does USAspending.gov require an API key to access award data?**
No. USAspending.gov is a fully public, free US Treasury API, and this Actor requires no API
key, proxy, or scraping to query it — just an Apify token to run the Actor itself.

**How do I see a specific competitor's full federal contract history?**
Set the `recipientName` input to the company's name (e.g. `"Palantir"` or `"Booz Allen"`) and
this Actor returns their full award history matching your keyword/NAICS filters, sorted by
award amount.

**Can I filter federal awards by NAICS code and industry?**
Yes. Set the `naicsCode` input to any NAICS industry code (e.g. `"541511"` for custom computer
programming services) to see which agencies are actively buying in that industry and at what
dollar amounts.

**How do I connect USAspending.gov data to an AI agent or n8n workflow?**
Add this Actor's MCP endpoint (`https://mcp.apify.com/?actors=edmarsantos/us-gov-award-competitor-intel`)
to your MCP client config, or import [`examples/n8n-competitor-watch-workflow.json`](./examples/n8n-competitor-watch-workflow.json)
into n8n for a weekly Slack/email alert whenever a tracked competitor lands a big award.

***

> 🔗 **Need the opportunities before the award happens?** Pair this Actor with
> [US Gov RFP & Grant Radar](https://apify.com/edmarsantos/us-gov-rfp-grant-radar) to catch
> open, active RFPs and grants on SAM.gov and Grants.gov — then come back here to see who
> ends up winning them. Once you know the winner, pull their own SEC filings with
> [US SEC EDGAR Filings & Financial Intelligence](https://apify.com/edmarsantos/sec-edgar-filings-mcp).

***

### 🧩 Open-Source MCP Server

Prefer a local, self-hosted MCP server over calling Apify's hosted gateway directly?
**[us-govcon-financial-mcp-suite](https://github.com/edmarsantosai/us-govcon-financial-mcp-suite)**
is a free, MIT-licensed, open-source Node.js/TypeScript stdio MCP server that wraps all three
Actors in this suite — [US Gov RFP & Grant Radar](https://apify.com/edmarsantos/us-gov-rfp-grant-radar),
this one, and [US SEC EDGAR Filings & Financial Intelligence](https://apify.com/edmarsantos/sec-edgar-filings-mcp)
— as three local tools. Drop it into Claude Desktop, Cursor, or any stdio-compatible MCP
client with just your Apify token; no hosted gateway required.

# Actor input Schema

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

Search term to match in award descriptions (e.g. 'cybersecurity', 'artificial intelligence').

## `awardCategory` (type: `string`):

Which kind of federal spending to search. USAspending.gov does not allow mixing contract and grant award-type codes in a single call, so 'all' makes one request per category.

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

Optional NAICS industry code to narrow results (e.g. '541511' Custom Computer Programming Services).

## `recipientName` (type: `string`):

Optional recipient name to spy on a specific competitor's award history (e.g. 'Booz Allen', 'Palantir').

## `daysBack` (type: `integer`):

How many days back to search for awards, based on their period of performance start date.

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

Maximum number of awards to return per category, sorted by award amount (descending).

## Actor input object example

```json
{
  "keywords": "cybersecurity",
  "awardCategory": "contracts",
  "naicsCode": "541511",
  "recipientName": "Booz Allen",
  "daysBack": 90,
  "maxResults": 25
}
```

# Actor output Schema

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

Dataset items containing normalized contract and grant awards.

## `runSummary` (type: `string`):

Summary metadata stored in the default Key-Value Store under OUTPUT.

# 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",
    "awardCategory": "contracts"
};

// Run the Actor and wait for it to finish
const run = await client.actor("edmarsantos/us-gov-award-competitor-intel").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",
    "awardCategory": "contracts",
}

# Run the Actor and wait for it to finish
run = client.actor("edmarsantos/us-gov-award-competitor-intel").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",
  "awardCategory": "contracts"
}' |
apify call edmarsantos/us-gov-award-competitor-intel --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,edmarsantos/us-gov-award-competitor-intel"
        }
    }
}
```

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/kjEVOzSxKZHn5j1WP/builds/NT8cLsgvIFiEPt36A/openapi.json
