<blockquote>
<p>I want to know if it is possible to see all nodes, their capacity and channels (In the whole Lightning network)?</p>
</blockquote>
<p>Below 2 websites provide capacity and channels in the whole lightning network.</p>
<ul>
<li><p><a href="https://terminal.lightning.engineering/" rel="nofollow noreferrer">Lightning Terminal</a></p>
</li>
<li><p><a href="https://mempool.space/lightning" rel="nofollow noreferrer">mempool.space</a></p>
</li>
</ul>
<blockquote>
<p>I thought by installing a Lightning Node I would be able to get this data by command line? Is this possible via Voltage?</p>
</blockquote>
<p>Yes, Voltage provides a <a href="https://docs.voltage.cloud/lncli" rel="nofollow noreferrer">guide</a> to command with <code>lncli</code> via RPC call.</p>

CC BY-SA 4.0
2024-08-13T11:33:46.387Z
Thank you so much. I have looked at lightning Terminal, but it only shows Good peers and not all channel data for the node. It shows the node, the capacity and good peers. It will take a lot of time to look up all the individual nodes for the channel data. I will need to look into Go, but maybe someone can make a data dump, since I am not the best coder.
Degenomics
CC BY-SA 4.0
2024-08-12T09:28:54.953Z
2024-08-12T09:28:54.953Z
Hyunhum Cho
<p>Alright, so if you want to export the Lightning Network graph, it’s actually pretty doable. If you’re using lnd, you can grab the whole network graph by running the describegraph command. Just type in lncli describegraph, and boom—you get a JSON file with all the nodes and channels. You can save that file and do whatever you need with it.</p>
<p>If you’re on c-lightning, it’s a bit different. You’ll need to use the listchannels and listnodes commands to get the data. You can save each of those as JSON files too, like lightning-cli listchannels &gt; channels.json for the channels, and the same for nodes.</p>
<p>After you’ve got the data, you can use something like Python’s NetworkX to visualize it, or you can just pop it into one of the Lightning Network explorers if you want a quick look.</p>
<p>It’s pretty simple once you know the commands. Let me know if you need any more help!</p>

CC BY-SA 4.0
2024-09-09T06:26:17.233Z
Thx, Nice one! Is there anyway someone with a ln node, could upload the json file, so I could download it and take a look.
Degenomics
CC BY-SA 4.0
2024-08-16T07:57:06.237Z
2024-08-16T07:57:06.237Z
Eijaz Pardhan
<p>I want to know if it is possible to see all nodes, their capacity and channels (of the whole Lightning network)?
I am doing some network research and I really have a hard time finding this information, I would love some guidance.</p>
<p>I thought by installing a Lightning Node I would be able to get this data by command line? Is this possible via Voltage?</p>
<p>In Voltage I cannot write commands like
<code>lightning-cli listchannels</code> and <code>lightning-cli listnodes</code>, or with lnd it should be only one API call <code>describechannelgraph</code>.</p>

CC BY-SA 4.0
2024-08-12T13:11:06.793Z
Is it possible that your last half sentence is incomplete? If not, it sounds like you already found out how to achieve your goal, but you are trying in a different way anyway. Could you clarify what the connection to LND is here?
Murch
CC BY-SA 4.0
2024-08-13T11:37:38.390Z
Hey Murch, the last sentence is incomplete since I do not fully understand how to do it. I will need to install Go and follow the manual from voltage, but maybe someone can help instead of me trying to use Go, since I am not the best coder. I will use the data to make a network analysis of LN.
Degenomics
<lightning-network><lightning-nodes>
How can I export the Lightning Network graph?
Degenomics
# How can I export the Lightning Network graph?

(Asked by: username_0 on 2024-08-11)

I want to know if it is possible to see all nodes, their capacity and channels (of the whole Lightning network)?
I am doing some network research and I really have a hard time finding this information, I would love some guidance.

I thought by installing a Lightning Node I would be able to get this data by command line? Is this possible via Voltage?

In Voltage I cannot write commands like
`lightning-cli listchannels` and `lightning-cli listnodes`, or with lnd it should be only one API call `describechannelgraph`.

**Tags:** lightning-network, lightning-nodes

> **Comments:**
> **username_1**: Is it possible that your last half sentence is incomplete? If not, it sounds like you already found out how to achieve your goal, but you are trying in a different way anyway. Could you clarify what the connection to LND is here?  
> **username_0**: Hey username_1, the last sentence is incomplete since I do not fully understand how to do it. I will need to install Go and follow the manual from voltage, but maybe someone can help instead of me trying to use Go, since I am not the best coder. I will use the data to make a network analysis of LN.  

---

## 2 answers

### Answer by username_2 on 2024-08-12. Score: 0

> I want to know if it is possible to see all nodes, their capacity and channels (In the whole Lightning network)?

Below 2 websites provide capacity and channels in the whole lightning network.

* [Lightning Terminal](https://terminal.lightning.engineering/)
* [mempool.space](https://mempool.space/lightning)

> I thought by installing a Lightning Node I would be able to get this data by command line? Is this possible via Voltage?

Yes, Voltage provides a [guide](https://docs.voltage.cloud/lncli) to command with `lncli` via RPC call.

> **Comments:**
> **username_0**: Thank you so much. I have looked at lightning Terminal, but it only shows Good peers and not all channel data for the node. It shows the node, the capacity and good peers. It will take a lot of time to look up all the individual nodes for the channel data. I will need to look into Go, but maybe someone can make a data dump, since I am not the best coder.  

---

### Answer by username_3 on 2024-08-16. Score: -1

Alright, so if you want to export the Lightning Network graph, it’s actually pretty doable. If you’re using lnd, you can grab the whole network graph by running the describegraph command. Just type in lncli describegraph, and boom—you get a JSON file with all the nodes and channels. You can save that file and do whatever you need with it.

If you’re on c-lightning, it’s a bit different. You’ll need to use the listchannels and listnodes commands to get the data. You can save each of those as JSON files too, like lightning-cli listchannels > channels.json for the channels, and the same for nodes.

After you’ve got the data, you can use something like Python’s NetworkX to visualize it, or you can just pop it into one of the Lightning Network explorers if you want a quick look.

It’s pretty simple once you know the commands. Let me know if you need any more help!

> **Comments:**
> **username_0**: Thx, Nice one! Is there anyway someone with a ln node, could upload the json file, so I could download it and take a look.  

---

