eth_getBlockByNumber
Get Ethereum block details by block number or tag, including transactions, gas used, and timestamp. Works on multiple networks.
Instructions
Get detailed block information using its number or tag.
Args:
blockNumber (string): Block number as hex (e.g., '0x10d4f') or tag ('latest', 'earliest', 'pending').
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 latest block": { "blockNumber": "latest", "fullTransactions": false }
"Get specific block with full txs": { "blockNumber": "0x10d4f", "fullTransactions": true }
Errors:
InvalidParams: When blockNumber format is invalid.
InternalError: When Infura API is unavailable or returns an error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| blockNumber | Yes | The block number in hexadecimal format or one of the string tags `latest`, `earliest`, or `pending`. | |
| fullTransactions | No | If true, returns the full transaction objects; if false, returns only the hashes of the transactions. | |
| 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 |