> ## 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 detailed Bitcoin block information by block height or hash including transactions, size, and mining details.

# Block Info



## OpenAPI

````yaml bitcoin/blockchain-indexer-api/openapi.json get /blocks/{height_or_hash}
openapi: 3.0.3
info:
  title: Bitcoin - Blockchain Indexer API
  description: >-
    This API provides core indexer endpoints with support for Bitcoin
    metaprotocols by delivering real-time, rollback-protected access to
    Bitcoin's UTXO data, enabling developers to build responsive and reliable
    blockchain applications without managing complex infrastructure.


    #### Key Features:

    - **Real-Time Data with Rollback Protection:** Ensures data accuracy by
    handling chain reorganizations gracefully, providing live data without
    sacrificing integrity.

    - **Comprehensive UTXO Indexing:** Specialized pipelines extract, match, and
    process on-chain information, including handling rollbacks, to provide
    accurate and up-to-date data.


    #### Key Benefits for Developers:

    By abstracting the complexities of blockchain data retrieval and processing,
    Maestro's Bitcoin Indexer API empowers developers to focus on building
    innovative applications with confidence in fast and reliable access to
    historical chain data.
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.txt
  version: v0.2.0
servers:
  - url: https://xbt-mainnet.gomaestro-api.org/v0
    description: Bitcoin Mainnet
  - url: https://xbt-testnet.gomaestro-api.org/v0
    description: Bitcoin Testnet
security:
  - api-key: []
paths:
  /blocks/{height_or_hash}:
    get:
      tags:
        - Blocks
      summary: Block Info
      description: >-
        Fetches full details of a block using its hash. Returns information such
        as height, timestamp, transaction count, miner, and size. Can be used to
        explore block metadata or confirm inclusion of transactions.
      operationId: block_info
      parameters:
        - name: height_or_hash
          in: path
          description: Block height or block hash
          required: true
          schema:
            type: string
          example: 000000000000000000004fe9dc835b41f2da749287c4d1fca9055d83b2e06fa4
        - name: from_timestamp
          in: query
          description: >-
            Whether numeric path param should be taken as timestamp instead of
            block height. Default: false.
          required: false
          schema:
            type: boolean
            nullable: true
      responses:
        '200':
          description: Requested data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TimestampedBlock'
              example:
                data:
                  coinbase_tag: >-
                    A8tlDQgvVmlhQlRDLyz6vm1tPXaDOuJgXZs6zuF9J7o+V55Fu/UWyF9S+hZG5d/z+c8QAAAAAAAAABDThC4BY8HxNM7fc9SQsQ8AAAAAAA==
                  hash: >-
                    000000000000000000004fe9dc835b41f2da749287c4d1fca9055d83b2e06fa4
                  height: 878027
                  metaprotocols:
                    - inscriptions
                    - runes
                    - brc20
                  miner_name: ViaBTC
                  size: 1865672
                  timestamp: '2025-01-06 02:09:37'
                  total_fees: '2110512'
                  total_txs: 1849
                  total_volume: '240371600038'
                  unix_timestamp: 1736129377
                  weight_units: 3993329
                last_updated:
                  block_hash: >-
                    00000000000000000002467d678b845978ef175b424cff2985860bb156280c53
                  block_height: 878064
        '400':
          description: Malformed query parameters
        '404':
          description: Requested entity not found on-chain
        '500':
          description: Internal server error
components:
  schemas:
    TimestampedBlock:
      type: object
      required:
        - data
        - last_updated
      properties:
        data:
          $ref: '#/components/schemas/BlockInfo'
        last_updated:
          $ref: '#/components/schemas/ChainTip'
    BlockInfo:
      type: object
      required:
        - height
        - hash
        - size
        - weight_units
        - unix_timestamp
        - timestamp
        - total_fees
        - total_volume
        - total_txs
        - metaprotocols
        - coinbase_tag
      properties:
        coinbase_tag:
          type: string
          description: Base64-encoding of script pubkey used in coinbase transaction input.
          example: >-
            A8tlDQgvVmlhQlRDLyz6vm1tPXaDOuJgXZs6zuF9J7o+V55Fu/UWyF9S+hZG5d/z+c8QAAAAAAAAABDThC4BY8HxNM7fc9SQsQ8AAAAAAA==
        hash:
          type: string
          description: Block hash.
          example: 0000000000000000000290db65621592a96224ecbe92ae22532a35dc40213471
        height:
          type: integer
          format: int64
          description: Block height.
          example: 875075
          minimum: 0
        metaprotocols:
          type: array
          items:
            $ref: '#/components/schemas/Metaprotocol'
          description: Whether any of the transactions in the block involved metaprotocols.
        miner_name:
          type: string
          description: Miner name.
          example: ViaBTC
          nullable: true
        size:
          type: integer
          format: int64
          description: Block size in bytes.
          example: 1865672
          minimum: 0
        timestamp:
          type: string
          description: The timestamp of the block, as claimed by the miner, in UTC format.
          example: '2024-12-16 22:48:06'
        total_fees:
          type: string
          description: Total fees paid by all transactions in the block, in satoshis.
          example: '2110512'
        total_txs:
          type: integer
          format: int32
          description: Total number of transactions.
          example: '1849'
          minimum: 0
        total_volume:
          type: string
          description: Total number of satoshis that went through this block, minus fees.
          example: '240371600038'
        unix_timestamp:
          type: integer
          format: int32
          description: The timestamp of the block, as claimed by the miner.
          example: 1734389286
          minimum: 0
        weight_units:
          type: integer
          format: int64
          description: Number of weight units (WU) of the block.
          example: 3993329
          minimum: 0
    ChainTip:
      type: object
      required:
        - block_hash
        - block_height
      properties:
        block_hash:
          type: string
          description: The hash of the block
          example: 0000000000000000000a7f3b7b6b6e1d9a18db65a3b4a3f4f3bcb2e1f1b2d3e7
        block_height:
          type: integer
          format: int64
          description: The height of the block in the blockchain
          example: 707000
          minimum: 0
    Metaprotocol:
      type: string
      enum:
        - inscriptions
        - runes
        - brc20
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: api-key
      description: Project API Key

````