Skip to main content
POST
/
eth-rpc
Ethereum JSON-RPC endpoint
curl --request POST \
  --url https://eth.blockscout.com/api/eth-rpc \
  --header 'Content-Type: application/json' \
  --data '
{
  "jsonrpc": "2.0",
  "method": "eth_blockNumber",
  "params": [],
  "id": 1
}
'
{
  "jsonrpc": "2.0",
  "result": "0x1234567",
  "id": 1
}

Query Parameters

apikey
string

Optional API key for increased rate limits. Without a key: 5 req/s shared. With a key: 10 req/s dedicated.

Example:

"your_api_key_here"

Body

application/json

Returns the latest block number in the chain in hexadecimal format.

JSON-RPC Method: eth_blockNumber

This endpoint uses the standard Ethereum JSON-RPC 2.0 format.

jsonrpc
string
default:2.0
required

JSON-RPC version

Example:

"2.0"

method
enum<string>
required

Must be "eth_blockNumber"

Available options:
eth_blockNumber
Example:

"eth_blockNumber"

params
array
required

No parameters required

id
required

A client-defined identifier for this request. The server echoes it back unchanged in the response, so you can match responses to requests. This is especially useful when sending multiple calls in a batch. For single requests any value works — use any integer (e.g. 1) or string (e.g. "my-request"). Set to null if you do not need to correlate the response.

Example:

1

Response

200 - application/json

Successful JSON-RPC 2.0 response

jsonrpc
string
Example:

"2.0"

result
any

Method result (type varies by method)

error
object

Present only on error

id
Example:

1