---
updatedAt: 2025-09-18T22:06:58.000Z
agentTools:
  projectIndex: https://docs.nodereal.io/llms.txt
---

# Get node network peers

Retrieves data about the node's network peers. By default this returns all peers. Multiple query params are combined using AND conditions

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Eth Beacon Node API",
    "description": "API specification for the beacon node, which enables users to query and participate in Ethereum 2.0 phase 0 beacon chain.\n\nAll requests by default send and receive JSON, and as such should have either or both of the \"Content-Type: application/json\"\nand \"Accept: application/json\" headers.  In addition, some requests can return data in the SSZ format.  To indicate that SSZ\ndata is required in response to a request the header \"Accept: application/octet-stream\" should be sent.  Note that only a subset\nof requests can respond with data in SSZ format; these are noted in each individual request.\n\nAPI endpoints are individually versioned.  As such, there is no direct relationship between all v1 endpoints, all v2 endpoints,\n_etc._ and no such relationship should be inferred.  All JSON responses return the requested data under a `data` key in the top\nlevel of their response.  Additional metadata may or may not be present in other keys at the top level of the response, dependent\non the endpoint.  The rules that require an increase in version number are as follows:\n\n  - no field that is listed in an endpoint shall be removed without an increase in the version number\n  - no field that is listed in an endpoint shall be altered in terms of format (_e.g._ from a string to an array) without an\n    increase in the version number\n\nNote that it is possible for a field to be added to an endpoint's data or metadata without an increase in the version number.\n",
    "version": "v2.3.0 - Eth2Spec v1.1.0",
    "contact": {
      "name": "Ethereum Github",
      "url": "https://github.com/ethereum/beacon-apis/issues"
    },
    "license": {
      "name": "CC0-1.0",
      "url": "https://creativecommons.org/publicdomain/zero/1.0/"
    }
  },
  "servers": [
    {
      "url": "{server_url}/{api_key}",
      "variables": {
        "server_url": {
          "description": "Beacon node API url",
          "default": "eth2-beacon-mainnet.nodereal.io/v1"
        },
        "api_key": {
          "description": "Beacon node API key",
          "default": "api_key"
        }
      }
    }
  ],
  "tags": [
    {
      "name": "Node",
      "description": "Endpoints to query node related informations"
    }
  ],
  "paths": {
    "/eth/v1/node/peers": {
      "get": {
        "operationId": "getPeers",
        "tags": [
          "Node"
        ],
        "summary": "Get node network peers",
        "description": "Retrieves data about the node's network peers. By default this returns all peers. Multiple query params are combined using AND conditions",
        "parameters": [
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "uniqueItems": true,
              "items": {
                "type": "string",
                "enum": [
                  "disconnected",
                  "connecting",
                  "connected",
                  "disconnecting"
                ]
              }
            }
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "uniqueItems": true,
              "items": {
                "type": "string",
                "enum": [
                  "inbound",
                  "outbound"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Request successful",
            "content": {
              "application/json": {
                "schema": {
                  "title": "GetPeersResponse",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "peer_id": {
                            "type": "string",
                            "description": "Cryptographic hash of a peer’s public key. [Read more](https://docs.libp2p.io/concepts/peer-id/)",
                            "example": "QmYyQSo1c1Ym7orWxLYvCrM2EmxFTANf8wXmmE7DWjhx5N"
                          },
                          "enr": {
                            "allOf": [
                              {
                                "type": "string",
                                "description": "Ethereum node record. [Read more](https://eips.ethereum.org/EIPS/eip-778)",
                                "example": "enr:-IS4QHCYrYZbAKWCBRlAy5zzaDZXJBGkcnh4MHcBFZntXNFrdvJjX04jRzjzCBOonrkTfj499SZuOh8R33Ls8RRcy5wBgmlkgnY0gmlwhH8AAAGJc2VjcDI1NmsxoQPKY0yuDUmstAHYpMa2_oxVtw0RW_QAdpzBQA8yWM0xOIN1ZHCCdl8"
                              },
                              {
                                "nullable": true
                              }
                            ]
                          },
                          "last_seen_p2p_address": {
                            "allOf": [
                              {
                                "type": "string",
                                "description": "[Read more](https://docs.libp2p.io/reference/glossary/#multiaddr)",
                                "example": "/ip4/7.7.7.7/tcp/4242/p2p/QmYyQSo1c1Ym7orWxLYvCrM2EmxFTANf8wXmmE7DWjhx5N"
                              },
                              {
                                "description": "Multiaddrs used in last peer connection."
                              }
                            ]
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "disconnected",
                              "connecting",
                              "connected",
                              "disconnecting"
                            ]
                          },
                          "direction": {
                            "type": "string",
                            "enum": [
                              "inbound",
                              "outbound"
                            ]
                          }
                        }
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "description": "Total number of items",
                          "type": "number",
                          "example": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Beacon node internal error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "description": "Either specific error code in case of invalid request or http status code",
                      "type": "number",
                      "example": 404
                    },
                    "message": {
                      "description": "Message describing error",
                      "type": "string"
                    },
                    "stacktraces": {
                      "description": "Optional stacktraces, sent when node is in debug mode",
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                },
                "example": {
                  "code": 500,
                  "message": "Internal server error"
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```