# Ethereum eth_blockNumber RPC method

Ethereum API method that returns the latest block number of the blockchain.

Parameters:

  • none

Returns:

  • result — the integer value of the latest block number, 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.getBlockNumber((err,block) => {
    console.log("latest block", block)
})