Skip to main content

Description

BlockDB exposes a drop-in compatible Ethereum JSON-RPC endpoint for EVM networks. Use it when you want to connect existing tooling (web3 libraries, indexers, bots) without rewriting to BlockDB’s REST endpoint format. This page documents the BlockDB entrypoint, pricing, and the key conventions you need to call Ethereum JSON-RPC successfully.

Endpoint

POST https://api.blockdb.io/v1/evm/rpc?chain_id=<chain_id>

Authentication

Send your API key on every request:
Authorization: Bearer <YOUR_API_KEY>

Pricing

  • 1 CU per JSON-RPC request (per method invocation).
  • If you send a JSON-RPC batch (an array of requests), each item is billed as 1 CU.

Method Compatibility

We support the classic Ethereum execution-client JSON-RPC method families, including:
  • eth_*
  • net_*
For the canonical method list and parameter conventions, see the Ethereum JSON-RPC reference:

Conventions (important)

Hex encoding

Ethereum JSON-RPC uses hex encoding with specific rules:
  • Quantities (block numbers, integers): hex with 0x prefix, most compact form (0x0 for zero)
  • Byte arrays (hashes, addresses, calldata): hex with 0x prefix, two hex digits per byte

Block parameter

Many methods accept a “block parameter”. Common values include:
  • "earliest", "latest", "safe", "finalized", "pending"
  • A specific block number encoded as a hex quantity (e.g., "0x12A05F").

Examples

Example: eth_getBlockByNumber

curl -X POST "https://api.blockdb.io/v1/evm/rpc?chain_id=1" \
  -H "Authorization: Bearer $BLOCKDB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "eth_getBlockByNumber",
    "params": ["latest", false]
  }'

Example: eth_call

curl -X POST "https://api.blockdb.io/v1/evm/rpc?chain_id=1" \
  -H "Authorization: Bearer $BLOCKDB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 2,
    "method": "eth_call",
    "params": [
      {
        "to": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
        "data": "0x313ce567"
      },
      "latest"
    ]
  }'

See also