BitcoinDatabase.com

Query the chain · Bitcoin address type data

Bitcoin address types: SegWit, Taproot and script type API

Bitcoin address types are the script formats that lock each output: legacy P2PKH beginning with 1, P2SH beginning with 3, native SegWit bc1q, and Taproot bc1p. BitcoinDatabase returns the script type on every input and every output in the indexed chain, so you can filter, count and audit by format instead of inferring it from a prefix.

or try it below ↓

REST API · SQL · dashboards · indexed from genesis

Query Console
btc
try:

Hit Run to query the fully-indexed Bitcoin blockchain.

BTC

30-day trend

informational on-chain data · not financial advice

REST API · SQL · dashboards, one indexed dataset. Querying the indexed Bitcoin blockchain ...

That matters more than it sounds, because the public APIs most teams start with do not give you the type at all. We checked four of them on 22 August 2026 against a Taproot address holding 10 BTC. Blockstream Esplora, mempool.space and BlockCypher all returned HTTP 200 and all returned the same thing: balances and transaction counts, and no field anywhere naming the script type. BlockCypher's full address response adds transaction references and still never says the address is Taproot. Blockchair returned HTTP 430 with its IP blacklist message, as it has on every attempt we have logged since 3 August. The type is available at the transaction level, where Esplora does expose scriptpubkey_type on each output, so learning what type an address is means fetching a transaction that touches it or parsing the address string yourself. For one address that is an annoyance. For a wallet backend reconciling a million of them it is an architecture problem.

The second reason to hold the type as data is that address type shares are quoted constantly and almost never qualified. We fetched all 3,905 transactions in block 963,670, mined 23 August 2026 at 03:51:27 UTC, and measured the script types four different defensible ways. Taproot came out at 12.54 percent, 15.46 percent, 3.85 percent and 13.27 percent of the same block, depending on whether you count outputs, count outputs that actually carry an address, weight by the BTC involved, or look at what is being spent rather than created.

The count-versus-value split is the one that catches people. Legacy P2PKH is only 4.60 percent of the outputs in that block, which reads like a format on its way out. It is 28.82 percent of the value. Both numbers are correct, and they answer different questions: one is about which software is writing outputs, the other is about where the money sits. Worth knowing before you build a chart on either.

There is a third signal that neither count nor value shows on its own. In block 963,670, legacy P2PKH accounted for 12.37 percent of the inputs spent but only 4.60 percent of the outputs created. Coins left legacy addresses roughly 2.7 times more often than they arrived at one. That gap is the migration actually happening, visible only because the type is recorded on both sides of the transaction.

BitcoinDatabase records the script type on every input and output since the 2009 genesis block. Filter a query to Taproot only, aggregate balances by format, track the legacy drain over time, or join address type to fees, age and exchange flows in SQL. This is informational on-chain data and analytics, not financial, investment or trading advice.

REST API SQL DASHBOARDS WEBHOOKS CSV EXPORT

Indexed from genesis queryable in seconds

On-chain data not financial advice

Why it works

What you get with Bitcoin address type data

Type on both sides of every transaction

Script type is recorded on inputs as well as outputs, which is what makes migration visible. Comparing what is being spent against what is being created shows a format draining or filling in real time, and no address-balance endpoint can show you that because it never reports a type in the first place.

Count and value, kept separate

Every aggregate is available weighted by output count and weighted by BTC, because they answer different questions and routinely disagree by a factor of six. You choose the denominator instead of inheriting an undocumented one, and the OP_RETURN outputs that quietly distort published percentages are yours to include or exclude.

Filter and join by script format

Restrict any query to Taproot, native SegWit, P2SH or legacy, then join address type to balances, coin age, fee rates and exchange flows in SQL. Rebuilding a full history of format adoption since the 2009 genesis block is one query rather than an ETL project.

Side by side

One block, four defensible answers for Taproot adoption

Every transaction in block 963,670 was fetched and measured first-hand on 23 August 2026. The block was mined at 03:51:27 UTC and holds 3,905 transactions, 9,784 outputs and 7,898 spent inputs. Each row applies a different but entirely reasonable definition of address type share to that identical set of transactions.

How you measure it What that actually counts Taproot (bc1p) Legacy P2PKH (1...)
Share of outputs created Every output in the block, including the 1,849 OP_RETURN outputs that carry no address at all 12.54% 4.60%
Share of address-bearing outputs The same count with those 1,849 null-data outputs removed from the denominator 15.46% 5.67%
Share of output value BTC locked into each script type, rather than how many outputs used it 3.85% 28.82%
Share of inputs spent Script type of the outputs being consumed, which shows the installed base draining 13.27% 12.37%
Share of input value spent BTC unlocked from each script type as coins move out of it 3.79% 26.66%

