Docs / API: Chains
Recent blocks
Returns the most recent blocks this service read. The list holds at most 25 blocks and is kept in memory. On Solana each entry is a sampled slot.
GET/api/v1/chains/{chain}/blocks
| Property | Value |
|---|---|
| Authentication | Optional. A key raises your limit. |
| Rate-limit cost | 1 unit |
| Status | Live |
#Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
chain | path | string | Yes | One of ethereum, base, bnb, arbitrum, optimism, polygon, solana. |
limit | query | integer | No | From 1 to 25. Default 10. |
#Request
curl -s "https://farbeamlabs.com/api/v1/chains/ethereum/blocks?limit=5"const res = await fetch("https://farbeamlabs.com/api/v1/chains/ethereum/blocks?limit=5");
const { data, meta, error } = await res.json();
if (error) throw new Error(`${error.code}: ${error.message}`);
console.log(data);import os, requests
res = requests.get(
"https://farbeamlabs.com/api/v1/chains/ethereum/blocks?limit=5",
timeout=30,
)
body = res.json()
if "error" in body:
raise RuntimeError(body["error"]["code"])
print(body["data"])You can send this request now in the API playground.
#Response
This response is real. It was captured from the running API when this page was built. Arrays are cut to two items.
JSON
{
"data": [
{
"number": 26343752,
"ts": "2026-11-04T20:10:35.000Z",
"txs": 425,
"gas_used": 27319895,
"gas_limit": 60000000,
"base_fee_gwei": 0.151861469
},
{
"number": 26343751,
"ts": "2026-11-04T20:10:23.000Z",
"txs": 454,
"gas_used": 35041388,
"gas_limit": 60000000,
"base_fee_gwei": 0.14873713
}
],
"meta": {
"request_id": "req_d617ee9167a4",
"as_of": "2026-11-04T20:10:50.214Z"
}
}#Notes
- Poll intervals differ by chain, so the list is not every block. See indexing.
#Errors
| HTTP | Code | Meaning |
|---|---|---|
| 400 | invalid_chain | The chain is unknown. |
| 400 | invalid_parameter | A parameter is out of range. |
All errors share one format. See errors.