Skip to content
GET /v1/block

Block by number (latest if omitted)

Try it live

10 free calls per day — no sign-up, no API key. Goes through the oanor gateway.

Custom headers (optional)
api.oanor.com/linea-api

It works. Grab an API key and use it in your project.

Get an API key

Code snippets

curl "https://api.oanor.com/linea-api/v1/block" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/linea-api/v1/block", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/linea-api/v1/block");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/linea-api/v1/block",
    headers={"x-oanor-key": "oanor_test_..."}
)

Example response

A real response from this endpoint, captured by the latest health check.

{
    "data": {
        "hash": "0x8a179935ee4cf239cd9eda93d319a4ac469c227c27e84aaca74d4e18f3cbad0d",
        "miner": "0x8f81e2e3f8b46467523463835f965ffe476e1c9e",
        "number": 31040546,
        "gas_used": 24298,
        "gas_limit": 2000000000,
        "timestamp": 1781522086,
        "size_bytes": 824,
        "parent_hash": "0x92dc40aeb82ebd444b0bf1f31ff05635ed7081b7fa3c057c6b3a07192ed8739a",
        "transaction_count": 1,
        "base_fee_per_gas_wei": "7"
    },
    "meta": {
        "timestamp": "2026-06-15T11:15:01.058Z",
        "request_id": "f4a652dd-306b-4be4-bc06-93eb01a3a512"
    },
    "status": "ok",
    "message": "Block retrieved successfully",
    "success": true
}