# 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 key.

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

## Pricing

from $0.0008 / 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.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#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

## 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. **No account, no API key.** Built for government-contractor intelligence, grant research and competitive analysis.

### 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

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"
}
```

### 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

**Do I need an API key or account?**
No. The Actor uses the official public [USASpending.gov](https://www.usaspending.gov) API v2 (api.usaspending.gov), which is free and open — no login, no key.

**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.

### 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 uses the official public USASpending.gov API v2 (api.usaspending.gov). 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("💾 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 '{}' |
apify call hipersoft/usaspending-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/JThnwrrl9TyD76PdQ/builds/0b8QLAKahXD6O0KHL/openapi.json
