usa_spending_trends

Pack: usaspending · Endpoint: https://gateway.pipeworx.io/usaspending/mcp

Track federal spending trends over time by keywords or agency, grouped by fiscal year, quarter, or month. Returns historical spending amounts for budget forecasting.

Parameters

NameTypeRequiredDescription
keywordsarrayyesKeywords to track spending for (e.g., [“artificial intelligence”])
itemsstringno
agencystringnoOptional awarding agency name
start_datestringyesStart date in YYYY-MM-DD format
end_datestringyesEnd date in YYYY-MM-DD format
groupstringnoTime grouping: fiscal_year, quarter, or month (default fiscal_year)

Example call

Arguments

{
  "keywords": [
    "artificial intelligence"
  ],
  "start_date": "2020-01-01",
  "end_date": "2024-12-31",
  "group": "fiscal_year"
}

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_trends","arguments":{"keywords":["artificial intelligence"],"start_date":"2020-01-01","end_date":"2024-12-31","group":"fiscal_year"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('usa_spending_trends', {
  "keywords": [
    "artificial intelligence"
  ],
  "start_date": "2020-01-01",
  "end_date": "2024-12-31",
  "group": "fiscal_year"
});

More examples

{
  "keywords": [
    "renewable energy"
  ],
  "agency": "Department of Energy",
  "start_date": "2023-01-01",
  "end_date": "2024-12-31",
  "group": "quarter"
}

Response shape

Always returns: group, data_points

FieldTypeDescription
groupstringTime grouping used (fiscal_year, quarter, or month)
data_pointsarraySpending data points over time
Full JSON Schema
{
  "type": "object",
  "properties": {
    "group": {
      "type": "string",
      "description": "Time grouping used (fiscal_year, quarter, or month)"
    },
    "data_points": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "fiscal_year": {
            "type": "string",
            "description": "Fiscal year for this data point"
          },
          "quarter": {
            "type": [
              "string",
              "null"
            ],
            "description": "Fiscal quarter if grouped by quarter"
          },
          "month": {
            "type": [
              "string",
              "null"
            ],
            "description": "Month if grouped by month"
          },
          "amount": {
            "type": "number",
            "description": "Aggregated spending amount for this period"
          }
        },
        "required": [
          "fiscal_year",
          "quarter",
          "month",
          "amount"
        ]
      },
      "description": "Spending data points over time"
    }
  },
  "required": [
    "group",
    "data_points"
  ]
}

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