# Ethereum eth_getBlockTransactionCountByHash RPC method

Ethereum API method that returns the number of transactions in the block matching the given block hash.

Parameters:

  • hash — the hash of the block.

Returns:

  • result — the integer number of transactions in the block.

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.getBlockTransactionCount("0x9bff49171de27924fa958faf7b7ce605c1ff0fdee86f4c0c74239e6ae20d9446", (err, block) => {
    console.log(block)
})