Skip to main content

Overview

BlockDB authenticates REST and WebSocket traffic with API keys. Send your key in the Authorization header on every request that requires authentication. Keys are tied to your subscription: which datasets and chains you can query, your compute unit allowance, and your rate limit. See the dataset index and Dataset ID for how products map to blockdb_evm tables.
There is no separate token endpoint and no OAuth flow. The string you copy from the dashboard is the credential you pass as Bearer <key>.

Get an account and API keys

1

Open an account

Sign up at accounts.blockdb.io if you do not already have a BlockDB account.
2

Create and manage keys in the dashboard

Open dashboard.blockdb.io. There you can:
  • Create new API keys (up to 5 active keys per account)
  • Label keys (for example production vs staging)
  • Rotate a key when you need a new secret while phasing out an old one
  • Revoke a key that is compromised or no longer needed
Store keys only in environment variables or a secret manager—never commit them to source control.
3

Send the key on each request

Use the HTTP Authorization header with the Bearer scheme:
Authorization: Bearer <your_api_key>

Code examples: call the API with an API key

Set BLOCKDB_API_KEY in your environment (or substitute the value from the dashboard). These examples use the historic REST base URL https://api.blockdb.io/v1.
# Usage (no body)
curl -sS "https://api.blockdb.io/v1/usage" \
  -H "Authorization: Bearer $BLOCKDB_API_KEY"

# Example data request
curl -sS -X POST "https://api.blockdb.io/v1/evm/raw/blocks" \
  -H "Authorization: Bearer $BLOCKDB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"chain_id":1,"from_block":12345678,"to_block":12345999,"limit":10}'

Official SDKs

The .NET, Python, and JavaScript SDKs accept your API key and attach Authorization: Bearer for you. See each SDK page for the exact constructor and configuration options.

Security practices

  • Rotation: Create a new key in the dashboard, deploy it, then revoke the old key.
  • Least privilege: Use separate keys for production and non-production when possible (within the five-key limit).
  • Incidents: Revoke a key immediately if it leaks; create a replacement in the dashboard.

See Also

curl -X POST 'https://api.blockdb.io/v1/evm/raw/blocks' \
  -H 'Authorization: Bearer <BLOCKDB_API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "chain_id": 1,
    "from_block": 12345678,
    "to_block": 12345999
  }'
{
  "meta": {
    "chain_id": 1,
    "request_window": {
      "from_block": 12345678,
      "to_block": 12345999
    },
    "filters": {
      "limit": 10,
      "cursor": null
    }
  },
  "data": [],
  "cursor": null,
  "count": 0
}
Last modified on April 22, 2026