Spending by Category
usaspending_spending_by_categoryAggregate federal spending grouped by a specific dimension: NAICS industry code, PSC product/service code, awarding agency, funding agency, CFDA assistance program, or recipient. Returns top items with obligation amounts — useful for trend and breakdown analysis. Chain NAICS codes into usaspending_search_awards filters or usaspending_autocomplete_filters lookups.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number (1-based) | |
| limit | No | Maximum items to return (1–100) | |
| filters | No | Optional filters to scope the aggregation | |
| category | Yes | Breakdown dimension: naics (industry), psc (product/service code), awarding_agency, awarding_subagency, funding_agency, funding_subagency, cfda (assistance programs), recipient_duns, or recipient_parent_duns |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Current page returned | |
| error | No | Present when the call failed. Absent on success. | |
| notice | No | Recovery hint when results are empty — suggests how to broaden filters. Absent when results are present. | |
| results | No | Top items in this category by obligation amount | |
| category | No | Breakdown dimension used | |
| has_next | No | Whether there are more pages | |
| totalCount | No | Total number of items in this category (when available) | |
| page_metadata | No | Pagination metadata | |
| applied_keywords | No | Keyword filters applied (comma-separated) | |
| applied_agency_name | No | Awarding agency name filter applied | |
| applied_naics_codes | No | NAICS code filters applied (comma-separated) | |
| applied_time_period_end | No | End date filter applied (YYYY-MM-DD) | |
| applied_time_period_start | No | Start date filter applied (YYYY-MM-DD) |