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

# getNetwork

> Returns network config

General information about the currently configured network. This response will contain all the information needed to successfully submit transactions to the network this node serves.

## Params (0)

## Result

*(getNetworkResult)*

**passphrase** `string` *required*

Network passphrase configured for this Stellar RPC node.

**protocolVersion** `number` *required*

Stellar Core protocol version associated with the latest ledger.

**friendbotUrl** `string`

(optional) The URL of this network's "friendbot" faucet

## Examples

**Testnet Network Configuration**

Example request to the `getNetwork` method for a node connected to the Stellar Testnet network.

**Request**

```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -X POST \
-H 'Content-Type: application/json' \
-d '{
  "jsonrpc": "2.0",
  "id": 8675309,
  "method": "getNetwork"
}' \
https://soroban-testnet.stellar.org | jq
```

```js JavaScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
let requestBody = {
  jsonrpc: "2.0",
  id: 8675309,
  method: "getNetwork",
};
let res = await fetch("https://soroban-testnet.stellar.org", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify(requestBody),
});
let json = await res.json();
console.log(json);
```

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
import json, requests
res = requests.post("https://soroban-testnet.stellar.org", json={
    "jsonrpc": "2.0",
    "id": 8675309,
    "method": "getNetwork"
})
print(json.dumps(res.json(), indent=4))
```

```json JSON theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "jsonrpc": "2.0",
  "id": 8675309,
  "method": "getNetwork"
}
```

**Result**

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "jsonrpc": "2.0",
  "id": 8675309,
  "result": {
    "friendbotUrl": "https://friendbot-testnet.stellar.org/",
    "passphrase": "Test SDF Network ; September 2015",
    "protocolVersion": 20
  }
}
```

**Futurenet Network Configuration**

Example request to the `getNetwork` method for a node connected to the Stellar Futurenet network.

**Request**

```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -X POST \
-H 'Content-Type: application/json' \
-d '{
  "jsonrpc": "2.0",
  "id": 8675309,
  "method": "getNetwork"
}' \
https://soroban-testnet.stellar.org | jq
```

```js JavaScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
let requestBody = {
  jsonrpc: "2.0",
  id: 8675309,
  method: "getNetwork",
};
let res = await fetch("https://soroban-testnet.stellar.org", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify(requestBody),
});
let json = await res.json();
console.log(json);
```

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
import json, requests
res = requests.post("https://soroban-testnet.stellar.org", json={
    "jsonrpc": "2.0",
    "id": 8675309,
    "method": "getNetwork"
})
print(json.dumps(res.json(), indent=4))
```

```json JSON theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "jsonrpc": "2.0",
  "id": 8675309,
  "method": "getNetwork"
}
```

**Result**

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "jsonrpc": "2.0",
  "id": 8675309,
  "result": {
    "friendbotUrl": "https://friendbot-futurenet.stellar.org/",
    "passphrase": "Test SDF Future Network ; October 2022",
    "protocolVersion": 20
  }
}
```

### Using the Lab

You can check **general information about the currently configured network** on both **Testnet** and **Mainnet** using the `getNetwork` RPC method directly in the [Stellar Laboratory](https://laboratory.stellar.org).

👉 [View Testnet getNetwork on the Lab](https://lab.stellar.org/endpoints/rpc/get-network?\$=network\$id=testnet\&label=Testnet\&horizonUrl=https:////horizon-testnet.stellar.org\&rpcUrl=https:////soroban-testnet.stellar.org\&passphrase=Test%20SDF%20Network%20/;%20September%202015;;)

![Lab: getnetwork](https://mintcdn.com/stellardevelopmentfoundation/1iVxlvEjme-PeN5h/assets/api/rpc/getnetwork.png?fit=max\&auto=format\&n=1iVxlvEjme-PeN5h\&q=85\&s=eab06e71c575b409fde0cfb6efd47cee)
