Merchant spend
query_spendTotal spend for a merchant or set of merchants over a window: one figure, or a day, week or month series (granularity; omit it for one total). Purchases only. Needs start_date, end_date and a merchant. Name the brand in merchant (merchant=Starbucks): it resolves to the directory merchant, so don't search first. A merchant_id from an earlier result wins over it. If the result says matched_by descriptor, the brand isn't in the directory and the figure is a loose name match: search once and retry with its merchant_id. The window is at most 366 days; a weekly series at most 16 weeks. With partial_panel, quote its full_panel for a level.
How to answer with any American Spend tool:
Lead with the finding: the number, ranking or change. Don't narrate the calls you're about to make. No caveats list, no closing offers.
Call it the American Spend model or the model, never "panel" or "sample", and never name where its data comes from. Public benchmark series are the exception: name the agency and quote their attribution line.
Treat coverage.through as today. Don't say the data "only runs through" a date or that recent days are estimated. If an answer rests on the last few days alone, say in one line they may move.
Model dollars are not company revenue or a market size: lead with shares, rankings and changes.
A brand's growth: normalize=per_account with growth=true, quoting per_account_change_pct. Shares between groups (metros, ages, income tiers): weighting=population.
Never compare a window that starts before coverage.from with one after it.
Recheck every number you derive before writing it; show only the final figure.
Report what the results show. Don't add causes, seasons or events they don't state. If a figure looks off, say so once, beside it, with the real numbers.
If the user says an answer is wrong, offer in that same reply to report it to the American Spend team.
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": {
"start_date": "<start_date>",
"end_date": "<end_date>"
},
"name": "query_spend"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| group | No | A merchant group as the subject, by slug or UUID (`find_groups` lists them, with their members). Members are read as one set: totals add up, unique purchasers count each account once. An unknown group is 400 `…/problems/merchant-group-unknown`. | |
| names | No | Raw descriptor(s), comma-separated or repeated. Max 50. | |
| 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 |
| end_date | Yes | Inclusive ISO-8601 date. At most 366 days after `start_date`. | |
| location | No | Coded metro. Matches merchant geography OR spender (cardholder) geography by default — narrow with `match_merchant` / `match_spender`. Spender scoping is what lets app-billed merchants (rideshare, whose merchant address is the processor HQ) be analysed by city. | |
| merchant | No | A single brand token, matched exactly as `names` with `match=fuzzy` (directory merchant first, descriptor substring only as the fallback; ambiguity is 400 `…/problems/merchant-ambiguous`). | |
| canonical | No | Canonical merchant name(s), as the merchant directory lists them. An exact, case-insensitive match is tried first. A name with no exact match is matched loosely, as `merchant` is: letters and digits only, then whole words, with corporate suffixes ignored (`Jersey Mike's` finds `JERSEY MIKE'S SUBS`). A loose match answers only when it is one merchant, and the response says which (`matched_by: canonical`, `matched_names`). Several matches are refused with 400 `…/problems/canonical-ambiguous`, carrying `candidates` to pick from by `merchant_id`. A name that matches nothing as a whole and contains commas is read as a list (`Kalshi,Polymarket`); a whole name is always tried first, since canonical names may contain commas. | |
| 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. | |
| facilitator | No | Only purchases that went through these facilitators, read from the descriptor's prefix: `PayPal`, `Venmo`, `SQUARE`, `Klarna`, and `direct` for a purchase with none. Comma-separated. The names are the ones `breakdown` returns with `group_by=facilitator`. A prefix or the start of a name works too (`PP`, `Toast`). Raw figures only: not with `weighting=population` or `same_account`, `normalize` or `deflate`. A merchant whose order or store numbers give it more than 10 million descriptors is refused with `facilitator_split_too_large`. | |
| 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. | |
| merchant_id | No | Canonical merchant UUID(s). Comma-separated or repeated. | |
| match_spender | No | Include spender geography when filtering by `location`. Defaults true. | |
| 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. | |
| match_merchant | No | Include merchant geography when filtering by `location`. Defaults true. | |
| include_children | No | Expand a parent merchant to its sub-brands before matching. **Defaults true.** Merchants merged into the requested one are the same merchant and are always included, whatever this is set to — their history stays under the retired id. Applies to merchants named by id, canonical name, directory brand or group; exact descriptors are matched as given. Expansion fails open: a failed directory lookup expands nothing rather than failing the query. | |
| exclude_subscriptions | No | Exclude membership/subscription fee rows (DashPass, Uber One, Instacart+, …). Defaults false. |