Swagger Badge

The Lighthouse API is documented in Open API format and is available at SwaggerHub: Lighthouse REST API.

By default, a Lighthouse beacon_node exposes a HTTP server on localhost:5052.

The following CLI flags control the HTTP server:

  • --no-api: disable the HTTP server.
  • --api-port: specify the listen port of the server.
  • --api-address: specify the listen address of the server.


In addition to the complete Open API docs (see above), some examples are provided below.

Examples assume there is a Lighthouse node exposing a HTTP API on localhost:5052. Responses are JSON.

Get the node's beacon chain head

$ curl localhost:5052/beacon/head


Get the node's finalized checkpoint

$ curl localhost:5052/beacon/latest_finalized_checkpoint


Get the node's ENR

$ curl localhost:5052/network/enr


Get a list of connected peer ids

$ curl localhost:5052/network/peers


Get the node's peer id

$ curl localhost:5052/network/peer_id


Get the list of listening libp2p addresses

Lists all the libp2p multiaddrs that the node is listening on.

$ curl localhost:5052/network/listen_addresses


Pretty-print the genesis state and state root

Returns the genesis state and state root in your terminal, in YAML.

$ curl --header "Content-Type: application/yaml" "localhost:5052/beacon/state?slot=0"