Skip to main content
POST
/
tools
/
web3
/
evm
/
eth-get-block-by-hash
Get Block by Hash
curl --request POST \
  --url https://api.dirtroad.dev/tools/web3/evm/eth-get-block-by-hash \
  --header 'Content-Type: application/json' \
  --header 'X-Payment: <api-key>' \
  --data '{
  "chain": "<string>",
  "blockHash": "<string>",
  "includeTransactions": false
}'
{
  "chain": "<string>",
  "blockHash": "<string>",
  "includeTransactions": true,
  "block": {
    "baseFeePerGas": "<string>",
    "blobGasUsed": "<string>",
    "difficulty": "<string>",
    "excessBlobGas": "<string>",
    "extraData": "<string>",
    "gasLimit": "<string>",
    "gasUsed": "<string>",
    "hash": "<string>",
    "logsBloom": "<string>",
    "miner": "<string>",
    "mixHash": "<string>",
    "nonce": "<string>",
    "number": "<string>",
    "parentBeaconBlockRoot": "<any>",
    "parentHash": "<string>",
    "receiptsRoot": "<string>",
    "sealFields": [
      "<string>"
    ],
    "sha3Uncles": "<string>",
    "size": "<string>",
    "stateRoot": "<string>",
    "timestamp": "<string>",
    "totalDifficulty": "<string>",
    "transactions": [
      "<any>"
    ],
    "transactionsRoot": "<string>",
    "uncles": [
      "<string>"
    ],
    "withdrawals": "<any>",
    "withdrawalsRoot": "<any>"
  }
}

Authorizations

X-Payment
string
header
required

x402 blockchain payment authorization header containing signed EIP-3009 Transfer with Authorization

Body

application/json
chain
string
required

CAIP-12 chain identifier or slug

blockHash
string
required

Block hash as hex string

includeTransactions
boolean
default:false

Whether to include full transaction objects in the response

Response

Block data retrieved successfully

chain
string
required

CAIP-12 chain identifier

blockHash
string
required

Block hash requested

includeTransactions
boolean
required

Whether transactions were included

block
object
required

Complete block data with all BigInt values converted to strings