Skip to content

API Reference

BlockReq supports the standard Ethereum JSON-RPC 2.0 specification. All methods are available through HTTPS and WSS endpoints.

HTTPS: https://{chain-slug}.blockreq.com/v1/rpc/public
WSS: wss://{chain-slug}.blockreq.com/v1/rpc/public

Need higher rate limits? Create a private endpoint to get a dedicated API key.

{
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [],
"id": 1
}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1234567"
}
Terminal window
# No API key needed — uses the public endpoint
curl -X POST https://eth-mainnet.blockreq.com/v1/rpc/public \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

See the detailed method pages:

Requests are rate-limited based on your plan (e.g., Free: 100 req/s, Growth: 1,500 req/s, Premium: 5,000 req/s). If you exceed the limit, you’ll receive an HTTP 429 response:

{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32005,
"message": "Rate limit exceeded"
}
}
HTTP StatusMeaning
401Missing or invalid API key
402Insufficient RU balance
429Rate limit exceeded
502Upstream node error

Connect via WSS for real-time data:

const ws = new WebSocket("wss://eth-mainnet.blockreq.com/v1/rpc/public");
ws.onopen = () => {
ws.send(JSON.stringify({
jsonrpc: "2.0",
method: "eth_subscribe",
params: ["newHeads"],
id: 1
}));
};
ws.onmessage = (event) => {
console.log(JSON.parse(event.data));
};