# USAspending Scraper - Federal Awards, Contractors & Leads (`scrapesage/usaspending-scraper`) Actor

Scrape USAspending.gov: search federal awards (contracts, grants, loans), pull full award detail (recipient, executives, place of performance, NAICS/PSC), and build US-government contractor & vendor leads with addresses and business types. Monitoring mode. No API key, no browser.

- **URL**: https://apify.com/scrapesage/usaspending-scraper.md
- **Developed by:** [Scrape Sage](https://apify.com/scrapesage) (community)
- **Categories:** Lead generation, Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 award scrapeds

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## USAspending Scraper — Federal Awards, Contractors & Leads (Amounts, Agencies & Contacts)

Extract **complete US federal spending data from [USAspending.gov](https://www.usaspending.gov)** — search every federal **award** (contracts, grants, loans, direct payments) by keyword, agency, NAICS/PSC, recipient or location, pull the **full award detail** (recipient address, named executives, place & period of performance, classifications, obligations), and turn every **government contractor** into a ready-to-use **B2B lead** with address, UEI, business types and total federal dollars.

No login, no API key, no browser — fast JSON extraction straight from the official US government open-data API.

### Why this USAspending scraper?

Most scrapers dump a thin award list. This actor is a complete **federal market-intelligence + lead-gen engine**: it searches both **awards** and **recipients**, ships the **richest record in the category**, and enriches every contractor into a contactable lead.

| Data | Typical scrapers | This actor |
|---|---|---|
| Award ID, type, amount, agency, dates | ✅ | ✅ |
| Filter by keyword, NAICS, PSC, agency, location, amount | partial | ✅ |
| Contracts **+ IDVs + grants + loans + direct payments** | partial | ✅ all groups |
| Recipient **UEI, DUNS, registered address** | ❌ | ✅ |
| Recipient **business types** (small business, woman/veteran-owned, 8(a), HUBZone) | ❌ | ✅ |
| **Named executives + compensation** per award | ❌ | ✅ |
| Place & period of performance, NAICS/PSC descriptions | ❌ | ✅ |
| Obligations, outlays, sub-award totals | ❌ | ✅ |
| Recipient leaderboard by total federal $ | ❌ | ✅ |
| Lead score (0–100) per contractor | ❌ | ✅ |
| Monitoring — only new awards / new contractors | ❌ | ✅ |

### Use cases

- **GovCon lead generation** — federal contractors are high-value B2B buyers (and partners/subs). Export them with registered address, UEI, business-type set and total federal dollars (`leadScore`), then prospect, teaming or compete.
- **Competitive & market intelligence** — see exactly who wins what: filter awards by agency, NAICS/PSC or keyword and track award amounts, incumbents and expiring contracts (`endDate`) to time your capture.
- **Subcontracting & teaming** — find prime recipients in your NAICS and location, including their parent company and named executives, to build teaming pipelines.
- **Diversity & set-aside sourcing** — filter recipients by business type (small, woman-owned, veteran-owned, 8(a), HUBZone) for supplier-diversity and set-aside strategies.
- **Grant & funding research** — search grants, loans and direct payments by program, recipient and geography for funding intelligence.

### How to use

1. [Sign up for Apify](https://console.apify.com/sign-up) — the free plan is enough to try this actor.
2. Open the **USAspending Scraper**, choose a mode (**awards** or **recipients**), set your filters, and click **Start**.
3. Watch results stream into the dataset table as each record is parsed.
4. **Export** as JSON, CSV, Excel, XML, or RSS — or pull results programmatically via the [Apify API](https://docs.apify.com/api/v2).

### Input

```json
{
    "mode": "awards",
    "keywords": ["cybersecurity"],
    "awardCategories": ["contracts"],
    "timePeriodStart": "2024-01-01",
    "awardingAgencies": ["Department of Defense"],
    "naicsCodes": ["541512"],
    "includeAwardDetails": true,
    "maxResults": 200
}
````

- **mode** — `awards` (search federal awards) or `recipients` (search contractors for lead-gen).
- **keywords** — free-text match on award descriptions, recipients and IDs (awards mode).
- **awardCategories** — `contracts`, `idvs`, `grants`, `direct_payments`, `loans`, `other` (each queried separately).
- **timePeriodStart / timePeriodEnd** — action-date range (YYYY-MM-DD).
- **awardingAgencies** — top-tier agency names, e.g. `Department of Defense`.
- **naicsCodes / pscCodes** — industry / product-service code filters (contracts & IDVs).
- **recipientSearchText / recipientLocationStates / placeOfPerformanceStates / awardAmountMin / awardAmountMax** — extra award filters.
- **includeAwardDetails** *(default false)* — enrich every award with its full detail record (recipient address, executives, classifications, obligations).
- **recipientKeywords** *(recipients mode)* — contractor names to search; leave empty to list top recipients by federal dollars.
- **includeRecipientDetails** *(default true)* — enrich every recipient with address, business types, parent company and totals.
- **maxResults** — cap of award or recipient records.

### Output

Award records (`type: "award"`) in awards mode, recipient/contractor lead records (`type: "recipient"`) in recipients mode.

A recipient lead record (`type: "recipient"`):

```json
{
    "type": "recipient",
    "name": "PALANTIR TECHNOLOGIES INC.",
    "uei": "FSY4LVSBGWB7",
    "duns": "362130952",
    "totalAwardAmount": 420296739.98,
    "totalTransactions": 141,
    "address": "19505 BISCAYNE BLVD STE 2350",
    "city": "AVENTURA",
    "state": "FL",
    "zip": "33180",
    "businessTypes": ["category_business", "other_than_small_business", "us_owned_business"],
    "alternateNames": ["PALANTIR USG  INC"],
    "leadScore": 61,
    "url": "https://www.usaspending.gov/recipient/1ea8a9a4-3726-3491-9040-66950bb67606-C/latest"
}
```

An award record (`type: "award"`) carries `awardId`, `awardCategory`, `recipientName`, `awardAmount`, `awardingAgency`/`awardingSubAgency`, `startDate`/`endDate`, `naicsCode`/`pscCode`, `placeOfPerformanceState` and `url` — and with `includeAwardDetails`, also recipient `recipientUei`/`recipientAddress`/`recipientBusinessCategories`, `executives` (name + compensation), `popCity`/`popState`, `naicsDescription`/`pscDescription`, `totalObligation`, `totalOutlay` and `subawardCount`.

Fields are `null` only when the government doesn't publish that value for a record — never because the scraper skipped them.

### Monitoring — get only new records

Turn on **monitorMode** to remember everything already returned and emit only **new** records each run:

- The actor stores seen award IDs and recipient IDs in a **named key-value store** (`monitorKey` keeps separate histories per saved search).
- On the next run, already-seen awards and contractors are skipped — you only get what's new (e.g. newly posted contracts in your NAICS, or new entrants to an agency).
- This is independent of, and works perfectly alongside, **[Apify Schedules](https://docs.apify.com/platform/schedules)**: the schedule triggers the run, monitoring mode dedupes the output.

### Automate & schedule

Run this actor on autopilot and pull results into your own stack:

- **[Apify API](https://docs.apify.com/api/v2)** — start runs, fetch datasets, and manage schedules over REST.
- **[apify-client for JavaScript](https://docs.apify.com/api/client/js/)** and **[apify-client for Python](https://docs.apify.com/api/client/python/)** — official SDKs.
- **[Schedules](https://docs.apify.com/platform/schedules)** — run it daily/weekly to track new awards in your NAICS, agency or keyword.
- **[Webhooks](https://docs.apify.com/platform/integrations/webhooks)** — trigger downstream actions (CRM import, Slack alert, capture workflow) the moment a run finishes.

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'MY_APIFY_TOKEN' });

const run = await client.actor('scrapesage/usaspending-scraper').call({
    mode: 'recipients',
    recipientKeywords: ['cloud', 'cybersecurity'],
    includeRecipientDetails: true,
    maxResults: 200,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Got ${items.length} federal contractor leads`);
```

### Integrate with any app

Connect the dataset to 5,000+ apps — no code required:

- **[Make](https://docs.apify.com/platform/integrations/make)** — multi-step automation scenarios.
- **[Zapier](https://docs.apify.com/platform/integrations/zapier)** — push new contractor leads straight into your CRM.
- **[Slack](https://docs.apify.com/platform/integrations/slack)** — get notified when a monitored search finds new awards.
- **[Google Drive / Sheets](https://docs.apify.com/platform/integrations/drive)** — auto-export every run to a spreadsheet.
- **[Airbyte](https://docs.apify.com/platform/integrations/airbyte)** — pipe results into your data warehouse.
- **[GitHub](https://docs.apify.com/platform/integrations/github)** — trigger runs from commits or releases.

### Use with AI assistants (MCP)

The output is clean, LLM-ready JSON. Call this actor from Claude, ChatGPT, or any agent framework through the **[Apify MCP server](https://docs.apify.com/platform/integrations/mcp)** — ask your assistant to "find the top cybersecurity contractors for the Department of Defense with their addresses and total federal dollars" and let it run this scraper for you.

### Agent-ready: autonomous payments (x402 & Skyfire)

This actor is **agent-ready** — AI agents can discover it, run it, and **pay for it autonomously**, with no Apify account and no human in the loop. It uses [pay-per-event](https://docs.apify.com/platform/actors/publishing/monetize/pay-per-event) pricing and [limited permissions](https://docs.apify.com/platform/actors/development/permissions), so it qualifies for Apify's agentic-payment standards:

- **[x402](https://docs.apify.com/platform/integrations/x402)** — an open, HTTP-native payment protocol. Agents pay per run in USDC on the Base network directly through the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp) — no account, no API key.
- **[Skyfire](https://docs.apify.com/platform/integrations/skyfire)** — agent-to-service payments for fully autonomous AI-agent workflows.

Building an AI agent, MCP tool, or autonomous data pipeline? This scraper is ready to plug in and pay as it goes.

### More scrapers from scrapesage

Build a complete **government, B2B & competitive-intelligence stack**:

- **[SAM.gov Scraper](https://apify.com/scrapesage/sam-gov-scraper)** — federal contract *opportunities* and contacts (the pre-award sibling to this awards data).
- **[Bark Listing Scraper](https://apify.com/scrapesage/bark-listing-scraper)** — service-provider leads from Bark.
- **[LinkedIn Jobs Scraper](https://apify.com/scrapesage/linkedin-jobs-scraper)** — job postings as hiring-intent signals.
- **[Multi-ATS Job Scraper](https://apify.com/scrapesage/multi-ats-job-scraper)** — jobs from Greenhouse, Lever, Ashby, Workday & more.
- **[Facebook Ad Library Scraper](https://apify.com/scrapesage/facebook-ad-library-scraper)** — competitor ad intelligence on Meta & Instagram.
- **[Google Ads Transparency Scraper](https://apify.com/scrapesage/google-ads-transparency-scraper)** — who's advertising what on Google.
- **[Telegram Scraper](https://apify.com/scrapesage/telegram-scraper)** — channels, messages, media & search.
- **[Eventbrite Scraper](https://apify.com/scrapesage/eventbrite-scraper)** — events plus organizer leads.

### Tips

- **Mix categories carefully**: each award category (contracts, grants, loans…) is queried separately and merged, so selecting several pulls from each — `maxResults` is the global cap.
- **Lead quality**: keep `includeRecipientDetails`/`includeAwardDetails` on to capture addresses, business types and executives — it's the difference between a name and a contactable, qualified lead.
- **Narrow big searches**: combine `naicsCodes`/`pscCodes`, `awardingAgencies` and a `timePeriodStart` to focus on your market; USAspending caps deep pagination, so filtering beats scrolling.
- **Recurring monitoring**: combine `monitorMode` + [Schedules](https://docs.apify.com/platform/schedules) to capture only newly posted awards or new contractors.
- **Rate limits**: USAspending throttles heavy use — keep `maxConcurrency` modest (the default is fine).

### FAQ

**How do I find contractors in a specific industry?** Use awards mode with `naicsCodes`/`pscCodes` (and optionally an agency or keyword), or recipients mode with `recipientKeywords`. Turn on detail to get addresses and business types.

**Does it need an API key or login?** No. USAspending.gov is official US-government open data — this actor reads its public JSON API with no key, no account and no browser.

**Where does the contact/address data come from?** Directly from USAspending's public award and recipient records (registered recipient address, UEI/DUNS, business types and, for awards, the named executives the government discloses). No private data is used.

**Can I export to Google Sheets, CSV, or Excel?** Yes — one click in the dataset view, or automatically on every run via the [Google Drive integration](https://docs.apify.com/platform/integrations/drive).

**How do I monitor new federal awards automatically?** Turn on `monitorMode`, create a [Schedule](https://docs.apify.com/platform/schedules), and optionally add a [webhook](https://docs.apify.com/platform/integrations/webhooks) — you'll get only the new records each run.

**A field is null — why?** Some awards and recipients don't publish every field (e.g. executives are only disclosed above certain thresholds). Fields are `null` only when the data doesn't exist, not because the scraper skipped them.

**Is scraping USAspending legal?** This actor collects publicly available US-government open data only. You are responsible for using the data in compliance with applicable laws and the site's terms.

### Need help?

Open an issue on the actor's **Issues** tab, or visit the [Apify help center](https://help.apify.com/). Feature requests are welcome — this actor is actively maintained.

# Actor input Schema

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

<code>awards</code> = search federal awards (contracts, grants, loans…). <code>recipients</code> = search government contractors/recipients for lead generation.

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

Free-text keywords to match award descriptions, recipients and identifiers, e.g. <code>cybersecurity</code>, <code>cloud migration</code>. Awards mode only.

## `awardCategories` (type: `array`):

Which award groups to search (each is queried separately): <code>contracts</code>, <code>idvs</code>, <code>grants</code>, <code>direct\_payments</code>, <code>loans</code>, <code>other</code>. Awards mode only.

## `timePeriodStart` (type: `string`):

Only awards with action on/after this date (YYYY-MM-DD). Defaults to FY2008 start.

## `timePeriodEnd` (type: `string`):

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

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

Filter by top-tier awarding agency name exactly as USAspending lists it, e.g. <code>Department of Defense</code>, <code>Department of Health and Human Services</code>. Awards mode only.

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

Filter contracts/IDVs by NAICS industry code(s), e.g. <code>541512</code>. Awards mode only.

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

Filter contracts/IDVs by Product/Service Code(s), e.g. <code>D310</code>. Awards mode only.

## `recipientSearchText` (type: `array`):

Limit awards to recipients whose name matches, e.g. <code>lockheed</code>. Awards mode only.

## `recipientLocationStates` (type: `array`):

Two-letter US state codes for the recipient's location, e.g. <code>CA</code>, <code>VA</code>. Awards mode only.

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

Two-letter US state codes for where the work is performed, e.g. <code>TX</code>. Awards mode only.

## `awardAmountMin` (type: `integer`):

Only awards at or above this dollar amount. Awards mode only.

## `awardAmountMax` (type: `integer`):

Only awards at or below this dollar amount. Awards mode only.

## `sortAwardsBy` (type: `string`):

Field to sort awards by (descending).

## `includeAwardDetails` (type: `boolean`):

For every award, fetch the full detail record: recipient UEI/address & business categories, named executives & compensation, place & period of performance, NAICS/PSC descriptions, obligations and sub-award totals. One extra request per award.

## `recipientKeywords` (type: `array`):

Names to search government recipients/contractors by, e.g. <code>lockheed</code>, <code>palantir</code>. Leave empty to list the top recipients by federal dollars. Recipients mode only.

## `recipientAwardType` (type: `string`):

Which spending to rank recipients by. Recipients mode only.

## `includeRecipientDetails` (type: `boolean`):

For every recipient, fetch its full profile: registered address, UEI/DUNS, parent company, alternate names/subsidiaries, business types (small business, woman/veteran-owned, 8(a), HUBZone…) and total federal transactions. One extra request per recipient.

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

Maximum number of award or recipient records to return.

## `monitorMode` (type: `boolean`):

Remember awards/recipients already returned in previous runs (in a named key-value store) and emit only NEW ones each run. Works alongside Apify Schedules — schedule the run, this dedupes the output.

## `monitorKey` (type: `string`):

Name for the monitoring memory. Use a distinct key per saved search so their 'seen' histories stay separate.

## `maxConcurrency` (type: `integer`):

Parallel detail requests. USAspending rate-limits heavy use — keep this modest.

## `proxyConfiguration` (type: `object`):

Proxy settings. The default Apify Proxy is enough — USAspending.gov is open government data with no anti-bot.

## Actor input object example

```json
{
  "mode": "awards",
  "keywords": [
    "cybersecurity"
  ],
  "awardCategories": [
    "contracts"
  ],
  "sortAwardsBy": "Award Amount",
  "includeAwardDetails": false,
  "recipientAwardType": "all",
  "includeRecipientDetails": true,
  "maxResults": 100,
  "monitorMode": false,
  "monitorKey": "default",
  "maxConcurrency": 6,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

All scraped award and recipient records as JSON items in the default dataset.

# 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"
    ],
    "awardCategories": [
        "contracts"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapesage/usaspending-scraper").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"],
    "awardCategories": ["contracts"],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("scrapesage/usaspending-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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"
  ],
  "awardCategories": [
    "contracts"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call scrapesage/usaspending-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=scrapesage/usaspending-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "USAspending Scraper - Federal Awards, Contractors & Leads",
        "description": "Scrape USAspending.gov: search federal awards (contracts, grants, loans), pull full award detail (recipient, executives, place of performance, NAICS/PSC), and build US-government contractor & vendor leads with addresses and business types. Monitoring mode. No API key, no browser.",
        "version": "0.1",
        "x-build-id": "1v38D0ebbONAWh1i2"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scrapesage~usaspending-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scrapesage-usaspending-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/scrapesage~usaspending-scraper/runs": {
            "post": {
                "operationId": "runs-sync-scrapesage-usaspending-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/scrapesage~usaspending-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-scrapesage-usaspending-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "awards",
                            "recipients"
                        ],
                        "type": "string",
                        "description": "<code>awards</code> = search federal awards (contracts, grants, loans…). <code>recipients</code> = search government contractors/recipients for lead generation.",
                        "default": "awards"
                    },
                    "keywords": {
                        "title": "Keywords",
                        "type": "array",
                        "description": "Free-text keywords to match award descriptions, recipients and identifiers, e.g. <code>cybersecurity</code>, <code>cloud migration</code>. Awards mode only.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "awardCategories": {
                        "title": "Award categories",
                        "type": "array",
                        "description": "Which award groups to search (each is queried separately): <code>contracts</code>, <code>idvs</code>, <code>grants</code>, <code>direct_payments</code>, <code>loans</code>, <code>other</code>. Awards mode only.",
                        "default": [
                            "contracts"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "timePeriodStart": {
                        "title": "Action date from",
                        "type": "string",
                        "description": "Only awards with action on/after this date (YYYY-MM-DD). Defaults to FY2008 start."
                    },
                    "timePeriodEnd": {
                        "title": "Action date to",
                        "type": "string",
                        "description": "Only awards with action on/before this date (YYYY-MM-DD). Defaults to today."
                    },
                    "awardingAgencies": {
                        "title": "Awarding agencies",
                        "type": "array",
                        "description": "Filter by top-tier awarding agency name exactly as USAspending lists it, e.g. <code>Department of Defense</code>, <code>Department of Health and Human Services</code>. Awards mode only.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "naicsCodes": {
                        "title": "NAICS codes",
                        "type": "array",
                        "description": "Filter contracts/IDVs by NAICS industry code(s), e.g. <code>541512</code>. Awards mode only.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "pscCodes": {
                        "title": "PSC codes",
                        "type": "array",
                        "description": "Filter contracts/IDVs by Product/Service Code(s), e.g. <code>D310</code>. Awards mode only.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "recipientSearchText": {
                        "title": "Recipient name contains",
                        "type": "array",
                        "description": "Limit awards to recipients whose name matches, e.g. <code>lockheed</code>. Awards mode only.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "recipientLocationStates": {
                        "title": "Recipient states",
                        "type": "array",
                        "description": "Two-letter US state codes for the recipient's location, e.g. <code>CA</code>, <code>VA</code>. Awards mode only.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "placeOfPerformanceStates": {
                        "title": "Place-of-performance states",
                        "type": "array",
                        "description": "Two-letter US state codes for where the work is performed, e.g. <code>TX</code>. Awards mode only.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "awardAmountMin": {
                        "title": "Min award amount (USD)",
                        "type": "integer",
                        "description": "Only awards at or above this dollar amount. Awards mode only."
                    },
                    "awardAmountMax": {
                        "title": "Max award amount (USD)",
                        "type": "integer",
                        "description": "Only awards at or below this dollar amount. Awards mode only."
                    },
                    "sortAwardsBy": {
                        "title": "Sort awards by",
                        "enum": [
                            "Award Amount",
                            "Start Date",
                            "End Date"
                        ],
                        "type": "string",
                        "description": "Field to sort awards by (descending).",
                        "default": "Award Amount"
                    },
                    "includeAwardDetails": {
                        "title": "Include full award detail",
                        "type": "boolean",
                        "description": "For every award, fetch the full detail record: recipient UEI/address & business categories, named executives & compensation, place & period of performance, NAICS/PSC descriptions, obligations and sub-award totals. One extra request per award.",
                        "default": false
                    },
                    "recipientKeywords": {
                        "title": "Recipient keywords",
                        "type": "array",
                        "description": "Names to search government recipients/contractors by, e.g. <code>lockheed</code>, <code>palantir</code>. Leave empty to list the top recipients by federal dollars. Recipients mode only.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "recipientAwardType": {
                        "title": "Recipient award type",
                        "enum": [
                            "all",
                            "contracts",
                            "grants",
                            "direct_payments",
                            "loans",
                            "other"
                        ],
                        "type": "string",
                        "description": "Which spending to rank recipients by. Recipients mode only.",
                        "default": "all"
                    },
                    "includeRecipientDetails": {
                        "title": "Include recipient detail (address, business types)",
                        "type": "boolean",
                        "description": "For every recipient, fetch its full profile: registered address, UEI/DUNS, parent company, alternate names/subsidiaries, business types (small business, woman/veteran-owned, 8(a), HUBZone…) and total federal transactions. One extra request per recipient.",
                        "default": true
                    },
                    "maxResults": {
                        "title": "Max results",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of award or recipient records to return.",
                        "default": 100
                    },
                    "monitorMode": {
                        "title": "Monitoring mode — only new records",
                        "type": "boolean",
                        "description": "Remember awards/recipients already returned in previous runs (in a named key-value store) and emit only NEW ones each run. Works alongside Apify Schedules — schedule the run, this dedupes the output.",
                        "default": false
                    },
                    "monitorKey": {
                        "title": "Monitor key",
                        "type": "string",
                        "description": "Name for the monitoring memory. Use a distinct key per saved search so their 'seen' histories stay separate.",
                        "default": "default"
                    },
                    "maxConcurrency": {
                        "title": "Max concurrency",
                        "minimum": 1,
                        "maximum": 12,
                        "type": "integer",
                        "description": "Parallel detail requests. USAspending rate-limits heavy use — keep this modest.",
                        "default": 6
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Proxy settings. The default Apify Proxy is enough — USAspending.gov is open government data with no anti-bot.",
                        "default": {
                            "useApifyProxy": true
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
