> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# getnodeaddresses | Bitcoin

The `getnodeaddresses` method retrieves known addresses of network peers. This can be particularly useful for new nodes looking to find peers to connect to for initial blockchain synchronization.

<Check>
  **Get your own node endpoint today**

  [Start for free](https://console.chainstack.com/) and get your app to production levels immediately. No credit card required.

  You can sign up with your GitHub, X, Google, or Microsoft account.
</Check>

## Parameters

* `count` (optional): The number of addresses to return. Specifying 0 will return all known addresses.

## Response

* `result` — an array of objects, each representing a known peer address. Each object includes the address, port, services offered by the peer, and the last time the address was seen.
* `error` — an object containing an error message if an error occurred, otherwise `null`.
* `id` — an integer representing the ID of the request.

## Use case

The `getnodeaddresses` method is useful for bootstrapping or maintaining a healthy list of peers, ensuring a node has multiple avenues for connecting and synchronizing with the network.


## OpenAPI

````yaml /openapi/bitcoin_node_api/getnodeaddresses.json POST /788f110831fe13808302bd79796d55e8
openapi: 3.0.0
info:
  title: getnodeaddresses example
  version: 1.0.0
  description: >-
    This is an API example for getnodeaddresses, a method to return known
    addresses of network peers. This can  be used to help new nodes in finding
    peers to connect to.
servers:
  - url: https://nd-202-842-353.p2pify.com
security: []
paths:
  /788f110831fe13808302bd79796d55e8:
    post:
      tags:
        - Blockchain Operations
      summary: getnodeaddresses
      operationId: getNodeAddresses
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                jsonrpc:
                  type: string
                  default: '1.0'
                method:
                  type: string
                  default: getnodeaddresses
                params:
                  type: array
                  items:
                    type: integer
                    description: >-
                      The number of addresses to return. If 0 is specified, the
                      node will return all known  addresses.
                  default:
                    - 0
                id:
                  type: integer
                  default: 1
      responses:
        '200':
          description: A list of known network peer addresses.
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: array
                    items:
                      type: object
                      properties:
                        address:
                          type: string
                          description: The peer's network address.
                        port:
                          type: integer
                          description: The peer's port.
                        services:
                          type: string
                          description: The services offered by the peer.
                        time:
                          type: integer
                          description: The last time the address was seen.
                  error:
                    type: object
                  id:
                    type: integer

````