Skip to main content
GET
/
legacy
/
block
/
eth-block-number
Get the latest block number
curl --request GET \
  --url http://localhost/api/legacy/block/eth-block-number
{
  "id": 123,
  "jsonrpc": "2.0",
  "result": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.blockscout.com/llms.txt

Use this file to discover all available pages before exploring further.

Query Parameters

id

JSON-RPC request id echoed back in the response. Defaults to 1 when omitted.

apikey
string

API key for rate limiting or for sensitive endpoints

key
string

Secret key for getting access to restricted resources

Response

200 - application/json

Latest block number

id
required

Echoes the request id. When the client omits it, the server echoes integer 1.

jsonrpc
enum<string>
required

JSON-RPC protocol version, always 2.0.

Available options:
2.0
result
string | null
required

Endpoint-specific payload.

Pattern: ^0x[0-9a-fA-F]+$