Category trend
category_trendsSpend for one category over time
The category key is exact. Food delivery is delivery. Fast casual is not a category. If an error names a category, retry that name.
One category's spend over the window, as a series by day, week or
month (granularity). Use it for one category over time. To compare
categories with each other, or to split one by state, metro or
income, use the breakdown with group_by=category instead.
Purchases only. A breakdown counts every transaction type, so its
total for the same category and window will not match this one
unless that call passes transaction_type=purchase.
growth=true adds the previous window of the same length.
weighting=population reweights to the mix of US adults (shares
and growth, not market size). normalize adds share of spend or
spend per account, and in population mode per household or share
of income. deflate adds real dollars from CPI.
Talk to the user in plain words: no tool, parameter or field names. Say "the American Spend model", never "panel" or a data source.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"category": "<category>",
"start_date": "<start_date>",
"end_date": "<end_date>"
},
"name": "category_trends"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| growth | No | Adds a `growth` block comparing the immediately-preceding window of equal length. | |
| deflate | No | Adds real (inflation-adjusted) spend in base-month dollars, from CPI-U — the US city average (`cpi_u`) or the row's most specific published area (`cpi_regional`). The CPI item is the one the row's category maps to, all items otherwise. | none |
| category | Yes | The category to trend. Category keys are lower-case and exact: `automotive`, `delivery`, `education`, `entertainment`, `financial_services`, `gifts_donations`, `government`, `grocery`, `healthcare`, `home_services`, `personal_care`, `pets`, `professional_services`, `restaurants`, `retail`, `subscriptions`, `tax_services`, `technology`, `travel`, `utilities`, `uncategorized`, plus older keys the data still carries (list every key with the breakdown, `group_by=category`). Any other name is a 400 `…/problems/category-unknown` whose `candidates` are the closest keys (`Groceries` → `grocery`). | |
| end_date | Yes | Inclusive ISO-8601 date. At most 366 days after `start_date`. | |
| normalize | No | Adds a normalized figure beside the raw ones: `share_of_spend` is the row's share of all spend under the same filters, `per_account` spend per active card. `per_household` and `share_of_income` need `weighting=population` (400 `normalize-requires-population`). `per_account` with `growth=true` is the figure for a brand's growth: every card counts, so it is not moved by which cards the population weights can place. | none |
| weighting | No | `raw` (the default): model volume, `weighted_cents` equals `total_cents`. `population`: the weighted fields reweight the model to the mix of US adults (for shares, comparisons and growth, not market size), with `effective_n`, `low_precision`, `suppressed` and a `weighting` object. A month has weights once it has been raked, from 2025-09 on. `same_account`: growth compares one set of accounts, those with spend in the model in both of two months, chained month by month, so accounts arriving or leaving can't move it. It is turnover-adjusted: each month also carries the merchant's or category's own balance of accounts arriving and leaving (the median over 12 months), which shared accounts alone miss. Levels and shares stay raw. A growth block gains `same_account_change_pct` and `same_account_yoy_pct`, or `same_account_unavailable` saying why not, and a monthly series carries chained dollars in `weighted_cents`. It needs whole, settled calendar months, the newest month waits for the month after it on the default `stable` accounts, and it is in validation (403 `same-account-weighting-forbidden` until open to the key). Omit it to get the response shape callers had before it existed. | raw |
| start_date | Yes | Inclusive ISO-8601 date. | |
| granularity | No | day, week, or month. Omit for one total over the window. total is not a value. When set, adds a bucketed series array. | |
| income_bracket | No | Restrict to one cardholder income band. `unknown` selects rows with no income upstream, which is where most spend sits — the dimension is populated for roughly 6% of volume, so an income cut is a slice of that, not of the model. | |
| exclude_subscriptions | No | Exclude membership/subscription fee rows (DashPass, Uber One, Instacart+, …). Defaults false. |