# Blockscout Stats Line Chart Data

> Blockscout Stats Line Chart Data 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-13).

Retrieves time-series chart data for a named statistical metric on a specific blockchain network via Blockscout's stats service

## Facts

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

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-stats-line-chart-data-e75b77d3
```

Example prompt: Show me the daily transaction count trend on Ethereum (chain_id eth) from Blockscout's stats service for the past 30 days, using a daily resolution.

## When to prefer this

Use this endpoint when you need historical time-series statistical data for a specific on-chain metric (e.g. transaction counts, active addresses, gas prices) on a particular blockchain. Prefer it over raw block/transaction endpoints when you want aggregated, chart-ready data with configurable resolution and date ranges. Best for analytics dashboards, trend monitoring, and reporting use cases where aggregated stats are more useful than individual records.

## Known failure modes

- Invalid chain_id returns a 404 or error response
- Unknown or misspelled metric name returns empty or error response
- Date range outside available data returns empty chart array
- Invalid resolution parameter may cause a 400 error
- Rate limiting or payment failure ($0.002 USDC per call) blocks access
- Network-specific stats may not be available for all supported chains

## 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 two top-level keys: 'info' (containing the metric's id, title, units, description, and available resolutions) and 'chart' (an array of time-series data points, each with a date, value, optional date_to, and is_approximate boolean flag indicating estimated values).

## 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": {
      "name": {
       "type": "string"
      },
      "chain_id": {
       "type": "string"
      }
     }
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "to": {
       "type": "string"
      },
      "from": {
       "type": "string"
      },
      "resolution": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "info": {
   "id": "string",
   "title": "string",
   "units": "string",
   "description": "string",
   "resolutions": [
    "string"
   ]
  },
  "chart": [
   {
    "date": "string",
    "value": "string",
    "date_to": "string",
    "is_approximate": true
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/blockscout-stats-line-chart-data-e75b77d3/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)
