Skip to main content
POST
/
eth-rpc#eth_blockNumber
Get Latest Block Number
curl --request POST \
  --url 'https://eth.blockscout.com/api/eth-rpc?apikey=#eth_blockNumber' \
  --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
jsonrpc
enum<string>
required
Available options:
2.0
Example:

"2.0"

method
enum<string>
required
Available options:
eth_blockNumber
Example:

"eth_blockNumber"

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

1

Response

200 - application/json

Successful JSON-RPC response

jsonrpc
string
Example:

"2.0"

result
any

Method result (varies by method)

id
Example:

1