# Blockscout Chain Stats API

> Blockscout Chain Stats API is a paid API for AI agents from api.blockscout.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-15).

Retrieve real-time blockchain network statistics and metrics for a specified chain via Blockscout

## Facts

- Endpoint: GET https://api.blockscout.com/:chain_id/api/v2/stats
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/blockscout-chain-stats-api-79fc9290
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_UAJv6vVkxfSoYlIN_Ua-7

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 blockscout-chain-stats-api-79fc9290
```

Example prompt: Pull up the current blockchain network stats for Ethereum mainnet from Blockscout — I want to see things like total transactions, block count, and address activity.

## When to prefer this

Use this endpoint when you need aggregate network-level statistics for a specific blockchain chain (identified by chain_id) and want Blockscout's indexed data. Prefer this over raw RPC calls when you need pre-aggregated metrics like total transactions, total addresses, or token counts rather than individual block or transaction data. Best suited for dashboards, monitoring, and research scenarios where a holistic chain summary is needed.

## Known failure modes

- Invalid or unsupported chain_id returns a 404 or error response
- Chain not indexed by Blockscout returns empty or error
- Network timeout if Blockscout indexer is under load
- Stale data if indexer is behind the chain tip
- Payment failure if x402 USDC payment is not processed correctly

## How this service works

Access to api/v2/stats. Retrieve blockchain network statistics and metrics

## Output

Returns a JSON object containing blockchain network statistics for the specified chain, likely including total transaction count, total block count, number of addresses, gas usage metrics, token counts, and other network-level summary metrics as tracked by Blockscout's indexer.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "pathParams": {
     "type": "object",
     "properties": {
      "chain_id": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/blockscout-chain-stats-api-79fc9290/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.blockscout.com](https://www.zero.xyz/host/api.blockscout.com/llms.txt)
