Skip to main content
Bitcoin datasets provide comprehensive on-chain data including blocks, transactions, inputs (spent UTXOs), and outputs (created UTXOs). All data is indexed and queryable through Portal.

Available Data Types

Block headers contain metadata about each block in the chain.
Field NameData TypeDescription
numberintegerBlock height
hashstringBlock hash
parentHashstringParent block hash
timestampintegerBlock timestamp (Unix seconds)
medianTimeintegerMedian time past — BIP 113
versionintegerBlock version
merkleRootstringMerkle root of all transactions
nonceintegerNonce used for proof-of-work
targetstringMining target
bitsstringCompact representation of the target
difficultynumberMining difficulty
chainWorkstringTotal work in the chain up to and including this block
strippedSizeintegerBlock size without witness data (bytes)
sizeintegerTotal block size (bytes)
weightintegerBlock weight (BIP 141)
Transaction data includes all transactions with their metadata.
Field NameData TypeDescription
transactionIndexintegerIndex of the transaction within the block
hexstringRaw transaction hex
txidstringTransaction ID (double SHA-256 of serialized transaction without witness)
hashstringTransaction hash (includes witness data, differs from txid for SegWit txs)
sizeintegerTotal transaction size in bytes (including witness)
vsizeintegerVirtual size (weight / 4), used for fee calculation
weightintegerTransaction weight (non-witness bytes * 4 + witness bytes)
versionintegerTransaction version number
locktimeintegerEarliest time or block height at which the tx can be included
Transaction inputs reference and spend previous transaction outputs (UTXOs). Each input includes prevout data describing the output being spent.
Field NameData TypeDescription
transactionIndexintegerIndex of parent transaction within the block
inputIndexintegerIndex of this input within the transaction
typestringInput type
txidstringTransaction ID of the output being spent
voutintegerIndex of the output being spent in the referenced tx
scriptSigHexstringScriptSig in hex
scriptSigAsmstringScriptSig in ASM format
sequenceintegerSequence number
coinbasestringCoinbase data (only present in coinbase transactions)
txInWitnessarraySegregated witness data
prevoutGeneratedbooleanWhether the spent output was a coinbase output
prevoutHeightintegerBlock height of the spent output
prevoutValuenumberValue of the spent output in BTC
prevoutScriptPubKeyHexstringScriptPubKey of the spent output in hex
prevoutScriptPubKeyAsmstringScriptPubKey of the spent output in ASM format
prevoutScriptPubKeyDescstringOutput descriptor of the spent output
prevoutScriptPubKeyTypestringScript type of the spent output
prevoutScriptPubKeyAddressstringAddress of the spent output
Transaction outputs create new UTXOs that can be spent by future transactions.
Field NameData TypeDescription
transactionIndexintegerIndex of parent transaction within the block
outputIndexintegerIndex of this output within the transaction
valuenumberOutput value in BTC
scriptPubKeyHexstringScriptPubKey in hex
scriptPubKeyAsmstringScriptPubKey in ASM format
scriptPubKeyDescstringOutput descriptor
scriptPubKeyTypestringOutput type (pubkeyhash, scripthash, witness_v0_keyhash, witness_v1_taproot, nulldata, etc.)
scriptPubKeyAddressstringOutput address (when applicable)

Filtering

Transaction Filters

Transactions support relation flags to include related data:
FilterTypeDescription
inputsbooleanInclude all inputs for matching transactions
outputsbooleanInclude all outputs for matching transactions

Input Filters

FilterTypeDescription
typestring[]Filter by input type
prevoutScriptPubKeyAddressstring[]Filter by the address of the spent output
prevoutScriptPubKeyTypestring[]Filter by the script type of the spent output
prevoutGeneratedbooleanFilter by whether the spent output was coinbase
transactionbooleanInclude parent transaction
transactionInputsbooleanInclude all sibling inputs
transactionOutputsbooleanInclude all outputs of the parent transaction

Output Filters

FilterTypeDescription
scriptPubKeyAddressstring[]Filter by output address
scriptPubKeyTypestring[]Filter by output script type
transactionbooleanInclude parent transaction
transactionInputsbooleanInclude all inputs of the parent transaction
transactionOutputsbooleanInclude all sibling outputs

Usage Examples

For code examples showing how to query this data, see: