BitcoinDatabase.com

Query the chain · Address clustering

Bitcoin address clustering API for wallet clustering and entity resolution

One Bitcoin address is almost never one wallet. Bitcoin address clustering resolves any address into every other address that provably or probably sits under the same control, returning the cluster's combined balance, its first and last activity, and the heuristic behind each link.

or try it below ↓

REST API · SQL · dashboards · address history from genesis

Query Console
btc
try:

Hit Run to query the Bitcoin blockchain.

Live from the chain for .

BTC

Balance trail

informational on-chain data · not financial advice

REST API · SQL · dashboards, one indexed dataset. Reading the chain ...

That matters because real wallets spread coins across hundreds or thousands of addresses, generating a fresh one for every receive and every bit of change, so an address balance on its own tells you very little about the entity behind it. The clustering runs across the indexed chain, which grows with every new block, and it is queryable three ways. Use REST when an app needs the cluster for one address, SQL when you want to join clusters against flows, balances or entity labels and aggregate across thousands of them at once, or the dashboards when an analyst is reviewing a case by hand. Because every membership carries the reason it was added, you can filter to only the high-confidence common-input links when an investigation needs a stricter standard.

One thing we state plainly, because vendors often do not: clustering is probabilistic inference, not proof of ownership. The common-input-ownership heuristic is defeated by CoinJoin and other collaborative transactions, and change detection is a behavioral guess that wallet software can and does break. We return the heuristic and a confidence level so your team can judge each link instead of trusting a black box. This is informational on-chain data and analytics for compliance, research and product work, never an identity claim about any individual and never legal or financial advice.

REST API SQL DASHBOARDS WEBHOOKS CSV EXPORT

History from genesis queryable in seconds

On-chain data not financial advice

Why it works

What you get with Address clustering

One address in, the whole wallet out

Pass any address and get the full set of addresses under shared control, with the cluster balance, transaction count and first and last seen dates, so you analyze a wallet as one entity instead of chasing hashes one lookup at a time.

Every link shows its reasoning

Each address in a cluster carries the heuristic that placed it there, common-input-ownership or change detection, plus a confidence level. You can tighten a cluster to only the strongest links when an investigation needs a higher standard of evidence.

Cluster at scale in SQL

Clusters live in the same schema as balances, transactions and entity labels, so one query can roll exposure up by cluster, rank clusters by balance, or find every cluster that ever touched a labeled exchange, instead of looping API calls.

What it handles

The indexed Bitcoin chain, queryable your way

Look up an address, a transaction, a UTXO, the rich list or an on-chain metric, by REST API, SQL or dashboard. The same authoritative data, reconciled block-by-block against the canonical chain, without running a node.

  • Resolve an address to its full wallet cluster
  • Return cluster balance, age and transaction count
  • Filter cluster members by heuristic and confidence
  • Join clusters against entity labels and fund flows
  • Aggregate exposure across thousands of clusters in SQL
GET /v1/address/{addr} query result
200 · JSON
{
  "address": "bc1qxy2k…l0wdv8",
  "balance_btc": 68432.10,
  "balance_usd": 4612165420,
  "tx_count": 1284,
  "unspent_outputs": 37,
  "first_seen": "2014-02-09"
}
indexed from genesis · to the satoshi ✓ reconciled block-by-block

Why BitcoinDatabase

One platform, queryable three ways

Not a raw node to sync, not an indexer to build, and not five vendors to stitch together. The fully-indexed Bitcoin blockchain, available as a REST API, as SQL, and as dashboards, on one authoritative dataset.

REST API

Typed JSON for addresses, transactions, balances, UTXOs and metrics. Drop it into apps, wallets, explorers and agents with curl, Python or any HTTP client.

SQL access

Run SQL directly against the indexed Bitcoin dataset for ad-hoc analysis, cohorts and exports, the same data the API and dashboards read from.

Compliance-first

Informational on-chain data and analytics only. Entity labels and flow tracing are framed as tooling to support a regulated team's own review, not accusations.

Good questions

Questions about Address clustering

Bitcoin address clustering is the process of grouping addresses that are controlled by the same wallet or entity. Because wallets generate a new address for nearly every receive and every bit of change, clustering reconstructs the real wallet from the transaction graph, so you can read a balance or a fund flow at the entity level rather than per address.
The common-input-ownership heuristic assumes that when a transaction spends several inputs at once, one party controlled the keys for all of them, so those input addresses belong to the same wallet. Formalized in Meiklejohn et al., A Fistful of Bitcoins (2013), it is the strongest clustering signal on Bitcoin, though collaborative transactions such as CoinJoin deliberately break the assumption.
When a wallet spends a UTXO worth more than it needs, the remainder returns to a change address it controls. The change heuristic identifies that output, usually by looking for an output address that has never appeared before and is not reused afterward, and adds it to the sender's cluster. It is behavioral inference, so it is weaker than common-input-ownership.
Yes, and any provider claiming otherwise is overselling. CoinJoin and PayJoin transactions intentionally violate the common-input assumption and can merge unrelated parties into one cluster, while wallets that avoid address reuse or randomize change defeat change detection. We return the heuristic and confidence behind every link so you can discard the weak ones.
No. Clustering shows that a set of addresses appear to share control; it says nothing about which person or company that is. Attribution to a named entity only happens where a cluster maps to a publicly known service such as an exchange or mining pool, and that remains informational context, not an identity claim or an accusation, and not legal advice.
Clustering is the grouping step: it works out which addresses share control. Labeling is the naming step: it attaches a known entity such as an exchange or mining pool to a cluster where public attribution exists. Most clusters on Bitcoin are grouped but unlabeled, because no public information ties them to a name.
The standard reference is Meiklejohn and colleagues, A Fistful of Bitcoins, presented at the Internet Measurement Conference in 2013, which combined the common input heuristic with a change heuristic and won the IMC Test of Time Award in 2024. Moeser and Narayanan revisited change detection in Resurrecting Address Clustering in Bitcoin, Financial Cryptography 2022, pages 386 to 403.
A lot, and in one direction. In block 963,218 we counted 12,388 distinct addresses. Removing same transaction change left 11,533, and merging addresses that co-spent left 9,789, or 79.02 percent of the naive count. Because clustering only merges what it has seen co-spend, that 21 percent reduction is a floor on the true overlap, not an estimate of it.
Yes. The inputs and outputs tables in SQL hold the transaction graph, so the common input heuristic is a self join on inputs that share a spending transaction, and change detection works from output order, script type and value. You keep the rules, so you can state exactly which heuristics produced a cluster, which is what an auditor or a court will ask.
It breaks the common input ownership heuristic by design, because several independent users sign one transaction. Applied naively, every participant merges into one false cluster. Competent indexers detect the CoinJoin shape, many equal-value outputs, and exclude it. PayJoin is harder because it looks like an ordinary payment, a genuine limit on the heuristic.

Explore more

More ways to query Bitcoin with BitcoinDatabase

Stop running a node. Just query Bitcoin.

Run your first query now and get on-chain data back by REST API, SQL or dashboard, with address history back to the genesis block over REST. Informational on-chain data only, not financial advice.

See pricing

History from genesis over REST · SQL · dashboards · addresses, transactions, UTXOs, metrics