# Glassnode Lightning Network Node Count

> Glassnode Lightning Network Node Count is a paid API for AI agents from x402.glassnode.com, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-15).

Returns the historical daily count of Lightning Network nodes for Bitcoin via Glassnode's on-chain analytics.

## Facts

- Endpoint: GET https://x402.glassnode.com/v1/metrics/lightning/nodes_count
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/glassnode-lightning-network-node-count-9760e2f2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_nJAsrZ6kQHsNBsFp142Sg

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability glassnode-lightning-network-node-count-9760e2f2
```

Example prompt: Pull the Glassnode Lightning Network node count data for Bitcoin in JSON format so I can see how the number of LN nodes has changed over the past 24h intervals.

## When to prefer this

Use this endpoint when you need historical or current Lightning Network node count data specifically sourced from Glassnode's on-chain analytics platform, particularly when building dashboards, tracking BTC layer-2 adoption, or comparing network growth over time. Prefer this over generic crypto data sources when Glassnode's methodology and data quality are important.

## Known failure modes

- Missing required 'a' query parameter (must be 'BTC') returns a 400 error
- Invalid format value for 'f' parameter returns a 400 error
- Payment not provided or insufficient USDC balance causes a 402 Payment Required response
- Network timeout or upstream Glassnode data unavailability returns a 503 error
- Requesting an unsupported interval value for 'i' returns a 400 error

## How this service works

Lightning Network Number of Nodes — The number of Lightning Network nodes. Data by Glassnode.

## Output

An array of time-series data points, each containing a Unix timestamp (t) and the number of Lightning Network nodes (v) at that point in time, representing the daily count of active LN nodes on the Bitcoin network.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "a"
     ],
     "properties": {
      "a": {
       "enum": [
        "BTC"
       ],
       "type": "string",
       "description": "Asset symbol, e.g. BTC, ETH"
      },
      "f": {
       "enum": [
        "csv",
        "json"
       ],
       "type": "string",
       "description": "Response format: json or csv"
      },
      "i": {
       "enum": [
        "24h"
       ],
       "type": "string",
       "description": "Time interval / resolution, e.g. 24h, 1w, 1month"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "array",
     "items": {
      "type": "object",
      "properties": {
       "t": {
        "type": "number"
       },
       "v": {
        "type": "number"
       }
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/glassnode-lightning-network-node-count-9760e2f2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.glassnode.com](https://www.zero.xyz/host/x402.glassnode.com/llms.txt)
