openapi: 3.0.3 info: title: Blockchain.com Blockchain Data API description: | Read-only JSON HTTP API for querying Bitcoin blockchain data from Blockchain.com's explorer: blocks, transactions, addresses, multi-address summaries, unspent outputs, and the latest block. Includes the simple Query API endpoints that return single-value plain-text answers about the network (difficulty, block count, total supply, etc.). Generated from https://www.blockchain.com/explorer/api/blockchain_api and https://www.blockchain.com/explorer/api/q. version: '1.0.0' contact: name: Blockchain.com url: https://www.blockchain.com/api license: name: Blockchain.com API Terms of Service url: https://www.blockchain.com/legal/terms x-generated-from: documentation x-last-validated: '2026-05-30' servers: - url: https://blockchain.info description: Blockchain.info explorer host (Bitcoin Data API + Query API). tags: - name: Blocks description: Bitcoin block lookups and the latest block. - name: Transactions description: Bitcoin transaction lookups. - name: Addresses description: Bitcoin address summaries and unspent outputs. - name: Network description: Simple network metrics — difficulty, block height, supply, ETA, averages. paths: # -------------------------------------------------------------- # BLOCKS # -------------------------------------------------------------- /rawblock/{block_hash}: get: operationId: getBlock summary: Blockchain.com Get a Single Block description: Returns detailed information about a specific block identified by its hash. tags: [Blocks] parameters: - name: block_hash in: path required: true description: Bitcoin block hash (64-character hex). schema: type: string example: 0000000000000000000abc... - name: format in: query required: false description: If set to `hex`, returns the raw block as a binary hex string. schema: type: string enum: [hex] responses: '200': description: Block detail. content: application/json: schema: $ref: '#/components/schemas/Block' x-microcks-operation: delay: 0 dispatcher: FALLBACK /block-height/{block_height}: get: operationId: getBlocksByHeight summary: Blockchain.com Get Blocks at a Height description: Returns the array of blocks at the specified blockchain height. tags: [Blocks] parameters: - name: block_height in: path required: true description: Block height (non-negative integer). schema: type: integer example: 850000 - name: format in: query required: true description: Must be `json` to return JSON. schema: type: string enum: [json] responses: '200': description: Blocks at the requested height. content: application/json: schema: $ref: '#/components/schemas/BlockListResponse' x-microcks-operation: delay: 0 dispatcher: FALLBACK /latestblock: get: operationId: getLatestBlock summary: Blockchain.com Get the Latest Block description: Returns the most recent block on the longest chain. tags: [Blocks] responses: '200': description: Latest block summary. content: application/json: schema: $ref: '#/components/schemas/LatestBlock' x-microcks-operation: delay: 0 dispatcher: FALLBACK # -------------------------------------------------------------- # TRANSACTIONS # -------------------------------------------------------------- /rawtx/{tx_hash}: get: operationId: getTransaction summary: Blockchain.com Get a Single Transaction description: Returns a specific transaction with its inputs, outputs, fees, and block height. tags: [Transactions] parameters: - name: tx_hash in: path required: true description: Bitcoin transaction hash (64-character hex). schema: type: string example: 0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098 - name: format in: query required: false description: If set to `hex`, returns the raw transaction as a binary hex string. schema: type: string enum: [hex] responses: '200': description: Transaction detail. content: application/json: schema: $ref: '#/components/schemas/Transaction' x-microcks-operation: delay: 0 dispatcher: FALLBACK # -------------------------------------------------------------- # ADDRESSES # -------------------------------------------------------------- /rawaddr/{bitcoin_address}: get: operationId: getAddress summary: Blockchain.com Get a Single Address description: | Returns information about a Bitcoin address including total received, total sent, final balance, and transactions (paginated). tags: [Addresses] parameters: - name: bitcoin_address in: path required: true description: Bitcoin address (Base58 or Bech32). schema: type: string example: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa - name: limit in: query required: false description: Maximum number of transactions to return (default 50). schema: type: integer default: 50 maximum: 50 - name: offset in: query required: false description: Number of transactions to skip for pagination (multiples of 50). schema: type: integer default: 0 responses: '200': description: Address detail. content: application/json: schema: $ref: '#/components/schemas/Address' x-microcks-operation: delay: 0 dispatcher: FALLBACK /multiaddr: get: operationId: getMultiAddress summary: Blockchain.com Get Multi-address Summary description: Returns balance and recent transactions for up to multiple addresses at once. tags: [Addresses] parameters: - name: active in: query required: true description: Pipe-delimited Bitcoin addresses (e.g. `addr1|addr2|addr3`). schema: type: string example: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa|3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy - name: n in: query required: false description: Number of recent transactions to return across all addresses (max 100). schema: type: integer default: 50 maximum: 100 - name: offset in: query required: false description: Number of transactions to skip for pagination. schema: type: integer default: 0 responses: '200': description: Multi-address response. content: application/json: schema: $ref: '#/components/schemas/MultiAddressResponse' x-microcks-operation: delay: 0 dispatcher: FALLBACK /unspent: get: operationId: getUnspentOutputs summary: Blockchain.com Get Unspent Outputs description: Returns the unspent transaction outputs (UTXOs) for one or more addresses. tags: [Addresses] parameters: - name: active in: query required: true description: Pipe-delimited Bitcoin addresses. schema: type: string example: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa|3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy - name: limit in: query required: false description: Maximum number of UTXOs to return (default 250, max 1000). schema: type: integer default: 250 maximum: 1000 - name: confirmations in: query required: false description: Minimum confirmations a UTXO must have to be returned. schema: type: integer default: 0 responses: '200': description: Unspent outputs. content: application/json: schema: $ref: '#/components/schemas/UnspentResponse' x-microcks-operation: delay: 0 dispatcher: FALLBACK # -------------------------------------------------------------- # SIMPLE QUERY API (text responses) # -------------------------------------------------------------- /q/getdifficulty: get: operationId: getDifficulty summary: Blockchain.com Get Current Difficulty description: Current mining difficulty target as a decimal number. tags: [Network] responses: '200': description: Difficulty value. content: text/plain: schema: type: string example: "92671248843810.34" x-microcks-operation: delay: 0 dispatcher: FALLBACK /q/getblockcount: get: operationId: getBlockCount summary: Blockchain.com Get Current Block Count description: Current block height in the longest chain. tags: [Network] responses: '200': description: Block height. content: text/plain: schema: type: integer example: 851234 x-microcks-operation: delay: 0 dispatcher: FALLBACK /q/latesthash: get: operationId: getLatestHash summary: Blockchain.com Get the Latest Block Hash description: Hash of the most recent block on the longest chain. tags: [Network] responses: '200': description: Latest block hash. content: text/plain: schema: type: string example: 00000000000000000004f4e7a1... x-microcks-operation: delay: 0 dispatcher: FALLBACK /q/bcperblock: get: operationId: getBcPerBlock summary: Blockchain.com Get the Current Block Reward description: Current block reward in BTC. tags: [Network] responses: '200': description: Block reward in BTC. content: text/plain: schema: type: number example: 3.125 x-microcks-operation: delay: 0 dispatcher: FALLBACK /q/totalbc: get: operationId: getTotalBc summary: Blockchain.com Get Total Bitcoins in Circulation description: Total Bitcoins in circulation (delayed by up to 1 hour), in Satoshi. tags: [Network] responses: '200': description: Total supply in Satoshi. content: text/plain: schema: type: integer format: int64 example: 1968000000000000 x-microcks-operation: delay: 0 dispatcher: FALLBACK /q/probability: get: operationId: getProbability summary: Blockchain.com Get Block Solve Probability description: Probability of a single hash attempt solving the next block. tags: [Network] responses: '200': description: Probability value. content: text/plain: schema: type: number example: 1.0e-23 x-microcks-operation: delay: 0 dispatcher: FALLBACK /q/hashestowin: get: operationId: getHashesToWin summary: Blockchain.com Get Hashes Needed to Solve a Block description: Average number of hashes required to solve a single block. tags: [Network] responses: '200': description: Hashes-to-win value. content: text/plain: schema: type: integer format: int64 example: 100000000000000000000000 x-microcks-operation: delay: 0 dispatcher: FALLBACK /q/nextretarget: get: operationId: getNextRetarget summary: Blockchain.com Get Next Difficulty Retarget Block description: Block height of the next difficulty re-target event. tags: [Network] responses: '200': description: Block height. content: text/plain: schema: type: integer example: 851840 x-microcks-operation: delay: 0 dispatcher: FALLBACK /q/avgtxsize: get: operationId: getAverageTxSize summary: Blockchain.com Get Average Transaction Size description: Average transaction size in bytes across the most recent blocks (configurable). tags: [Network] parameters: - name: blocks in: query required: false description: Number of trailing blocks to average over. schema: type: integer default: 1000 responses: '200': description: Average transaction size in bytes. content: text/plain: schema: type: integer example: 412 x-microcks-operation: delay: 0 dispatcher: FALLBACK /q/avgtxvalue: get: operationId: getAverageTxValue summary: Blockchain.com Get Average Transaction Value description: Average transaction value in Satoshi across the most recent blocks (configurable). tags: [Network] parameters: - name: blocks in: query required: false description: Number of trailing blocks to average over (default 1000). schema: type: integer default: 1000 responses: '200': description: Average transaction value in Satoshi. content: text/plain: schema: type: integer format: int64 example: 18400000 x-microcks-operation: delay: 0 dispatcher: FALLBACK /q/interval: get: operationId: getBlockInterval summary: Blockchain.com Get Average Interval Between Blocks description: Average time between blocks in seconds. tags: [Network] responses: '200': description: Interval in seconds. content: text/plain: schema: type: number example: 612.4 x-microcks-operation: delay: 0 dispatcher: FALLBACK /q/eta: get: operationId: getEta summary: Blockchain.com Get ETA of the Next Block description: Estimated number of seconds until the next block is mined. tags: [Network] responses: '200': description: ETA in seconds. content: text/plain: schema: type: number example: 235.0 x-microcks-operation: delay: 0 dispatcher: FALLBACK /q/avgtxnumber: get: operationId: getAverageTxNumber summary: Blockchain.com Get Average Transactions Per Block description: Average number of transactions per block over the most recent blocks. tags: [Network] parameters: - name: blocks in: query required: false description: Number of trailing blocks to average over. schema: type: integer default: 1000 responses: '200': description: Average transactions per block. content: text/plain: schema: type: integer example: 2840 x-microcks-operation: delay: 0 dispatcher: FALLBACK components: schemas: Block: type: object description: A Bitcoin block including its transactions, header, and chain status. properties: hash: type: string description: Block hash. example: 00000000000000000004f4e7a1... ver: type: integer description: Block version. example: 536870912 prev_block: type: string description: Previous block hash. mrkl_root: type: string description: Merkle root. time: type: integer format: int64 description: Block timestamp (Unix seconds). example: 1748609400000 bits: type: integer description: Difficulty bits. example: 1 nonce: type: integer format: int64 description: Nonce used to mine the block. example: 1 n_tx: type: integer description: Number of transactions in the block. example: 1 size: type: integer description: Block size in bytes. example: 1 block_index: type: integer format: int64 description: Internal block index. example: 1 main_chain: type: boolean description: True if this block is part of the main chain. example: true height: type: integer description: Block height. example: 851234 tx: type: array description: List of transactions included in the block. items: $ref: '#/components/schemas/Transaction' BlockListResponse: type: object description: Wrapper used by `block-height/{height}` returning an array of `Block` objects. properties: blocks: type: array items: $ref: '#/components/schemas/Block' LatestBlock: type: object description: Lightweight summary of the most recent block. properties: hash: type: string description: Block hash. example: 00000000000000000004f4e7a18a09b1f8e96d6fb01d9b6fce4d12cb3f8a7e21 time: type: integer format: int64 description: Block timestamp (Unix seconds). example: 1748609400000 block_index: type: integer format: int64 description: Internal block index. example: 1 height: type: integer description: Block height. example: 851234 txIndexes: type: array description: Internal transaction indexes for transactions in this block. items: type: integer format: int64 example: 1 Transaction: type: object description: A Bitcoin transaction with its inputs and outputs. properties: hash: type: string description: Transaction hash. example: 00000000000000000004f4e7a18a09b1f8e96d6fb01d9b6fce4d12cb3f8a7e21 ver: type: integer description: Transaction version. example: 1 vin_sz: type: integer description: Number of inputs. example: 1 vout_sz: type: integer description: Number of outputs. example: 1 size: type: integer description: Serialized transaction size in bytes. example: 1 weight: type: integer description: Transaction weight (BIP141). example: 1 fee: type: integer format: int64 description: Fee paid in Satoshi. example: 1 relayed_by: type: string description: IP address that relayed the transaction. lock_time: type: integer format: int64 description: Lock time (block height or Unix seconds). example: 1748609400000 tx_index: type: integer format: int64 description: Internal transaction index. example: 1 double_spend: type: boolean description: True if the transaction is a known double-spend. example: true time: type: integer format: int64 description: First-seen time (Unix seconds). example: 1748609400000 block_index: type: integer format: int64 description: Block index containing the transaction (null if unconfirmed). example: 1 block_height: type: integer description: Block height containing the transaction (null if unconfirmed). example: 851234 inputs: type: array description: Transaction inputs. items: $ref: '#/components/schemas/TxInput' out: type: array description: Transaction outputs. items: $ref: '#/components/schemas/TxOutput' TxInput: type: object description: A single Bitcoin transaction input. properties: sequence: type: integer format: int64 description: Sequence number. example: 1 witness: type: string description: SegWit witness data. script: type: string description: Input script (scriptSig) as hex. prev_out: $ref: '#/components/schemas/TxOutput' TxOutput: type: object description: A single Bitcoin transaction output (a UTXO before it is spent). properties: type: type: integer description: Output type indicator. example: 1 spent: type: boolean description: True if the output has been spent. example: true value: type: integer format: int64 description: Value in Satoshi. example: 100000 spending_outpoints: type: array description: Outpoints that spent this output (when spent). items: type: object properties: tx_index: type: integer format: int64 n: type: integer n: type: integer description: Output index within the transaction. example: 1 tx_index: type: integer format: int64 description: Internal transaction index. example: 1 script: type: string description: Output script (scriptPubKey) as hex. addr: type: string description: Destination address (when derivable). Address: type: object description: Address summary including balances and transaction history. properties: hash160: type: string description: Hash160 representation of the address. example: 00000000000000000004f4e7a18a09b1f8e96d6fb01d9b6fce4d12cb3f8a7e21 address: type: string description: Bitcoin address. example: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa n_tx: type: integer description: Number of transactions involving this address. example: 1 n_unredeemed: type: integer description: Number of unredeemed outputs. example: 1 total_received: type: integer format: int64 description: Total received in Satoshi. example: 1 total_sent: type: integer format: int64 description: Total sent in Satoshi. example: 1 final_balance: type: integer format: int64 description: Current balance in Satoshi. example: 100000 txs: type: array description: Recent transactions involving the address (paginated). items: $ref: '#/components/schemas/Transaction' MultiAddressResponse: type: object description: Multi-address summary plus recent transactions across all addresses. properties: addresses: type: array description: Per-address summary entries. items: type: object properties: address: type: string n_tx: type: integer total_received: type: integer format: int64 total_sent: type: integer format: int64 final_balance: type: integer format: int64 change_index: type: integer account_index: type: integer wallet: type: object description: Aggregate balances across the supplied addresses. properties: n_tx: type: integer n_tx_filtered: type: integer total_received: type: integer format: int64 total_sent: type: integer format: int64 final_balance: type: integer format: int64 txs: type: array description: Most recent transactions across all addresses. items: $ref: '#/components/schemas/Transaction' UnspentResponse: type: object description: Unspent outputs for the requested addresses. properties: notice: type: string description: Optional explanatory notice. unspent_outputs: type: array description: List of UTXOs. items: $ref: '#/components/schemas/UnspentOutput' UnspentOutput: type: object description: A single UTXO owned by one of the requested addresses. properties: tx_hash: type: string description: Hash of the funding transaction (little-endian). example: 00000000000000000004f4e7a18a09b1f8e96d6fb01d9b6fce4d12cb3f8a7e21 tx_hash_big_endian: type: string description: Hash of the funding transaction (big-endian). example: 00000000000000000004f4e7a18a09b1f8e96d6fb01d9b6fce4d12cb3f8a7e21 tx_output_n: type: integer description: Output index within the funding transaction. example: 1 script: type: string description: Output script (scriptPubKey) as hex. value: type: integer format: int64 description: Output value in Satoshi. example: 100000 value_hex: type: string description: Output value in hex. confirmations: type: integer description: Number of confirmations. example: 1 tx_index: type: integer format: int64 description: Internal transaction index. example: 1