# USASpending.gov Scraper — Federal Awards & Contracts (`hipersoft/usaspending-scraper`) Actor

Search US federal spending: contracts, grants, loans and direct payments by keyword, agency, date and amount. Get recipient, amount, agency, description, dates and location. For gov-contractor and grant intelligence. No setup.

- **URL**: https://apify.com/hipersoft/usaspending-scraper.md
- **Developed by:** [Hipersoft](https://apify.com/hipersoft) (community)
- **Categories:** Lead generation
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.001 / award scraped

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

## USASpending.gov Scraper — Federal Awards, Contracts, Grants & Loans

Search the US government's official spending database and get federal awards back as clean, structured JSON. Query contracts, grants, loans, direct payments or other financial assistance by keyword, awarding agency, date range and minimum amount — then pull recipient, amount, agency, description, dates and place of performance for each award. Built for government-contractor intelligence, grant research and competitive analysis.

![USASpending.gov Scraper input — award type, keywords, agency and date range in the Apify Console](https://api.apify.com/v2/key-value-stores/SUfvnaFLd9z9eBCtV/records/usaspending-scraper-input.png?v=2)

### Features

- 🏛️ **Every award type** — switch `awardType` between `contracts`, `grants`, `loans`, `direct_payments` and `other`.
- 🔍 **Keyword search** — match recipient names and award descriptions with `keywords` like `software` or `cybersecurity`.
- 🏢 **Agency filtering** — narrow to top-tier awarding agencies such as `Department of Defense` or `National Aeronautics and Space Administration`.
- 📅 **Date range** — bound results by award action date with `fromDate` / `toDate` (defaults to today).
- 💵 **Minimum amount** — set `minAmount` to focus on material awards only.
- 📊 **Sorted by value** — awards come back largest-first, so a `maxResults` cap keeps the biggest ones.
- 🔗 **Direct links** — each record includes a `url` back to the award page on USASpending.gov.

### What you get

![USASpending.gov Scraper output example — federal awards with recipient, amount and agency as structured JSON](https://api.apify.com/v2/key-value-stores/SUfvnaFLd9z9eBCtV/records/usaspending-scraper-output.png?v=5)

One flat JSON record per award:

```json
{
  "awardId": "W52P1J-23-C-0001",
  "recipientName": "EXAMPLE DEFENSE SYSTEMS INC.",
  "awardAmount": 48250000,
  "awardType": "DEFINITIVE CONTRACT",
  "description": "CYBERSECURITY SOFTWARE AND SUPPORT SERVICES",
  "awardingAgency": "Department of Defense",
  "awardingSubAgency": "Department of the Army",
  "startDate": "2023-03-15",
  "endDate": "2026-03-14",
  "placeOfPerformanceState": "VA",
  "internalId": 123456789,
  "url": "https://www.usaspending.gov/award/CONT_AWD_W52P1J23C0001"
}
```

#### Output schema

| Field | Type | Description |
|-------|------|-------------|
| `awardId` | string | The federal award identifier (PIID or FAIN). |
| `recipientName` | string | Name of the award recipient. |
| `awardAmount` | number | Total award amount in USD. |
| `awardType` | string | Type of award (e.g. `DEFINITIVE CONTRACT`, grant). |
| `description` | string | Description of the award. |
| `awardingAgency` | string | Top-tier awarding agency. |
| `awardingSubAgency` | string | Awarding sub-agency. |
| `startDate` | string | Award period start date. |
| `endDate` | string | Award period end date. |
| `placeOfPerformanceState` | string | US state where the work is performed. |
| `internalId` | integer | USASpending internal record ID. |
| `url` | string (URL) | Link to the award page on USASpending.gov. |

### Input

```json
{
  "awardType": "contracts",
  "keywords": ["cybersecurity"],
  "agencies": ["Department of Defense"],
  "fromDate": "2022-01-01",
  "toDate": "",
  "minAmount": 1000000,
  "maxResults": 500
}
```

| Field | Description |
| --- | --- |
| `awardType` | Category of federal awards: `contracts`, `grants`, `loans`, `direct_payments` or `other`. |
| `keywords` | Search recipient names / award descriptions. Empty = all awards of the type in range. |
| `agencies` | Filter by top-tier awarding agency name. |
| `fromDate` | Award action date lower bound (YYYY-MM-DD). |
| `toDate` | Award action date upper bound (YYYY-MM-DD). Empty = today. |
| `minAmount` | Only include awards of at least this amount (USD). |
| `maxResults` | Maximum awards to collect (1–10000). |

### Use cases

- Track federal contracts in your sector to find prime and subcontract opportunities.
- Monitor grants and financial assistance for a target agency or program.
- Build competitor intelligence on which recipients win large government awards.
- Feed award data into market-sizing, forecasting or lobbying research.

### Pricing

Pay-per-event: you're billed a small amount per run and per item scraped — you only pay for what you get. See the **Pricing** tab for current rates.

### FAQ

**How many awards can I get per run?**
Set `maxResults` anywhere from 1 to 10,000. Awards are returned largest-first by amount, so a cap always keeps the biggest, most material awards.

**How fresh is the data?**
It reflects USASpending.gov's official database at run time. Federal spending records are updated by the government on their own schedule, so recency depends on when agencies report each award.

**Is the data official?**
Yes — it comes directly from USASpending.gov, the US government's official federal spending source. This Actor is an independent tool and is not affiliated with or endorsed by USASpending.gov or the US federal government.

**What's the output format?**
Flat JSON, one record per award, with recipient, amount, agency, description, dates, place of performance and a direct `url` to the award page. Export as JSON, CSV or Excel.

**Can I integrate this with other tools?**
The USASpending.gov Scraper can be connected with almost any cloud service or web app thanks to [integrations on the Apify platform](https://apify.com/integrations). It works with [Make](https://apify.com/integrations/make), [Zapier](https://apify.com/integrations/zapier), [Slack](https://docs.apify.com/platform/integrations/slack), [Airbyte](https://docs.apify.com/platform/integrations/airbyte), [GitHub](https://docs.apify.com/platform/integrations/github), [Google Drive](https://docs.apify.com/platform/integrations/drive) and [many more](https://apify.com/integrations), plus the [Apify API](https://docs.apify.com/api/v2), JavaScript/Python clients and MCP. Or use [webhooks](https://docs.apify.com/platform/integrations/webhooks) to trigger an action whenever a run finishes.

### Related Actors

More government and regulatory data scrapers from the same publisher:

- [SEC EDGAR Filings Scraper](https://apify.com/hipersoft/sec-edgar-scraper) — 10-K, 10-Q and 8-K filings by ticker or CIK.
- [openFDA Scraper](https://apify.com/hipersoft/openfda-scraper) — FDA drug, device and food recalls, labels and adverse events.
- [Brazil CNPJ Scraper](https://apify.com/hipersoft/brazil-cnpj-scraper) — official Brazilian company records from Receita Federal.
- [ClinicalTrials Scraper](https://apify.com/hipersoft/clinicaltrials-scraper) — clinical study records from ClinicalTrials.gov.

### Notes

This Actor reads the official public USASpending.gov data. It is an independent tool and is not affiliated with or endorsed by USASpending.gov or the US federal government; all trademarks belong to their respective owners.

# Actor input Schema

## `awardType` (type: `string`):

Which category of federal awards to search.

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

Search recipient names / award descriptions. Empty = all awards of the type in the date range.

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

Filter by top-tier awarding agency name, e.g. "Department of Defense", "National Aeronautics and Space Administration".

## `fromDate` (type: `string`):

Award action date lower bound (YYYY-MM-DD).

## `toDate` (type: `string`):

Award action date upper bound (YYYY-MM-DD). Empty = today.

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

Only include awards of at least this amount.

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

Maximum awards to collect.

## Actor input object example

```json
{
  "awardType": "contracts",
  "keywords": [
    "software",
    "cybersecurity"
  ],
  "agencies": [
    "Department of Defense"
  ],
  "fromDate": "2020-01-01",
  "toDate": "",
  "minAmount": 0,
  "maxResults": 100
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("hipersoft/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 = {}

# Run the Actor and wait for it to finish
run = client.actor("hipersoft/usaspending-scraper").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 '{}' |
apify call hipersoft/usaspending-scraper --silent --output-dataset

```

## MCP server setup

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

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/JThnwrrl9TyD76PdQ/builds/6zt4wmGcEOobPnwpM/openapi.json
