# Ethereum eth_getUncleCountByBlockHash RPC method

Ethereum API method that returns the number of uncles for the block matching the given block hash.

Parameters:

  • hash — the hash of the block to retrieve uncles from.

Returns:

  • uncles — the integer value of the number of uncles in the block, encoded as hexadecimal.

Example:

  • web3.js
  • web3.py
  • eth.rb
  • cURL
const Web3 = require("web3");
const node_url = "CHAINSTACK_NODE_URL";
const web3 = new Web3(node_url);
web3.eth.getBlockUncleCount("0x685b2226cbf6e1f890211010aa192bf16f0a0cba9534264a033b023d7367b845", (err, uncle) => {
    console.log(uncle)
})