# USASpending.gov Federal Awards Scraper (`logiover/usaspending-gov-scraper`) Actor

Scrape US federal contracts, grants and awards from the official USASpending.gov API — no login, no API key, no blocking. Award ID, recipient, amount, agency, dates and place of performance. Filter by type, date and keyword. Hundreds of thousands of awards per run.

- **URL**: https://apify.com/logiover/usaspending-gov-scraper.md
- **Developed by:** [Logiover](https://apify.com/logiover) (community)
- **Categories:** Lead generation, Automation
- **Stats:** 4 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.50 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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.gov Federal Awards Scraper — US Contracts, Grants & Awards to JSON & CSV

Scrape **US federal contracts, grants, loans and direct payments** straight from the **official USASpending.gov API**. This USASpending scraper covers every federal award — trillions of dollars in spending — with recipient, amount, outlays, award type, agency, dates and place of performance. **No login, no API key, no blocking** — one run can return hundreds of thousands of award records. Export federal spending data to JSON, CSV or Excel.

Because it runs on the official U.S. Treasury API, the data is authoritative and the Actor doesn't break when websites change layout. It's built for GovCon business development, B2B lead generation, market intelligence and watchdog research.

### ✨ What this Actor does / Key features

- 🏛️ **Official U.S. Treasury API** — authoritative, reliable data straight from USASpending.gov, never blocked.
- 🔑 **No API key needed** — just configure your filters and run.
- 💰 **Massive coverage** — every federal contract, grant, loan and direct payment, fully paginated; a single run can return hundreds of thousands of records.
- 📋 **Rich data per award** — award ID, recipient, award amount, total outlays, award type, description, start/end dates, awarding agency and sub-agency, and place of performance.
- 🔎 **Powerful filters** — by award type, action date range and free-text keyword.
- 🎯 **Flexible scope** — set `maxAwards` to `0` to pull every matching award, or cap it for a smaller, faster run.
- ⏰ **Built for scheduling** — new awards post daily, so a rolling date range keeps an always-current feed.
- 📦 **Export-ready output** — flat JSON downloadable as CSV, Excel, JSON or XML, with a pre-built Federal Awards dataset view.

### 🔍 Input

| Field | Type | Description |
|---|---|---|
| `awardTypes` | array of strings | Which award types to scrape: `contracts`, `grants`, `direct-payments`, `loans`, `other`. Prefilled with `["contracts"]`. |
| `startDate` | string | Earliest award action date (`YYYY-MM-DD`). Leave empty for the last 12 months. |
| `endDate` | string | Latest award action date (`YYYY-MM-DD`). Leave empty for today. |
| `keyword` | string | Free-text keyword to filter awards by recipient, description or agency. Leave empty for all. |
| `maxAwards` | integer | Maximum number of awards to save. `0` = all matching (can be hundreds of thousands). |

### 🚀 Example input

```json
{
  "awardTypes": ["contracts", "grants"],
  "startDate": "2025-01-01",
  "endDate": "2026-05-14",
  "keyword": "cybersecurity",
  "maxAwards": 10000
}
````

### 📦 Output

One Apify dataset record per federal award. Records are flat JSON and can be exported to CSV, Excel, JSON or XML, or pulled via the Apify API. A pre-built **Federal Awards** dataset view shows the key columns.

| Field | Description |
|---|---|
| `awardId` | Federal award identifier |
| `recipientName` | Name of the award recipient |
| `awardAmount` | Total obligated award amount |
| `totalOutlays` | Total outlays paid out so far |
| `awardType` | Award type (contract, grant, loan, direct payment, other) |
| `description` | Award description / purpose |
| `startDate` | Award period start date |
| `endDate` | Award period end date |
| `awardingAgency` | Federal agency that issued the award |
| `awardingSubAgency` | Sub-agency that issued the award |
| `placeOfPerformanceState` | State where the work is performed |
| `placeOfPerformanceCountry` | Country where the work is performed |
| `url` | Link to the award detail page on USASpending.gov |
| `scrapedAt` | ISO-8601 scrape timestamp |

### 💡 Use cases

- **GovCon business development** — see who is winning federal contracts, by agency, recipient and dollar amount.
- **B2B sales & lead generation** — build prospect lists of federal contractors and grant recipients for outreach.
- **Market & competitive intelligence** — track federal spending trends by agency, program and recipient over time.
- **Journalists & watchdogs** — analyze where federal money goes at scale and surface notable awards.
- **Researchers & analysts** — study federal procurement patterns, geographic distribution and agency budgets.
- **Subcontracting & teaming** — identify prime awardees to approach for partnership opportunities.

### ❓ Frequently Asked Questions

**Is this Actor allowed / legal?**
Yes. USASpending.gov publishes federal award data as public information through an official open API, and this Actor reads only that public data. Use it freely and responsibly.

**Do I need an API key or login?**
No. The USASpending.gov API is public and unauthenticated — no API key, no login and no proxy required.

**How much data can I get in one run?**
The Actor is fully paginated and can return hundreds of thousands of award records in a single run. Set `maxAwards` to `0` for everything matching your filters, or cap it for a faster run.

**Which award types can I scrape?**
Contracts, grants, direct payments, loans and "other" — pick any combination via the `awardTypes` input.

**Can I filter by date or keyword?**
Yes. Use `startDate` / `endDate` to bound the award action date range, and `keyword` to filter by recipient, description or agency text.

**Can I schedule it for an always-fresh database?**
Yes. New federal awards post daily — schedule the Actor with a rolling date range to keep a continuously updated awards dataset.

**What output formats are supported?**
Every run produces a structured dataset you can export to JSON, CSV, Excel or XML, or access through the Apify API.

### ⏰ Scheduling & integration

Schedule this Actor on Apify to keep an always-fresh federal awards database with a rolling date range. Export results to JSON, CSV or Excel, or use the Apify API and webhooks to push new awards into Google Sheets, a CRM, a database or a BI dashboard.

# Actor input Schema

## `awardTypes` (type: `array`):

Which award types to scrape: 'contracts', 'grants', 'direct-payments', 'loans', 'other'.

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

Earliest award action date (YYYY-MM-DD). Leave empty for the last 12 months.

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

Latest award action date (YYYY-MM-DD). Leave empty for today.

## `keyword` (type: `string`):

Free-text keyword to filter awards (recipient, description, agency). Leave empty for all.

## `maxAwards` (type: `integer`):

Maximum awards to save. 0 = all matching (can be hundreds of thousands).

## Actor input object example

```json
{
  "awardTypes": [
    "contracts"
  ],
  "startDate": "",
  "endDate": "",
  "keyword": ""
}
```

# Actor output Schema

## `awardId` (type: `string`):

awardId

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

recipientName

## `awardAmount` (type: `string`):

awardAmount

## `awardingAgency` (type: `string`):

awardingAgency

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

awardType

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

startDate

## `placeOfPerformanceState` (type: `string`):

placeOfPerformanceState

# 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 = {
    "awardTypes": [
        "contracts"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("logiover/usaspending-gov-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 = { "awardTypes": ["contracts"] }

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

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "USASpending.gov Federal Awards Scraper",
        "description": "Scrape US federal contracts, grants and awards from the official USASpending.gov API — no login, no API key, no blocking. Award ID, recipient, amount, agency, dates and place of performance. Filter by type, date and keyword. Hundreds of thousands of awards per run.",
        "version": "0.0",
        "x-build-id": "6iFWhAzKJsgWtJmPp"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/logiover~usaspending-gov-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-logiover-usaspending-gov-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/logiover~usaspending-gov-scraper/runs": {
            "post": {
                "operationId": "runs-sync-logiover-usaspending-gov-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/logiover~usaspending-gov-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-logiover-usaspending-gov-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": {
                    "awardTypes": {
                        "title": "Award Types",
                        "type": "array",
                        "description": "Which award types to scrape: 'contracts', 'grants', 'direct-payments', 'loans', 'other'.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "startDate": {
                        "title": "Start Date",
                        "type": "string",
                        "description": "Earliest award action date (YYYY-MM-DD). Leave empty for the last 12 months.",
                        "default": ""
                    },
                    "endDate": {
                        "title": "End Date",
                        "type": "string",
                        "description": "Latest award action date (YYYY-MM-DD). Leave empty for today.",
                        "default": ""
                    },
                    "keyword": {
                        "title": "Keyword",
                        "type": "string",
                        "description": "Free-text keyword to filter awards (recipient, description, agency). Leave empty for all.",
                        "default": ""
                    },
                    "maxAwards": {
                        "title": "Max Awards",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum awards to save. 0 = all matching (can be hundreds of thousands)."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
