# USAspending Federal Awards Tracker — Contracts & Grants (`v0iddo/usaspending-federal-awards`) Actor

Pull recent federal contract & grant awards from USAspending.gov. Filter by award type, agency, recipient, PSC/NAICS, state, or keyword. One row per award — id, recipient, amount, agency, dates, codes. Built for cron. USAspending.gov v2 API (free, no auth).

- **URL**: https://apify.com/v0iddo/usaspending-federal-awards.md
- **Developed by:** [vøiddo](https://apify.com/v0iddo) (community)
- **Categories:** Business, News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$10.00 / 1,000 usaspending award extracteds

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 Tracker — Contracts & Grants

Pull recent federal contract & grant awards from **USAspending.gov**. Filter by award type, awarding agency, recipient name, PSC/NAICS code, place-of-performance state, or description keyword. One clean row per award.

Built **for cron** (daily/weekly digest of new awards matching your watch) and ad-hoc opportunity scouting. No auth — pure USAspending v2 API.

### Inputs

```json
{
  "sinceDays": 7,
  "awardTypeCodes": ["A", "B", "C", "D"],
  "keywords": ["cybersecurity"],
  "agencyNames": ["Department of Defense"],
  "stateCodes": ["CA", "VA"],
  "maxResults": 500
}
````

| input | default | notes |
|---|---|---|
| `sinceDays` | `7` | `Start Date >= now - sinceDays`. Use `1` for daily cron. |
| `awardTypeCodes` | `["A","B","C","D"]` (contracts) | Federal award type codes. Grants = 02-05, IDV = `IDV_A..IDV_E`, Loans = 07-08. |
| `keywords` | — | Free-text words to search in the description. Optional. |
| `agencyNames` | — | Top-tier awarding agency names. Optional. |
| `recipientNames` | — | Recipient substring filters. Optional. |
| `pscCodes` | — | 4-char Product Service Codes. E.g. `D310` for IT/telecom. |
| `naicsCodes` | — | 6-digit NAICS codes. E.g. `541512` for computer systems design. |
| `stateCodes` | — | 2-letter US state codes for place of performance. |
| `maxResults` | `1000` | Hard cap. |

### Output

One row per award:

| field | example |
|---|---|
| awardId | `W912P926FA114` |
| internalId | `358614417` |
| detailUrl | `https://www.usaspending.gov/award/358614417` |
| recipientName | `PARAGON PROFESSIONAL SERVICES LLC` |
| recipientUei | `XK9CYZL8MTR5` |
| awardAmount | `12832704.92` (USD) |
| description | `EPA R7 SEMO 2026 REMEDIATION SEASON TASK ORDER` |
| awardingAgency | `Department of Defense` |
| awardingSubAgency | `Department of the Army` |
| actionDate | `2026-05-22` (latest modification date) |
| startDate | `2026-05-22` |
| endDate | `2027-05-21` |
| pscCode | `R425` (when populated) |
| naicsCode | `541330` (when populated) |
| placeOfPerformanceState | `MO` |
| placeOfPerformanceCountry | `USA` |

### Daily cron pattern

```json
{ "sinceDays": 1, "agencyNames": ["Department of Defense"], "stateCodes": ["VA","MD","DC"] }
```

Run every morning to capture yesterday's new DoD awards in the National Capital Region.

### Real-world questions this answers

- **Federal contractor BD.** What new awards just dropped at my target agency in my PSC?
- **Recipient watch.** What's Lockheed / Palantir / Booz Allen winning right now?
- **Regional economic dev.** Federal spending hitting my state this quarter?
- **Investigative journalism.** Track awards by company / topic / agency over a window.

### What it doesn't do

- No award-history time series — one snapshot per run. Diff downstream if needed.
- No sub-award data (`subawards: false` fixed). The sub-award endpoint differs.
- No transaction-level history — one row per award, not per modification.

### Maintained by

[vøiddo studio](https://voiddo.com) — small independent shop.

# Actor input Schema

## `sinceDays` (type: `integer`):

Awards whose Start Date falls in the last N days. Use 1 for a daily cron.

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

Federal award type codes. Defaults to contracts (A=BPA, B=PO, C=DO, D=Definitive Contract). Grants: 02, 03, 04, 05. Loans: 07, 08. IDV: IDV\_A..IDV\_E.

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

Optional free-text filter. Awards whose description contains any of these words. Examples: \["cybersecurity", "AI"].

## `agencyNames` (type: `array`):

Optional list of awarding agency names. Examples: "Department of Defense", "Department of Health and Human Services", "National Aeronautics and Space Administration".

## `recipientNames` (type: `array`):

Optional list of recipient company names. Substring match. Example: \["Lockheed", "Palantir"].

## `pscCodes` (type: `array`):

Optional list of 4-char PSC codes. Examples: "D310" (IT/telecom), "R425" (engineering services).

## `naicsCodes` (type: `array`):

Optional list of 6-digit NAICS codes. Examples: "541512" (computer systems design services).

## `stateCodes` (type: `array`):

Optional 2-letter US state codes filtering by place of performance. Example: \["CA", "VA"].

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

Hard cap to keep runs cheap. Default 1000.

## Actor input object example

```json
{
  "sinceDays": 7,
  "awardTypeCodes": [
    "A",
    "B",
    "C",
    "D"
  ],
  "keywords": [],
  "agencyNames": [],
  "recipientNames": [],
  "pscCodes": [],
  "naicsCodes": [],
  "stateCodes": [],
  "maxResults": 1000
}
```

# 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("v0iddo/usaspending-federal-awards").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("v0iddo/usaspending-federal-awards").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 v0iddo/usaspending-federal-awards --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "USAspending Federal Awards Tracker — Contracts & Grants",
        "description": "Pull recent federal contract & grant awards from USAspending.gov. Filter by award type, agency, recipient, PSC/NAICS, state, or keyword. One row per award — id, recipient, amount, agency, dates, codes. Built for cron. USAspending.gov v2 API (free, no auth).",
        "version": "0.1",
        "x-build-id": "edqsQFyPRWqJRWEMr"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/v0iddo~usaspending-federal-awards/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-v0iddo-usaspending-federal-awards",
                "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/v0iddo~usaspending-federal-awards/runs": {
            "post": {
                "operationId": "runs-sync-v0iddo-usaspending-federal-awards",
                "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/v0iddo~usaspending-federal-awards/run-sync": {
            "post": {
                "operationId": "run-sync-v0iddo-usaspending-federal-awards",
                "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": {
                    "sinceDays": {
                        "title": "Look back (days, by Start Date)",
                        "minimum": 1,
                        "maximum": 3650,
                        "type": "integer",
                        "description": "Awards whose Start Date falls in the last N days. Use 1 for a daily cron.",
                        "default": 7
                    },
                    "awardTypeCodes": {
                        "title": "Award types",
                        "type": "array",
                        "description": "Federal award type codes. Defaults to contracts (A=BPA, B=PO, C=DO, D=Definitive Contract). Grants: 02, 03, 04, 05. Loans: 07, 08. IDV: IDV_A..IDV_E.",
                        "default": [
                            "A",
                            "B",
                            "C",
                            "D"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "keywords": {
                        "title": "Description keywords",
                        "type": "array",
                        "description": "Optional free-text filter. Awards whose description contains any of these words. Examples: [\"cybersecurity\", \"AI\"].",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "agencyNames": {
                        "title": "Awarding agencies (top-tier)",
                        "type": "array",
                        "description": "Optional list of awarding agency names. Examples: \"Department of Defense\", \"Department of Health and Human Services\", \"National Aeronautics and Space Administration\".",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "recipientNames": {
                        "title": "Recipient names",
                        "type": "array",
                        "description": "Optional list of recipient company names. Substring match. Example: [\"Lockheed\", \"Palantir\"].",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "pscCodes": {
                        "title": "PSC codes (Product Service Codes)",
                        "type": "array",
                        "description": "Optional list of 4-char PSC codes. Examples: \"D310\" (IT/telecom), \"R425\" (engineering services).",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "naicsCodes": {
                        "title": "NAICS codes",
                        "type": "array",
                        "description": "Optional list of 6-digit NAICS codes. Examples: \"541512\" (computer systems design services).",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "stateCodes": {
                        "title": "Place-of-performance state codes",
                        "type": "array",
                        "description": "Optional 2-letter US state codes filtering by place of performance. Example: [\"CA\", \"VA\"].",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxResults": {
                        "title": "Max results (across all filters)",
                        "minimum": 1,
                        "maximum": 50000,
                        "type": "integer",
                        "description": "Hard cap to keep runs cheap. Default 1000.",
                        "default": 1000
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
