> For the complete documentation index, see [llms.txt](https://docs.americanspend.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.americanspend.com/methodology.md).

# Methodology

How the numbers are made, from a licensed transaction to a query.

How the numbers are made.

* **Sourcing.** Transaction data is licensed from third-party panels.
* **Aggregation.** Insights are computed across cohorts large enough to prevent re-identification of any individual.
* **Representation.** Published figures are estimates from a growing sample of the economy. Coverage and historical figures improve as the graph grows.

### How a transaction joins the graph

1. **Sourced.** Built from licensed transaction data from multiple sources. Personal details are removed, and overlap between sources is reconciled so every purchase counts once.
2. **Cleaned.** Each transaction is stripped of processor prefixes, standardized, and checked for duplicates. Refunds are paired with the purchases they reverse, leaving one clean line per transaction.
3. **Matched.** Every alias, store number, and payment-app wrapper rolls up to the business behind it. The full record is rematched nightly.
4. **Categorized.** Each transaction is connected to its category and its place: where the store is and where the cardholder lives. Metros follow standard statistical areas.
5. **Refreshed daily.** The graph updates every night. Each day's totals update as late transactions come in. Each date keeps a record of what was known and when.
6. **Queryable.** The whole record can be queried by merchant, category, place, or window, and every answer carries the same four [measures](/measures.md).

A $20 ChatGPT subscription can arrive as `PAYPAL *OPENAI`, `CASH APP*OPENAI OPCO L`, or `OPENAI *CHATGPT SUB`. The Spend Graph files all three under OpenAI, because OpenAI got paid.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.americanspend.com/methodology.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
