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

> ## Agent Instructions
> This page is part of the Solana developer documentation at https://solana.com/developers/docs. Append `.md` to any docs URL, or send `Accept: text/markdown`, to get the page as Markdown.
> Index of all pages: https://solana.com/llms.txt. Per-section indexes such as https://solana.com/developers/docs/payments/llms.txt are smaller; prefer them when working on one task.
> Coding agents: install the official Solana skill for current APIs and conventions with `npx skills add https://github.com/solana-foundation/solana-dev-skill` (also served at https://solana.com/SKILL.md).
> Code in the cookbook and task pages comes from tested example files. Prefer it over writing API calls from memory.

# getClusterNodes

> Returns network endpoints, shred version, feature set, and software version for known cluster nodes.

<Info>
  **Source**

  [`get_cluster_nodes`](https://github.com/anza-xyz/agave/blob/v4.3.2/rpc/src/rpc.rs#L3737)
</Info>

<RequestExample>
  ```bash cURL
  curl https://api.devnet.solana.com -s -X POST \
    -H "Content-Type: application/json" \
    -d '
    {
      "jsonrpc": "2.0",
      "id": 1,
      "method": "getClusterNodes"
    }
  '
  ```

  ```ts Kit
  import { createSolanaRpc } from "@solana/kit";

  const rpc_url = "https://api.devnet.solana.com";
  const rpc = createSolanaRpc(rpc_url);

  let nodes = await rpc.getClusterNodes().send();

  console.log(nodes);
  ```

  ```ts web3.js
  import { Connection, clusterApiUrl } from "@solana/web3.js";

  const connection = new Connection(clusterApiUrl("devnet"), "confirmed");

  let nodes = await connection.getClusterNodes();

  console.log(nodes);
  ```

  ```rs Rust
  use anyhow::Result;
  use solana_client::nonblocking::rpc_client::RpcClient;
  use solana_commitment_config::CommitmentConfig;

  #[tokio::main]
  async fn main() -> Result<()> {
      let client = RpcClient::new_with_commitment(
          String::from("https://api.devnet.solana.com"),
          CommitmentConfig::confirmed(),
      );

      let nodes = client.get_cluster_nodes().await?;

      println!("{:#?}", nodes);

      Ok(())
  }
  ```
</RequestExample>

<ResponseExample>
  ```json Response
  {
    "jsonrpc": "2.0",
    "result": [
      {
        "clientId": "Agave",
        "featureSet": 3383571666,
        "gossip": "10.239.6.48:8001",
        "pubkey": "9QzsJf7LPLj8GkXbYT3LFDKqsj2hHG7TA3xinJHu8epQ",
        "pubsub": "10.239.6.48:8900",
        "rpc": "10.239.6.48:8899",
        "serveRepair": "10.239.6.48:8002",
        "shredVersion": 2405,
        "tpu": null,
        "tpuForwards": null,
        "tpuForwardsQuic": "10.239.6.48:8863",
        "tpuQuic": "10.239.6.48:8862",
        "tpuVote": "10.239.6.48:8858",
        "tvu": "10.239.6.48:8000",
        "version": "4.3.2"
      }
    ],
    "id": 1
  }
  ```
</ResponseExample>

## Parameters

None

## Result

<ResponseField name="result" type="array">
  The result field will be an array of JSON objects, each with the following sub
  fields:

  <Expandable title="properties" defaultOpen>
    <ResponseField name="clientId" type="string | null">
      Validator client the node reports in gossip, such as `Agave`, `JitoLabs`,
      `AgaveBam`, or `Firedancer` (`Unknown(<id>)` for an unrecognized client), or
      `null` if the version information is not available
    </ResponseField>

    <ResponseField name="featureSet" type="u32 | null">
      First 4 bytes of the node's FeatureSet identifier
    </ResponseField>

    <ResponseField name="gossip" type="string | null">
      Gossip network address for the node
    </ResponseField>

    <ResponseField name="pubkey" type="string">
      Node public key, as base-58 encoded string
    </ResponseField>

    <ResponseField name="pubsub" type="string | null">
      WebSocket PubSub network address for the node, or `null` if the PubSub service
      is not enabled
    </ResponseField>

    <ResponseField name="rpc" type="string | null">
      JSON RPC network address for the node, or `null` if the JSON RPC service is not
      enabled
    </ResponseField>

    <ResponseField name="serveRepair" type="string | null">
      Serve repair UDP network address for the node
    </ResponseField>

    <ResponseField name="shredVersion" type="u16 | null">
      The shred version the node has been configured to use
    </ResponseField>

    <ResponseField name="tpu" type="string | null">
      TPU UDP network address for the node. Always `null` for every node when the
      RPC node you query runs Agave v4 or later; use `tpuQuic`.
    </ResponseField>

    <ResponseField name="tpuForwards" type="string | null">
      TPU forwards UDP network address for the node. Always `null` for every node
      when the RPC node you query runs Agave v4 or later; use `tpuForwardsQuic`.
    </ResponseField>

    <ResponseField name="tpuForwardsQuic" type="string | null">
      TPU forwards QUIC network address for the node
    </ResponseField>

    <ResponseField name="tpuQuic" type="string | null">
      TPU QUIC network address for the node
    </ResponseField>

    <ResponseField name="tpuVote" type="string | null">
      TPU vote UDP network address for the node
    </ResponseField>

    <ResponseField name="tvu" type="string | null">
      TVU UDP network address for the node
    </ResponseField>

    <ResponseField name="version" type="string | null">
      The software version of the node, or `null` if the version information is not
      available
    </ResponseField>
  </Expandable>
</ResponseField>
