# USAspending Federal Awards Scraper (`compute-edge/usaspending-awards-scraper`) Actor

Extract U.S. federal contract and grant awards from USAspending.gov. Filter by award type (contracts, grants, IDVs, direct payments), date range, recipient name, and awarding agency. Includes award amounts, performance locations, NAICS codes, and procurement details.

- **URL**: https://apify.com/compute-edge/usaspending-awards-scraper.md
- **Developed by:** [Compute Edge](https://apify.com/compute-edge) (community)
- **Categories:** Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

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

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

Extract structured federal **contract, grant, and award data** directly from the U.S. government's official **USAspending.gov API**. This Actor provides powerful filtering, clean JSON output, and real-time access to billions of dollars in federal spending data across all agencies and award types.

The USAspending database is the authoritative source for federal procurement transparency. Every contract awarded by the Department of Defense, National Institutes of Health, General Services Administration, and thousands of other agencies is recorded here. This Actor lets you filter by award type (contracts, grants, IDVs), fiscal year, recipient name, awarding agency, and more — extracting exactly the awards you need for business development, compliance, or research.

### Key Features

- **Complete federal awards database access** — Contracts, grants, IDVs (Indefinite Delivery Vehicles), and direct payments
- **Award type filtering** — Isolate contracts (A), IDVs (B), grants (C), or direct payments (D)
- **Fiscal year filtering** — Defaults to current fiscal year; customize start and end dates
- **Recipient filtering** — Find all awards to a specific company, nonprofit, or institution (partial match)
- **Awarding agency filtering** — Extract awards from specific federal departments (DoD, NIH, NSF, etc.)
- **Rich award data** — Award amounts, outlays, performance locations, NAICS codes, PSC codes, and descriptions
- **Pagination handled automatically** — Fetches 100+ results efficiently in batches
- **No authentication required** — Public API, no credentials needed
- **Batch-optimized output** — Clean JSON ready for analysis, CRM ingestion, or business intelligence

### Output Data Fields

| Field | Type | Description |
|-------|------|-------------|
| `award_id` | string | Unique award identifier (Award ID) |
| `recipient_name` | string | Name of the company, nonprofit, or institution receiving the award |
| `award_amount` | number | Total obligated amount (in dollars) |
| `total_outlays` | number | Total amount paid out to date |
| `description` | string | Award description or contract statement of work |
| `contract_award_type` | string | Award type code or classification |
| `awarding_agency` | string | Federal agency awarding the contract or grant |
| `awarding_sub_agency` | string | Specific sub-agency within the awarding department |
| `start_date` | string | Award start date (YYYY-MM-DD) |
| `end_date` | string | Award end date or current end date (YYYY-MM-DD) |
| `recipient_location` | string | Recipient's address or location |
| `place_of_performance_country_code` | string | Country code where work is performed (e.g., US) |
| `place_of_performance_state_code` | string | State code where work is performed |
| `place_of_performance_zip5` | string | ZIP code where work is performed |
| `naics` | string | NAICS (industry classification) code |
| `psc` | string | PSC (Product/Service Code) for procurement classification |
| `covid_19_obligations` | number | Amount obligated for COVID-19 relief (if applicable) |
| `def_codes` | string | Defense/procurement defense codes |
| `recipient_id` | string | DUNS number or unique recipient identifier |

### How to Scrape USAspending Federal Awards

1. Navigate to the **USAspending Federal Awards Scraper** Actor page on Apify Store.
2. Click **Start** to open the input configuration form.
3. (Optional) Select **Award Type Codes** to narrow results:
   - **A** = Contracts
   - **B** = IDVs (Indefinite Delivery Vehicles)
   - **C** = Grants
   - **D** = Direct Payments
   - Default includes all types
4. (Optional) Set **Start Date** and **End Date** to filter by fiscal year (e.g., 2024-10-01 to 2025-09-30 for FY2025).
5. (Optional) Enter a **Recipient Name Filter** to find all awards to a specific company (e.g., "Microsoft", "Red Cross").
6. (Optional) Enter an **Awarding Agency Filter** to fetch awards from a specific federal department (e.g., "Department of Defense", "National Science Foundation").
7. Set **Max Results** to control output size (default: 200, maximum: 50,000).
8. Click **Start** to run the Actor.
9. Download results as JSON, CSV, or Excel from the **Dataset** tab once complete.

### Input Example

```json
{
    "awardTypeCodes": ["A", "C"],
    "startDate": "2024-10-01",
    "endDate": "2025-09-30",
    "recipientNameFilter": "Microsoft",
    "awardingAgencyFilter": "",
    "maxResults": 100
}
````

### Output Example

```json
{
    "award_id": "CONT_AWD_FA8725_024_F0006",
    "recipient_name": "Microsoft Corporation",
    "award_amount": 15000000,
    "total_outlays": 8500000,
    "description": "Cloud computing infrastructure and AI services for Department of Defense",
    "contract_award_type": "Indefinite Delivery Contract",
    "awarding_agency": "Department of the Air Force",
    "awarding_sub_agency": "Air Force Research Laboratory",
    "start_date": "2024-10-15",
    "end_date": "2027-10-14",
    "recipient_location": "Puget Sound, WA 98001",
    "place_of_performance_country_code": "US",
    "place_of_performance_state_code": "WA",
    "place_of_performance_zip5": "98001",
    "naics": "541511",
    "psc": "D3",
    "covid_19_obligations": 0,
    "def_codes": "",
    "recipient_id": "0010000000"
}
```

### Pricing

This Actor fetches data directly from the public USAspending API with automatic pagination. Compute costs scale with result count.

- **Cost per run**: ~$0.001 + per-result fees (single-digit milliseconds per result after API fetch)
- **Actor start event**: Default platform rate
- **Per-result pricing**: $0.002/result

A typical run fetching 100 awards costs ~$0.20 in Actor fees plus minimal Apify compute.

### Use Cases

- **Government contracting bid capture** — Identify contract awards in your industry to find buyers and competitors
- **Grant research** — Find all federal grants to nonprofits or universities in your sector
- **Business development** — Track awards to competitors and identify similar government opportunities
- **Compliance and audit** — Verify federal spending records for compliance reporting
- **Supply chain intelligence** — Find subcontractors and prime contractors in your industry
- **Policy research** — Analyze federal spending trends by agency, industry, or geography
- **RAG pipeline ingestion** — Clean structured award data ready for LLM-based analysis of government spending patterns

### FAQ

#### Is it legal to scrape USAspending.gov data?

Yes. USAspending.gov publishes federal spending data as open government data under 31 U.S.C. § 1122. The data is freely available in the public API. No authentication or terms-of-service bypass is required. This Actor simply automates access to publicly available information.

#### How much does it cost to extract federal awards?

See the pricing section above. At $0.002 per result, extracting 1,000 awards costs approximately $2 in Actor fees, plus Apify compute. Most runs complete in under 30 seconds.

#### What are Award Type Codes?

- **A** = Contracts (purchases of goods/services)
- **B** = IDVs (Indefinite Delivery Vehicles — open-ended contracts)
- **C** = Grants (federal funding to nonprofits, universities, state/local governments)
- **D** = Direct Payments (benefits, unemployment, social security payments)

For business development, focus on A (contracts) and B (IDVs). For nonprofit funding, focus on C (grants).

#### Can I export to CSV or Excel?

Yes. After the run completes, Apify's Dataset tab supports export to JSON, CSV, Excel, XML, and other formats.

#### What is a NAICS code?

NAICS (North American Industry Classification System) categorizes businesses by industry. For example:

- 541511 = Custom computer programming services
- 238910 = Site preparation contractors
- 621111 = Offices of physicians (medical)

Use the NAICS code to filter results by industry type.

#### What is a PSC code?

PSC (Product/Service Code) is a federal procurement classification. For example:

- D = Automatic data processing and related supplies
- F = Clothing, textiles, and footwear
- J = Maintenance, repair, and alterations

#### How often is USAspending.gov updated?

USAspending.gov updates in near real-time as agencies report new awards. Most new contracts appear within 24-48 hours.

### Other Scrapers by SeatSignal

- [CISA Known Exploited Vulnerabilities Scraper](https://apify.com/seatsignal/cisa-kev-scraper) — Extract CVE threat intelligence from CISA's authoritative vulnerability catalog
- [NIST NVD Scraper](https://apify.com/seatsignal/nist-nvd-scraper) — Extract CVE data from the NIST National Vulnerability Database
- [CPSC Product Recalls Scraper](https://apify.com/seatsignal/cpsc-product-recalls-scraper) — Extract consumer product recall data
- [OSHA Inspections Scraper](https://apify.com/seatsignal/osha-inspections-scraper) — Extract OSHA workplace safety inspection records
- [FDA OpenFDA Scraper](https://apify.com/seatsignal/fda-openfda-scraper) — Extract FDA drug and device safety data

### Legal Disclaimer

This Actor extracts publicly available federal spending data from USAspending.gov, which is published as open government data under 31 U.S.C. § 1122. No authentication, credentials, or terms-of-service bypass is involved. Users are responsible for ensuring their use of extracted data complies with all applicable federal, state, and local laws and regulations, including any restrictions on resale or commercial use of government data. For support, contact the Actor developer through the Apify Store.

# Actor input Schema

## `awardTypeCodes` (type: `array`):

Types of awards to include. A=Contracts, B=IDVs (Indefinite Delivery Vehicles), C=Grants, D=Direct Payments. Default includes all.

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

Fiscal year start date (YYYY-MM-DD). Default is last fiscal year start (e.g., 2024-10-01 for FY2025). Example: '2024-10-01'.

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

Fiscal year end date (YYYY-MM-DD). Default is current fiscal year end (e.g., 2025-09-30 for FY2025). Example: '2025-09-30'.

## `recipientNameFilter` (type: `string`):

Filter awards by recipient company name (partial match, case-insensitive). Example: 'Microsoft', 'Boeing'.

## `awardingAgencyFilter` (type: `string`):

Filter by awarding agency name (partial match, case-insensitive). Examples: 'Department of Defense', 'National Science Foundation'.

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

Maximum number of award records to return. Default: 200.

## Actor input object example

```json
{
  "awardTypeCodes": [
    "A",
    "B",
    "C",
    "D"
  ],
  "startDate": "",
  "endDate": "",
  "recipientNameFilter": "",
  "awardingAgencyFilter": "",
  "maxResults": 200
}
```

# 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("compute-edge/usaspending-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 = {}

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

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "USAspending Federal Awards Scraper",
        "description": "Extract U.S. federal contract and grant awards from USAspending.gov. Filter by award type (contracts, grants, IDVs, direct payments), date range, recipient name, and awarding agency. Includes award amounts, performance locations, NAICS codes, and procurement details.",
        "version": "0.1",
        "x-build-id": "c1WaXyljG0zUS31NJ"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/compute-edge~usaspending-awards-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-compute-edge-usaspending-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/compute-edge~usaspending-awards-scraper/runs": {
            "post": {
                "operationId": "runs-sync-compute-edge-usaspending-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/compute-edge~usaspending-awards-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-compute-edge-usaspending-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",
                "properties": {
                    "awardTypeCodes": {
                        "title": "Award Type Codes",
                        "type": "array",
                        "description": "Types of awards to include. A=Contracts, B=IDVs (Indefinite Delivery Vehicles), C=Grants, D=Direct Payments. Default includes all.",
                        "default": [
                            "A",
                            "B",
                            "C",
                            "D"
                        ]
                    },
                    "startDate": {
                        "title": "Start Date",
                        "type": "string",
                        "description": "Fiscal year start date (YYYY-MM-DD). Default is last fiscal year start (e.g., 2024-10-01 for FY2025). Example: '2024-10-01'.",
                        "default": ""
                    },
                    "endDate": {
                        "title": "End Date",
                        "type": "string",
                        "description": "Fiscal year end date (YYYY-MM-DD). Default is current fiscal year end (e.g., 2025-09-30 for FY2025). Example: '2025-09-30'.",
                        "default": ""
                    },
                    "recipientNameFilter": {
                        "title": "Recipient Name Filter",
                        "type": "string",
                        "description": "Filter awards by recipient company name (partial match, case-insensitive). Example: 'Microsoft', 'Boeing'.",
                        "default": ""
                    },
                    "awardingAgencyFilter": {
                        "title": "Awarding Agency Filter",
                        "type": "string",
                        "description": "Filter by awarding agency name (partial match, case-insensitive). Examples: 'Department of Defense', 'National Science Foundation'.",
                        "default": ""
                    },
                    "maxResults": {
                        "title": "Max Results",
                        "minimum": 1,
                        "maximum": 50000,
                        "type": "integer",
                        "description": "Maximum number of award records to return. Default: 200.",
                        "default": 200
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
