usa_spending_by_category
Pack: usaspending · Endpoint: https://gateway.pipeworx.io/usaspending/mcp
Analyze federal spending by industry, product/service, recipient, or agency. Returns spending totals per category. Use for market research and identifying government contracting opportunities.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
category | string | yes | Category to group by: naics, psc, recipient, awarding_agency, awarding_subagency |
keywords | array | no | Optional keywords to filter spending |
items | string | no | |
agency | string | no | Optional awarding agency name filter |
start_date | string | yes | Start date in YYYY-MM-DD format |
end_date | string | yes | End date in YYYY-MM-DD format |
limit | number | no | Number of results (1-100, default 10) |
Example call
Arguments
{
"category": "naics",
"start_date": "2024-01-01",
"end_date": "2024-12-31"
}
curl
curl -X POST https://gateway.pipeworx.io/usaspending/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"usa_spending_by_category","arguments":{"category":"naics","start_date":"2024-01-01","end_date":"2024-12-31"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('usa_spending_by_category', {
"category": "naics",
"start_date": "2024-01-01",
"end_date": "2024-12-31"
});
More examples
{
"category": "recipient",
"keywords": [
"software"
],
"agency": "General Services Administration",
"start_date": "2023-01-01",
"end_date": "2024-12-31",
"limit": 50
}
Response shape
Always returns: category, total_count, results
| Field | Type | Description |
|---|---|---|
category | string | Category grouping used (naics, psc, recipient, awarding_agency, awarding_subagency) |
total_count | number | Total number of categories in results |
results | array | Spending breakdown by category |
Full JSON Schema
{
"type": "object",
"properties": {
"category": {
"type": "string",
"description": "Category grouping used (naics, psc, recipient, awarding_agency, awarding_subagency)"
},
"total_count": {
"type": "number",
"description": "Total number of categories in results"
},
"results": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Category name"
},
"amount": {
"type": "number",
"description": "Total spending for this category"
},
"code": {
"type": [
"string",
"null"
],
"description": "Category code if applicable"
},
"id": {
"type": [
"number",
"null"
],
"description": "Category identifier if applicable"
}
},
"required": [
"name",
"amount",
"code",
"id"
]
},
"description": "Spending breakdown by category"
}
},
"required": [
"category",
"total_count",
"results"
]
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"usaspending": {
"url": "https://gateway.pipeworx.io/usaspending/mcp"
}
}
}
See Getting Started for client-specific install steps.