> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gomaestro.org/llms.txt
> Use this file to discover all available pages before exploring further.

> Get Merkle proof for a Bitcoin transaction to verify its inclusion in a specific block.

# Transaction Merkle Proof



## OpenAPI

````yaml bitcoin/esplora-api/openapi.json get /tx/{txid}/merkle-proof
openapi: 3.0.3
info:
  title: Bitcoin - Esplora API
  version: 1.0.0
  description: >
    OpenAPI spec for core Esplora endpoints: blocks, transactions, addresses,
    mempool, fees, UTXO data and more.
servers:
  - url: https://xbt-mainnet.gomaestro-api.org/v0/esplora
  - url: https://xbt-testnet.gomaestro-api.org/v0/esplora
security:
  - api-key: []
paths:
  /tx/{txid}/merkle-proof:
    get:
      tags:
        - Transactions
      summary: Transaction Merkle Proof
      description: >-
        Returns a merkle inclusion proof for the transaction using Electrum's
        blockchain.transaction.get_merkle format.
      parameters:
        - name: txid
          in: path
          required: true
          schema:
            type: string
            example: d78b1139140848e646cfd7eb95868d2e01c600c3922de88038c591d2fb55cf96
          description: The transaction ID to get the merkle proof for.
      responses:
        '200':
          description: Merkle inclusion proof data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MerkleProof'
              examples:
                example:
                  value:
                    block_height: 776302
                    merkle:
                      - 4a5e1e4b...
                      - b5b4e9f0...
                    pos: 142
        '404':
          description: Transaction not found or not confirmed.
components:
  schemas:
    MerkleProof:
      type: object
      properties:
        block_height:
          type: integer
          description: Block height where the transaction was included.
        merkle:
          type: array
          description: Merkle branch hashes proving the inclusion of the transaction.
          items:
            type: string
        pos:
          type: integer
          description: Position of the transaction in the block's merkle tree.
      required:
        - block_height
        - merkle
        - pos
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: api-key
      description: Project API Key

````