# Blockscout Chain Stats Lines API

> Blockscout Chain Stats Lines 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-14).

Returns available statistics chart sections and their metadata (chart IDs, titles, units, descriptions, and resolutions) for a specific blockchain network

## Facts

- Endpoint: GET https://api.blockscout.com/%7Bchain_id%7D/stats-service/api/v1/lines
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/blockscout-chain-stats-lines-api-ed48e2a6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_hrpdB5bdku98GV2r4AnKS

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-lines-api-ed48e2a6
```

Example prompt: What statistics charts are available on Blockscout's stats service for the Ethereum mainnet chain — show me all sections, chart IDs, and what resolutions they support.

## When to prefer this

Use this endpoint when you need to discover what statistical chart metadata is available for a specific blockchain on Blockscout before fetching actual chart data. It is a discovery/catalog endpoint — prefer it over querying individual chart data directly when you don't yet know which chart IDs or resolutions are supported for a chain.

## Known failure modes

- Invalid or unsupported chain_id returns an error or empty response
- Network or service unavailability returns a 5xx error
- Payment not sent or insufficient causes a 402 Payment Required response
- Malformed request (wrong HTTP method) returns a 4xx error
- Chain not indexed by Blockscout returns no sections

## How this service works

Explore crypto activities with Blockscout's multichain search. Find transactions, addresses, tokens, and dapps across top blockchain networks — your go-to explorer for cross-chain blockchain data

## Output

Returns a JSON object with a 'sections' array, where each section has an id, title, and an array of charts. Each chart includes an id, title, units, description, and supported resolutions (e.g. day, week, month). This allows callers to discover what statistical time-series charts are available and queryable for a given blockchain.

## 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"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "sections": [
   {
    "id": "string",
    "title": "string",
    "charts": [
     {
      "id": "string",
      "title": "string",
      "units": "string",
      "description": "string",
      "resolutions": [
       "string"
      ]
     }
    ]
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/blockscout-chain-stats-lines-api-ed48e2a6/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)
