Ethereum icon

Ethereum

Interact with Ethereum blockchain

Block → Get Block

AI-generated

Summary

Retrieve an Ethereum block identified by number, hash, or tag.

Inputs

  • blockIdentifierType — Method to specify which block identifier to use.
  • blockNumber — The numeric block height to fetch.
  • blockHash — Hexadecimal hash of the block to fetch.
  • blockTag — Tag to identify the block; options are latest, earliest, or pending.
  • includeTransactions — Whether to include full transaction objects or just transaction hashes.

Output shape

a block object

Returns block metadata; if includeTransactions is true, the response includes full transaction details, otherwise only transaction hashes.

Examples

Example 1: Get the latest block with full transactions

blockIdentifierType=tag&blockTag=latest&includeTransactions=true

Example 2: Get a block by its hash without transactions

blockIdentifierType=hash&blockHash=0xabc123...&includeTransactions=false

Example 3: Get a block by number using default settings

blockIdentifierType=number&blockNumber=12345

Links

Discussion