# US Federal Spending Monitor - Contracts & Grants to JSON (`aaddss/usaspending-monitor`) Actor

Search & monitor US federal contracts & grants via the official USAspending.gov API. Filter by keyword, type, agency and date; clean structured records with direct links.

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

## Pricing

$3.00 / 1,000 federal 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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## US Federal Spending Monitor — Contracts & Grants → JSON (with stock tickers)

Search and monitor **US federal awards** (contracts & grants) straight from the
official [USAspending.gov](https://www.usaspending.gov/) API. No browser, no proxy,
no scraping tricks — a public government API, so it's fast, reliable, and fully legal.

#### What makes this different: investable-entity mapping

Raw award data is free and public. The value is in the **processing layer**.
This actor maps each award **recipient to its public-company stock ticker + SEC CIK**
(via SEC's official company list), so the output is ready for:

- **Alternative-data / signal research** — companies winning large federal contracts
  often move before the news. Join awards to tickers instantly.
- **Watchlists & screeners** — filter awards down to publicly-traded recipients.
- **Portfolio surveillance** — monitor government revenue exposure of holdings.

Mapping is **conservative** (a wrong ticker is worse than none): exact normalized
name match, a safe prefix rule for subsidiaries (e.g. *Lockheed Martin Aeronautics*
→ LMT), and a small alias table for renames (e.g. *Raytheon* → RTX). Unmatched
recipients return `ticker: null`. Turn it off with `mapTickers: false`.

#### Input

| Field | Description |
|-------|-------------|
| `keywords` | Terms matched against award text (e.g. `["artificial intelligence"]`) |
| `awardCategory` | `contracts`, `grants`, or `both` |
| `startDate` / `endDate` | Award action date window (YYYY-MM-DD) |
| `maxResults` | Max awards to return (≤ 10000) |
| `mapTickers` | Add ticker + CIK for matched recipients (default `true`) |

#### Output (one item per award)

```json
{
  "awardId": "HQ014717C0032",
  "recipient": "LOCKHEED MARTIN CORPORATION",
  "ticker": "LMT",
  "cik": 936468,
  "amount": 9080516982.62,
  "description": "THAAD INTERCEPTOR LOT 9 PRODUCTION ...",
  "awardingAgency": "Department of Defense",
  "awardingSubAgency": "Missile Defense Agency",
  "startDate": "2017-03-27",
  "endDate": "2028-11-30",
  "placeOfPerformanceState": "TX",
  "url": "https://www.usaspending.gov/award/CONT_AWD_HQ014717C0032_..."
}
```

#### Pricing

Pay-per-result (PPE): you're billed per award record returned. Run it on a schedule
to keep a fresh, ticker-mapped feed of new federal awards.

#### Legal & data notes

All data comes from the official USAspending.gov API (public award records, no
personal data). Ticker/CIK mapping uses SEC's public `company_tickers.json`.
This is public-record data, not MNPI.

# Actor input Schema

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

Search terms matched against award text, e.g. "artificial intelligence", "cybersecurity".

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

Contracts, grants, or both.

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

Award action date on/after this date.

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

Award action date on/before this date.

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

Maximum awards to return (USAspending paginates to 10000).

## `mapTickers` (type: `boolean`):

Add public-company ticker + SEC CIK for each award recipient when confidently matched (via SEC's official company list). Turns raw award data into investable-entity-mapped data.

## Actor input object example

```json
{
  "keywords": [
    "artificial intelligence"
  ],
  "awardCategory": "contracts",
  "startDate": "2025-01-01",
  "endDate": "2026-06-22",
  "maxResults": 200,
  "mapTickers": true
}
```

# 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": [
        "artificial intelligence"
    ],
    "startDate": "2025-01-01",
    "endDate": "2026-06-22"
};

// Run the Actor and wait for it to finish
const run = await client.actor("aaddss/usaspending-monitor").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": ["artificial intelligence"],
    "startDate": "2025-01-01",
    "endDate": "2026-06-22",
}

# Run the Actor and wait for it to finish
run = client.actor("aaddss/usaspending-monitor").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": [
    "artificial intelligence"
  ],
  "startDate": "2025-01-01",
  "endDate": "2026-06-22"
}' |
apify call aaddss/usaspending-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,aaddss/usaspending-monitor"
        }
    }
}

```

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/efKcaYohuGd6dd0fV/builds/6JykaEcLFc6YuiA1p/openapi.json
