eth_getBlockByNumber
Return block data for one block number or tag.
Method
eth_getBlockByNumberRoute familyEVM
StageGeneral availability
Available under EVM HTTP API. Use the chain-family pages for route switching and the method pages for exact request and response shapes.
Access patterns
| Pattern | Value | Notes |
|---|---|---|
| Compatibility URL (Recommended) | POST /v1/{EVM_CHAIN}/{API_KEY} | Public RPC onboarding uses one URL that already carries the API key. This fits mainstream wallets, RPC clients, and infrastructure tooling that expect one endpoint string. |
| Internal raw route | POST /rpc/{EVM_CHAIN} | The gateway rewrites compatibility URLs to internal raw RPC routes. This internal route is implementation detail, not the preferred public onboarding form. |
Examples
Compatibility URL example
curl -X POST "{RPC_HTTP_BASE_URL}/v1/ethereum/<api_key>" \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "id": 1, "method": "eth_getBlockByNumber", "params": [ "latest", false]}'Try send
Try eth_getBlockByNumber
Send one direct browser request to the current hosted gateway base URL so the real network request is visible in devtools. The API key is only stored locally when you provide one.
Request fields
JSON-RPC request body
| Field | Type | Required | Notes |
|---|---|---|---|
jsonrpc | string | Required | JSON-RPC version. Use `2.0`. |
id | string | number | Required | Caller request id. |
method | string | Required | Allowlisted chain method. |
params | array | Required | Method arguments. |
Response fields
JSON-RPC response body
| Field | Type | Notes |
|---|---|---|
jsonrpc | string | JSON-RPC version. |
id | string | number | Echoed request id. |
result | unknown | Successful method result. |
error | object | Standard JSON-RPC error object when the request fails. |
Related pages
- EVM overview: Return to the chain-family landing page.
- EVM HTTP API: Open the HTTP API tree for this chain family.
- Use RPC: Return to the task-oriented raw RPC guide.
- Canonical method path: Keep a direct link to this exact method page.