Blockchain.com Bitcoin API

BTC blockchain endpoints

Operations 6

POST /x402/btc/address Get BTC address balance (paid via x402) #
POST /x402/btc/address/transactions Get paginated BTC address transactions (paid via x402) #
POST /x402/btc/transaction Get BTC transaction detail (paid via x402) #
POST /x402/btc/transactions Get multiple BTC transactions by ID (paid via x402) #
POST /x402/btc/block Get BTC block by hash or height (paid via x402) #
POST /x402/btc/blocks Get latest BTC blocks (paid via x402) #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/blockchain-7-bitcoin-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

blockchain-7-bitcoin-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Blockchain 7 Bitcoin API
  version: 1.0.0
  contact:
    email: api@blockchain.com
  x-guidance: Free endpoints under /public/* return blockchain explorer data (Solana, Bitcoin, Bitcoin Cash and Ethereum blocks, transactions, addresses and token balances) plus Bitcoin network charts, no payment required. Every endpoint also has an AI-agent-facing, pay-per-call mirror under /public/x402/* with an identical request/response shape, gated by x402 payment (see each paid operation's x-payment-info and 402 response). Use the free path for normal API access; use the x402/ path when paying per-request as an autonomous agent.
  description: 'Operations tagged Bitcoin across 2 of this provider''s published API definitions: blockchain-7-api-ucp.json, blockchain-7-api-acp.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.blockchain.info/explorer-gateway-kt
security:
- ApiKeyAuth: []
- {}
tags:
- name: Bitcoin
  description: BTC blockchain endpoints
paths:
  /x402/btc/address:
    post:
      summary: Get BTC address balance (paid via x402)
      operationId: getBtcAddressX402
      x-x402-price: 1000
      tags:
      - Bitcoin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HaskoinAddressRequest'
            example:
              address: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
      responses:
        '200':
          description: Address balance info
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HaskoinAddressResponse'
        '404':
          $ref: '#/components/responses/Error'
        '402':
          description: Payment Required
      x-payment-info:
        price:
          mode: fixed
          currency: USD
          amount: '0.001000'
        protocols:
        - x402: {}
    servers:
    - url: https://api.blockchain.info/explorer-gateway-kt
  /x402/btc/address/transactions:
    post:
      summary: Get paginated BTC address transactions (paid via x402)
      operationId: getBtcAddressTransactionsX402
      x-x402-price: 1500
      tags:
      - Bitcoin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HaskoinAddressTransactionsRequest'
            example:
              address: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
              limit: 20
              offset: 0
      responses:
        '200':
          description: Paginated transaction list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HaskoinAddressTransactionsResponse'
        '404':
          $ref: '#/components/responses/Error'
        '402':
          description: Payment Required
      x-payment-info:
        price:
          mode: fixed
          currency: USD
          amount: '0.001500'
        protocols:
        - x402: {}
    servers:
    - url: https://api.blockchain.info/explorer-gateway-kt
  /x402/btc/transaction:
    post:
      summary: Get BTC transaction detail (paid via x402)
      operationId: getBtcTransactionX402
      x-x402-price: 1000
      tags:
      - Bitcoin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HaskoinTransactionRequest'
            example:
              txId: 4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b
      responses:
        '200':
          description: Transaction detail
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HaskoinTransactionResponse'
        '404':
          $ref: '#/components/responses/Error'
        '402':
          description: Payment Required
      x-payment-info:
        price:
          mode: fixed
          currency: USD
          amount: '0.001000'
        protocols:
        - x402: {}
    servers:
    - url: https://api.blockchain.info/explorer-gateway-kt
  /x402/btc/transactions:
    post:
      summary: Get multiple BTC transactions by ID (paid via x402)
      operationId: getBtcTransactionsX402
      x-x402-price: 2000
      tags:
      - Bitcoin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HaskoinTransactionsRequest'
            example:
              txIds:
              - 4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b
      responses:
        '200':
          description: Transaction list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HaskoinTransactionsResponse'
        '404':
          $ref: '#/components/responses/Error'
        '500':
          $ref: '#/components/responses/Error'
        '402':
          description: Payment Required
      x-payment-info:
        price:
          mode: fixed
          currency: USD
          amount: '0.002000'
        protocols:
        - x402: {}
    servers:
    - url: https://api.blockchain.info/explorer-gateway-kt
  /x402/btc/block:
    post:
      summary: Get BTC block by hash or height (paid via x402)
      operationId: getBtcBlockX402
      x-x402-price: 3000
      tags:
      - Bitcoin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HaskoinBlockRequest'
            examples:
              byHash:
                summary: Lookup by block hash
                value:
                  hash: 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
              byHeight:
                summary: Lookup by block height
                value:
                  height: 850000
      responses:
        '200':
          description: Full block data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HaskoinBlockResponse'
        '400':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '500':
          $ref: '#/components/responses/Error'
        '402':
          description: Payment Required
      x-payment-info:
        price:
          mode: fixed
          currency: USD
          amount: '0.003000'
        protocols:
        - x402: {}
    servers:
    - url: https://api.blockchain.info/explorer-gateway-kt
  /x402/btc/blocks:
    post:
      summary: Get latest BTC blocks (paid via x402)
      operationId: getBtcLatestBlocksX402
      x-x402-price: 2000
      tags:
      - Bitcoin
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HaskoinLatestBlocksRequest'
            examples:
              tip:
                summary: Latest 10 blocks from chain tip
                value:
                  limit: 10
              paginated:
                summary: Next page after block 849900
                value:
                  limit: 20
                  after: 849900
      responses:
        '200':
          description: Latest blocks with transaction count per block
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HaskoinLatestBlocksResponse'
        '500':
          $ref: '#/components/responses/Error'
        '402':
          description: Payment Required
      x-payment-info:
        price:
          mode: fixed
          currency: USD
          amount: '0.002000'
        protocols:
        - x402: {}
    servers:
    - url: https://api.blockchain.info/explorer-gateway-kt
components:
  schemas:
    ErrorResponse:
      type: object
      required:
      - error
      properties:
        error:
          type: object
          required:
          - code
          - message
          properties:
            code:
              type: string
              example: FETCH_ERROR
            message:
              type: string
              example: Transaction not found
    HaskoinAddressRequest:
      type: object
      required:
      - address
      properties:
        address:
          type: string
          description: Bitcoin or Bitcoin Cash address
    HaskoinOutput:
      type: object
      required:
      - spent
      properties:
        address:
          type: string
          nullable: true
        pkscript:
          type: string
          nullable: true
          description: Public key script (scriptPubKey)
        value:
          type: integer
          format: int64
          nullable: true
          description: Output value in satoshis
        spent:
          type: boolean
        spender:
          type: object
          nullable: true
          description: Transaction that spent this output
          properties:
            txid:
              type: string
            input:
              type: integer
    HaskoinTransactionRequest:
      type: object
      required:
      - txId
      properties:
        txId:
          type: string
    HaskoinTransactionResponse:
      type: object
      required:
      - txId
      - mempool
      - rbf
      - inputs
      - outputs
      properties:
        txId:
          type: string
        blockHeight:
          type: integer
          format: int64
          nullable: true
          description: Block height; null if unconfirmed
        blockPosition:
          type: integer
          nullable: true
          description: Position within the block
        mempool:
          type: boolean
          description: True if the transaction is unconfirmed
        mempoolTime:
          type: integer
          format: int64
          nullable: true
          description: Unix timestamp when the tx entered the mempool
        time:
          type: integer
          format: int64
          nullable: true
          description: Block timestamp
        fee:
          type: integer
          format: int64
          nullable: true
          description: Fee in satoshis
        size:
          type: integer
          nullable: true
          description: Transaction size in bytes
        weight:
          type: integer
          nullable: true
          description: SegWit weight units
        rbf:
          type: boolean
          description: Replace-by-fee flag
        inputs:
          type: array
          items:
            $ref: '#/components/schemas/HaskoinInput'
        outputs:
          type: array
          items:
            $ref: '#/components/schemas/HaskoinOutput'
        version:
          type: integer
          nullable: true
          description: Transaction version
        locktime:
          type: integer
          format: int64
          nullable: true
          description: Transaction locktime
        deleted:
          type: boolean
          nullable: true
          description: True if the transaction has been deleted/replaced
    HaskoinAddressTransactionsResponse:
      type: object
      required:
      - transactions
      - limit
      - offset
      properties:
        transactions:
          type: array
          items:
            $ref: '#/components/schemas/HaskoinTransactionResponse'
        limit:
          type: integer
        offset:
          type: integer
    HaskoinBlockResponse:
      type: object
      required:
      - hash
      - height
      - mainchain
      - txs
      properties:
        hash:
          type: string
          description: Block hash
        height:
          type: integer
          format: int64
          description: Block height
        mainchain:
          type: boolean
          description: True if this block is on the main chain
        previous:
          type: string
          nullable: true
          description: Previous block hash
        time:
          type: integer
          format: int64
          nullable: true
          description: Unix timestamp of the block
        version:
          type: integer
          nullable: true
          description: Block version
        bits:
          type: integer
          format: int64
          nullable: true
          description: Difficulty target in compact form
        nonce:
          type: integer
          format: int64
          nullable: true
          description: Proof-of-work nonce
        size:
          type: integer
          nullable: true
          description: Block size in bytes
        weight:
          type: integer
          nullable: true
          description: Block weight (SegWit)
        txs:
          type: array
          items:
            $ref: '#/components/schemas/HaskoinTransactionResponse'
          description: Full transaction details for all transactions in the block
        merkle:
          type: string
          nullable: true
          description: Merkle root hash
        subsidy:
          type: integer
          format: int64
          nullable: true
          description: Coinbase subsidy in satoshis
        fees:
          type: integer
          format: int64
          nullable: true
          description: Total fees collected in satoshis
        outputs:
          type: integer
          format: int64
          nullable: true
          description: Total output value in satoshis
        work:
          type: string
          nullable: true
          description: Cumulative chain work (hex)
    HaskoinLatestBlocksResponse:
      type: object
      required:
      - currentHeight
      - blocks
      properties:
        currentHeight:
          type: integer
          format: int64
        blocks:
          type: array
          items:
            $ref: '#/components/schemas/HaskoinBlockSummary'
    HaskoinLatestBlocksRequest:
      type: object
      properties:
        limit:
          type: integer
          default: 10
          minimum: 1
          maximum: 50
          description: Number of blocks to return (capped at 50)
        after:
          type: integer
          format: int64
          nullable: true
          description: Cursor for pagination — block height to start from (inclusive, descending). Omit to start from the current chain tip.
    HaskoinInput:
      type: object
      required:
      - coinbase
      - witness
      properties:
        coinbase:
          type: boolean
        txid:
          type: string
          nullable: true
          description: Spending transaction ID; null for coinbase
        output:
          type: integer
          format: int64
          nullable: true
          description: Output index being spent
        sigscript:
          type: string
          nullable: true
          description: Signature script (scriptSig)
        sequence:
          type: integer
          format: int64
          nullable: true
          description: Input sequence number
        pkscript:
          type: string
          nullable: true
          description: Public key script of the output being spent
        value:
          type: integer
          format: int64
          nullable: true
          description: Input value in satoshis
        address:
          type: string
          nullable: true
        witness:
          type: array
          items:
            type: string
          description: SegWit witness data
    HaskoinBlockSummary:
      type: object
      required:
      - hash
      - height
      - mainchain
      - txCount
      description: Block header with transaction count — returned by the latest-blocks endpoint.
      properties:
        hash:
          type: string
          description: Block hash
        height:
          type: integer
          format: int64
        mainchain:
          type: boolean
          description: True if this block is on the main chain
        previous:
          type: string
          nullable: true
          description: Previous block hash
        time:
          type: integer
          format: int64
          nullable: true
          description: Unix timestamp of the block
        version:
          type: integer
          nullable: true
        bits:
          type: integer
          format: int64
          nullable: true
          description: Difficulty target in compact form
        nonce:
          type: integer
          format: int64
          nullable: true
        size:
          type: integer
          nullable: true
          description: Block size in bytes
        weight:
          type: integer
          nullable: true
          description: Block weight (SegWit)
        merkle:
          type: string
          nullable: true
          description: Merkle root hash
        subsidy:
          type: integer
          format: int64
          nullable: true
          description: Coinbase subsidy in satoshis
        fees:
          type: integer
          format: int64
          nullable: true
          description: Total fees collected in satoshis
        outputs:
          type: integer
          format: int64
          nullable: true
          description: Total output value in satoshis
        work:
          type: string
          nullable: true
          description: Cumulative chain work (hex)
        txCount:
          type: integer
          description: Number of transactions in the block
        coinBaseTx:
          nullable: true
          allOf:
          - $ref: '#/components/schemas/HaskoinTransactionResponse'
          description: Full details of the coinbase (first) transaction in the block; null if unavailable
    HaskoinAddressResponse:
      type: object
      required:
      - address
      - confirmed
      - unconfirmed
      - utxo
      - txCount
      - received
      properties:
        address:
          type: string
        confirmed:
          type: integer
          format: int64
          description: Confirmed balance in satoshis
        unconfirmed:
          type: integer
          format: int64
          description: Unconfirmed balance in satoshis
        utxo:
          type: integer
          description: Number of unspent outputs
        txCount:
          type: integer
          description: Total number of transactions
        received:
          type: integer
          format: int64
          description: Total received in satoshis
    HaskoinTransactionsResponse:
      type: object
      required:
      - transactions
      properties:
        transactions:
          type: array
          items:
            $ref: '#/components/schemas/HaskoinTransactionResponse'
    HaskoinTransactionsRequest:
      type: object
      required:
      - txIds
      properties:
        txIds:
          type: array
          items:
            type: string
          maxItems: 50
    HaskoinAddressTransactionsRequest:
      type: object
      required:
      - address
      properties:
        address:
          type: string
        limit:
          type: integer
          default: 20
          minimum: 1
          maximum: 50
        offset:
          type: integer
          default: 0
          minimum: 0
    HaskoinBlockRequest:
      type: object
      properties:
        hash:
          type: string
          description: Block hash — exactly 64 hex characters. Provide either hash or height, not both.
          example: 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
        height:
          type: integer
          format: int64
          description: Block height (non-negative integer). Provide either hash or height, not both.
          example: 850000
  responses:
    Error:
      description: Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Explorer-Auth-Key
      description: Optional. Provide your Explorer API key in the `X-Explorer-Auth-Key` header. Requests sent without a key use the default (unauthenticated) rate limits.
x-refined-from:
- blockchain-7-api-ucp.json
- blockchain-7-api-acp.json