# USAspending Federal Awards Scraper (`nexgendata/usaspending-federal-awards-scraper`) Actor

Scrape federal contract and grant awards via USAspending.gov — Award ID, recipient, amount, agency, place of performance, dates, description. Filter by date range, agency, state, award type. Built for GovTech sales, federal contractors, compliance teams.

- **URL**: https://apify.com/nexgendata/usaspending-federal-awards-scraper.md
- **Developed by:** [Stephan Corbeil](https://apify.com/nexgendata) (community)
- **Categories:** Business, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $80.00 / 1,000 federal awards

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 Federal Awards Scraper — GovTech Sales Intel

Scrape U.S. federal contract and grant awards directly from USAspending.gov, the Treasury Department's official open spending feed. Filter by date range, awarding agency, state, and award type — get back structured rows with Award ID, recipient, amount, agency, place of performance, period of performance, and description.

Built for **GovTech sales teams** prospecting into federal-recipient companies, **federal contractors hunting RFP follow-ups**, **compliance and audit teams**, **lobbyist firms** mapping spending patterns, and **journalists** reporting on federal procurement.

### What you get per award

- `award_id` — USAspending's award identifier (PIID for contracts, FAIN for grants)
- `internal_id`, `generated_internal_id` — link directly into USAspending's award detail pages
- `recipient_name`, `recipient_uei` — vendor / grantee name and Unique Entity ID
- `award_amount_usd` — total obligated dollar amount
- `total_outlays_usd` — actual dollars disbursed to date
- `description` — agency-supplied description of work / purpose
- `awarding_agency`, `awarding_sub_agency` — top-tier and sub-tier awarding agency
- `funding_agency`, `funding_sub_agency` — top-tier and sub-tier funding agency
- `place_of_performance_state_code`, `place_of_performance_city_code`, `place_of_performance_country_code`, `place_of_performance_zip5`
- `period_of_performance_start_date`, `period_of_performance_current_end_date`
- `contract_award_type` (for contracts) — Definitive Contract, BPA Call, etc.
- `award_type` (for grants) — Project Grant, Formula Grant, etc.
- `naics`, `psc` — North American Industry Classification System code, Product/Service Code (contracts)
- `cfda_number` — Catalog of Federal Domestic Assistance program number (grants)
- `agency_slug` — URL-safe agency slug
- `award_category` — `contracts` / `grants` / `loans` / `other_financial_assistance`
- `source` — `"usaspending.gov"`

### Use cases

1. **GovTech sales prospecting** — find every recipient that won a $1M+ DoD contract last quarter; backfill into your CRM as ICP signal.
2. **Competitive intel** — track which companies are winning contracts in your market vertical (NAICS-filtered).
3. **Federal RFP follow-up** — recipients of recent definitive contracts often have follow-on procurement coming; ride the wave.
4. **Compliance / audit** — verify recipient UEIs against SAM.gov registrations.
5. **Lobbyist / advocacy research** — track grants to nonprofit recipients, mapped by state and agency.
6. **Journalism / FOIA prep** — surface high-dollar awards before filing FOIA for the underlying contract documents.

### Quick start

Input:

```json
{
  "dateFrom": "2025-01-01",
  "dateTo": "2025-01-31",
  "awardTypes": ["A", "B", "C", "D"],
  "maxAwards": 50
}
````

Sample output row:

```json
{
  "award_id": "ZN31",
  "recipient_name": "HPI FEDERAL LLC",
  "award_amount_usd": 463050.0,
  "description": "HPELITE DESKTOP PC ACCESSORIES, AND HP MONITOR FFP CHESS ORDER",
  "awarding_agency": "Department of Defense",
  "place_of_performance_state_code": "DC",
  "naics": "423430",
  "agency_slug": "department-of-defense",
  "award_category": "contracts",
  "source": "usaspending.gov"
}
```

### Run via Python (apify-client)

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("nexgendata/usaspending-federal-awards-scraper").call(
    run_input={
        "dateFrom": "2025-01-01",
        "dateTo": "2025-03-31",
        "agencyName": "Department of Defense",
        "state": "VA",
        "awardTypes": ["A", "B", "C", "D"],
        "maxAwards": 1000,
    }
)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["recipient_name"], "-", item["award_amount_usd"])
```

### Run via cURL

```bash
curl -X POST "https://api.apify.com/v2/acts/nexgendata~usaspending-federal-awards-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"dateFrom":"2025-01-01","dateTo":"2025-01-31","awardTypes":["A","B","C","D"],"maxAwards":50}'
```

### Integrations

- **Zapier** — fire on each new award, push to CRM as a new prospect signal.
- **Make.com** — chain into HubSpot / Salesforce on new award above a $-threshold.
- **n8n** — schedule daily, dedupe by `generated_internal_id`, push into Postgres for trend analysis.

### Pricing

Pay-per-event (PPE):

- **Actor start:** $0.00005 (negligible)
- **Per award:** **$0.08**

Cost calculator:

| Awards returned | Cost |
| --- | --- |
| 50 (smoke test) | $4.00 |
| 500 | $40.00 |
| 1,000 | $80.00 |
| 5,000 (full quarter, broad pull) | $400.00 |

GovTribe and BGov subscriptions start at thousands per seat per year; this actor charges per award you pull.

### FAQ

**Q: Does this include both contracts and grants?**
A: Yes — feed `awardTypes: ["A","B","C","D","02","03","04","05"]` to get both. Contracts are A/B/C/D; grants are 02/03/04/05.

**Q: What's the difference between Award Amount and Total Outlays?**
A: `award_amount_usd` is the total obligated. `total_outlays_usd` is dollars actually disbursed so far.

**Q: How fresh is the data?**
A: USAspending refreshes nightly from agency systems. New awards typically appear within 1–3 business days of action.

**Q: Can I filter by recipient name or NAICS?**
A: The current input doesn't expose those filters directly, but the API supports them. Open an issue if you need them and we'll add as named inputs.

**Q: Is this real-time?**
A: No — USAspending lags by 1–3 business days. For trading-grade real-time, see SAM.gov contract opportunities (different actor coming).

**Q: Why are some descriptions ALL-CAPS / cryptic?**
A: That's the agency-supplied text as-filed. Defense awards in particular use heavily abbreviated descriptions; the AwardID + recipient combo is usually enough to look up the underlying solicitation.

### Related actors

- [SEC Form D Private Placement Tracker](https://apify.com/nexgendata/sec-form-d-scraper) — same buyer pool (B2B intel teams), private-funding side.
- [FEC Independent Expenditures Scraper](https://apify.com/nexgendata/fec-independent-expenditures-scraper) — federal political-finance data.
- [Yelp Business Scraper](https://apify.com/nexgendata/yelp-scraper) — pair with USAspending recipient lookups for full B2B context.

***

Built and maintained by [NexGenData](https://apify.com/nexgendata?fpr=2ayu9b) — affordable, focused web scrapers for B2B data teams.

# Actor input Schema

## `dateFrom` (type: `string`):

Inclusive start date for the award action-date window. USAspending data goes back to FY 2008.

## `dateTo` (type: `string`):

Inclusive end date for the award action-date window. Use a 1–3 month window for narrow research; a fiscal year for bulk pulls.

## `agencyName` (type: `string`):

Top-tier agency name as USAspending displays it (e.g. 'Department of Defense', 'Department of Health and Human Services', 'National Aeronautics and Space Administration'). Leave blank for all agencies.

## `state` (type: `string`):

2-letter US state code to restrict awards by place of performance (e.g. 'CA', 'TX', 'VA'). Leave blank for all states.

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

Award type codes to include. Contracts: A, B, C, D. Grants: 02, 03, 04, 05. Loans: 07, 08. Other financial assistance: 06, 09, 10, 11. Default is contracts only.

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

Maximum number of awards to return (1–5000). USAspending's spending\_by\_award endpoint paginates 100 per request.

## Actor input object example

```json
{
  "dateFrom": "2025-01-01",
  "dateTo": "2025-01-31",
  "awardTypes": [
    "A",
    "B",
    "C",
    "D"
  ],
  "maxAwards": 50
}
```

# 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 = {
    "dateFrom": "2025-01-01",
    "dateTo": "2025-01-31",
    "agencyName": "",
    "state": "",
    "awardTypes": [
        "A",
        "B",
        "C",
        "D"
    ],
    "maxAwards": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("nexgendata/usaspending-federal-awards-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 = {
    "dateFrom": "2025-01-01",
    "dateTo": "2025-01-31",
    "agencyName": "",
    "state": "",
    "awardTypes": [
        "A",
        "B",
        "C",
        "D",
    ],
    "maxAwards": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("nexgendata/usaspending-federal-awards-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 '{
  "dateFrom": "2025-01-01",
  "dateTo": "2025-01-31",
  "agencyName": "",
  "state": "",
  "awardTypes": [
    "A",
    "B",
    "C",
    "D"
  ],
  "maxAwards": 50
}' |
apify call nexgendata/usaspending-federal-awards-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "USAspending Federal Awards Scraper",
        "description": "Scrape federal contract and grant awards via USAspending.gov — Award ID, recipient, amount, agency, place of performance, dates, description. Filter by date range, agency, state, award type. Built for GovTech sales, federal contractors, compliance teams.",
        "version": "0.0",
        "x-build-id": "K1r0Uycwd8MKh9iZQ"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/nexgendata~usaspending-federal-awards-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-nexgendata-usaspending-federal-awards-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/nexgendata~usaspending-federal-awards-scraper/runs": {
            "post": {
                "operationId": "runs-sync-nexgendata-usaspending-federal-awards-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/nexgendata~usaspending-federal-awards-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-nexgendata-usaspending-federal-awards-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",
                "required": [
                    "dateFrom",
                    "dateTo"
                ],
                "properties": {
                    "dateFrom": {
                        "title": "Action / award date — from (YYYY-MM-DD)",
                        "type": "string",
                        "description": "Inclusive start date for the award action-date window. USAspending data goes back to FY 2008."
                    },
                    "dateTo": {
                        "title": "Action / award date — to (YYYY-MM-DD)",
                        "type": "string",
                        "description": "Inclusive end date for the award action-date window. Use a 1–3 month window for narrow research; a fiscal year for bulk pulls."
                    },
                    "agencyName": {
                        "title": "Awarding agency (optional)",
                        "type": "string",
                        "description": "Top-tier agency name as USAspending displays it (e.g. 'Department of Defense', 'Department of Health and Human Services', 'National Aeronautics and Space Administration'). Leave blank for all agencies."
                    },
                    "state": {
                        "title": "Place of performance — state (optional)",
                        "type": "string",
                        "description": "2-letter US state code to restrict awards by place of performance (e.g. 'CA', 'TX', 'VA'). Leave blank for all states."
                    },
                    "awardTypes": {
                        "title": "Award type codes",
                        "type": "array",
                        "description": "Award type codes to include. Contracts: A, B, C, D. Grants: 02, 03, 04, 05. Loans: 07, 08. Other financial assistance: 06, 09, 10, 11. Default is contracts only.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxAwards": {
                        "title": "Max awards",
                        "minimum": 1,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Maximum number of awards to return (1–5000). USAspending's spending_by_award endpoint paginates 100 per request.",
                        "default": 100
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