The value-weighted rows deserve a warning that the count-weighted rows do not. A single transaction, 58e4dbcb185b976216a9b409f77bca843af68ac7afee692474012fb71f242a0c, put 1,687.81 BTC into legacy outputs and by itself produced 87 percent of all legacy value in the block and 25 percent of the block total. We re-fetched it to check: three inputs, two outputs, a fee of 988 satoshis, and 1,633.31 of those BTC went straight back to address 1Kr6QSydW9bFQG1mXiPNNu6WpJGmUa9i1g, which was already an input. The real payment was 54.5 BTC. So value-weighted address type shares swing on individual whales and are unstable block to block, while count-weighted shares track what wallet software is doing and are far steadier. Quote the count for adoption, quote the value for exposure, and never treat one as evidence for the other.

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.

  • Read the script type on every input and output
  • Filter any query to Taproot, SegWit, P2SH or legacy
  • Aggregate address type share by count or by BTC value
  • Track the legacy drain by comparing inputs spent to outputs created
  • Include or exclude OP_RETURN outputs from the denominator
  • Detect the type of an address without parsing the string yourself
  • Rebuild format adoption history since the 2009 genesis block
  • Join address type to balances, coin age, fees and exchange flows 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 Bitcoin address type data

There are four in common use. Legacy P2PKH addresses begin with 1, P2SH addresses begin with 3, native SegWit P2WPKH addresses begin with bc1q, and Taproot P2TR addresses begin with bc1p. A fifth, P2WSH, also begins with bc1q but is noticeably longer. Each is a different script locking the output, not a different kind of coin.
The type names the locking script that says how an output can be spent. It determines the address format and prefix, the transaction size in bytes, and therefore the fee to spend it. It does not change the coins themselves, and every type can send to every other type without any conversion step.
Mainnet addresses start with 1 for legacy P2PKH, 3 for P2SH, bc1q for native SegWit, and bc1p for Taproot. The prefix is a reliable indicator of the script type, which is why so much software infers type by reading the first characters. That works until it meets an unusual output, which is why we record the type as data.
For receiving, native SegWit bc1q is the practical default because it is cheap to spend and universally supported. Taproot bc1p is cheaper still for complex spends and gives better privacy for them, with slightly narrower support. Legacy and P2SH are worth keeping only for compatibility with older systems that cannot pay bech32.
The prefix tells you in most cases, but no major public API returns it on an address lookup. We tested Blockstream Esplora, mempool.space and BlockCypher on 22 August 2026 and none of them included a type field. You either parse the address string yourself, fetch a transaction that touches it, or query a source that stores the type.
A bc1q address is SegWit version 0, either P2WPKH for a single key or the longer P2WSH for a script. A bc1p address is SegWit version 1, meaning Taproot, which uses Schnorr signatures and can hide complex spending conditions behind what looks like an ordinary single-key spend. Both are bech32 family, but bc1p uses bech32m encoding.
It depends entirely on how you measure, which is why quoted figures conflict. In block 963,670, measured 23 August 2026, Taproot was 12.54 percent of outputs created, 15.46 percent once null-data outputs are excluded, 13.27 percent of inputs spent, and just 3.85 percent of the BTC value involved. All four are correct for the same block.
By output count it looks nearly finished, at 4.60 percent of the outputs created in block 963,670. By value it is very much alive at 28.82 percent. The clearest signal is the asymmetry: legacy was 12.37 percent of inputs spent against 4.60 percent of outputs created, so coins leave those addresses far more often than they arrive.
Because each source picks a denominator and rarely publishes it. Counting outputs or counting BTC gives answers six times apart. Including the 1,849 OP_RETURN outputs in block 963,670 or excluding them moves Taproot from 12.54 to 15.46 percent. Measuring spends instead of creations changes it again. The data is identical, the definition is not.
Yes. Because the script type is stored on every output, any balance, rich list or UTXO query can be restricted to a single format or grouped by format. That is the usual way to build a supply-by-address-type series, or to size how much value still sits behind legacy scripts before planning a migration.

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, indexed from the genesis block. Informational on-chain data only, not financial advice.

See pricing

Indexed from genesis · REST · SQL · dashboards · addresses, transactions, UTXOs, metrics