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

NameTypeRequiredDescription
categorystringyesCategory to group by: naics, psc, recipient, awarding_agency, awarding_subagency
keywordsarraynoOptional keywords to filter spending
itemsstringno
agencystringnoOptional awarding agency name filter
start_datestringyesStart date in YYYY-MM-DD format
end_datestringyesEnd date in YYYY-MM-DD format
limitnumbernoNumber 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

FieldTypeDescription
categorystringCategory grouping used (naics, psc, recipient, awarding_agency, awarding_subagency)
total_countnumberTotal number of categories in results
resultsarraySpending 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.

Regenerated from source · build May 9, 2026