Skip to main content
CometBFT provides a comprehensive RPC API for interacting with nodes, querying blockchain data, broadcasting transactions, and subscribing to real-time events.

RPC API Reference

Visit the API Reference page for a list of all CometBFT RPC methods
The RPC server supports multiple protocols:
  • URI over HTTP - REST-like interface for simple queries
  • JSONRPC over HTTP - Standard JSON-RPC 2.0 protocol
  • JSONRPC over WebSockets - Persistent connection with subscription support

Quick Start

By default, the RPC server listens on tcp://127.0.0.1:26657. You can query it using curl:
# Get node status
curl http://localhost:26657/status

# Get block at height 5
curl http://localhost:26657/block?height=5

# Health check
curl http://localhost:26657/health

Configuration

The RPC server can be configured in your config.toml file under the [rpc] section:
[rpc]

# TCP or UNIX socket address for the RPC server to listen on
laddr = "tcp://127.0.0.1:26657"

# A list of origins a cross-domain request can be executed from
cors_allowed_origins = []

# Maximum number of simultaneous connections
max_open_connections = 900
See the Configuration page for more details on RPC configuration options.