Skip to main content
Glama

USASpending.gov

spending_by_category

Read-only

Aggregate spending by a dimension (top vendors, top agencies, top NAICS, etc.).

The 'category' parameter controls the grouping dimension. Common uses:
- category='recipient': top vendors for a filter set (vendor landscape analysis)
- category='awarding_subagency': which contracting offices within an agency
- category='naics': which work categories got the most spending
- category='psc': which product/service codes got the most spending
- category='state_territory': geographic distribution
- category='cfda': grant assistance listings

Note: recipient category returns vendor names in ALL CAPS and may contain
duplicates (subsidiaries, rebrands, re-registrations). For precise market
share, apply name normalization to the returned 'name' field.

At least one filter is required. An unfiltered call would silently
aggregate the entire USASpending database (all years, all agencies),
which is never what a caller wants.

date_type controls the transaction date window. Omitted (the default)
or 'action_date', it selects transaction actions inside the window.
'date_signed' selects the associated award's first signing date;
'last_modified_date' selects transaction update dates. 'new_awards_only'
retains in-window actions associated with awards first signed in the
window. These are transaction obligation totals, not new-award counts:
use new_awards_over_time for counts. Award search/count tools use a
different default interval-overlap rule.
date_type needs time_period_start and/or time_period_end.

program_numbers filters assistance awards by assistance listing (CFDA)
number, e.g. ['93.778'] for Medicaid; use it with award_type='grants',
'loans', 'direct_payments', or 'other'. autocomplete_cfda() finds numbers
by program name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNo
limitNo
categoryYes
keywordsNo
date_typeNo
def_codesNo
psc_codesNo
award_typeNo
naics_codesNo
funding_agencyNo
recipient_nameNo
awarding_agencyNo
program_numbersNo
time_period_endNo
time_period_startNo
awarding_subagencyNo
set_aside_type_codesNo
extent_competed_type_codesNo
contract_pricing_type_codesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.