eth_getBlockByHash
Retrieve detailed block information by its hash, including transactions, gas used, and timestamp. Optionally return full transaction objects.
Instructions
Get detailed block information using its hash.
Args:
blockHash (string): 32-byte block hash (66 chars with 0x prefix).
fullTransactions (boolean): If true, returns full tx objects; if false, returns tx hashes only.
network (string, optional): Ethereum network to query. Defaults to 'mainnet'.
Returns:
Block object with number, hash, parentHash, transactions, gasUsed, timestamp, etc. Returns null if block not found.
Examples:
"Get block with tx hashes": { "blockHash": "0x...", "fullTransactions": false }
"Get block with full txs": { "blockHash": "0x...", "fullTransactions": true, "network": "mainnet" }
Errors:
InvalidParams: When blockHash format is invalid (not 66 char hex).
InternalError: When Infura API is unavailable or returns an error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| blockHash | Yes | The 32-byte hash of the block to retrieve. | |
| fullTransactions | No | If true, returns full transaction objects; if false, returns transaction hashes. | |
| network | No | The Ethereum network to query, e.g., 'mainnet' or 'sepolia'. | mainnet |
| response_format | No | Output format: 'json' for structured data, 'markdown' for human-readable. | json |