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

Authorizations

apikey
string
query
required

Optional API key for increased rate limits.

Without API key:

  • 5 requests per second (shared pool)
  • No registration required

With API key:

  • 10 requests per second per key
  • Up to 3 free keys per account
  • Get your API key at https://blockscout.com (login required)

Usage: Add apikey=YOUR_KEY to any request query string.

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
enum<string>
required

JSON-RPC version

Available options:
2.0
Example:

"2.0"

method
enum<string>
required

Must be "eth_blockNumber"

Available options:
eth_blockNumber
Example:

"eth_blockNumber"

id
required

Request identifier, echoed in the response

Example:

1

params
(string | boolean | object | integer)[]
Example:
[]

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