# Blockchain.info N-Transactions-Per-Block Chart API

> Blockchain.info N-Transactions-Per-Block Chart API is a paid API for AI agents from api.blockchain.info, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-02).

Returns historical chart data showing the average number of transactions per Bitcoin block over a specified time period

## Facts

- Endpoint: POST https://api.blockchain.info/explorer-gateway-kt/x402/charts/n-transactions-per-block?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/blockchain-info-n-transactions-per-block-chart-api-8b98ce5a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_2GUjimRoIx6MaCfqGf285

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 blockchain-info-n-transactions-per-block-chart-api-8b98ce5a -d '<json body>'
```

Example prompt: Pull the Blockchain.com chart for average number of transactions per Bitcoin block over the last 3 years, using a 24-hour rolling average, and return the data in JSON format.

## When to prefer this

Choose this endpoint when you need authoritative historical Bitcoin block transaction count data directly from Blockchain.com's explorer, particularly when you need flexible timespan and rolling average control. Prefer this over generic crypto APIs when you specifically need the n-transactions-per-block metric with smoothing options, or when you need CSV output for downstream data processing.

## Known failure modes

- Invalid timespan format returns a 400 or empty dataset
- Invalid rollingAverage window value may cause a processing error
- Payment failure (402) if USDC payment is not properly handled by x402 protocol
- Rate limiting or quota exceeded if called too frequently
- Invalid format enum value returns an error
- Network timeout for very long timespans with high granularity

## How this service works

Paid AI-agent access to Blockchain.com Explorer API

## Output

A JSON object (or CSV) containing time-series data points of the average number of transactions per Bitcoin block, with timestamps and values, optionally accompanied by chart metadata such as name, description, and units. The rolling average smooths the raw data over the specified window.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "cors": {
   "type": "boolean",
   "default": false,
   "description": "Enable CORS headers"
  },
  "format": {
   "enum": [
    "json",
    "csv"
   ],
   "type": "string",
   "default": "json",
   "description": "Response format:\n- `json` — Returns structured JSON with metadata and values\n- `csv` — Returns raw CSV data with timestamp and value columns (no metadata)\n"
  },
  "sampled": {
   "type": "boolean",
   "default": true,
   "description": "Apply sampling to reduce data points"
  },
  "metadata": {
   "type": "boolean",
   "default": false,
   "description": "Include metadata in response"
  },
  "timespan": {
   "type": "string",
   "default": "1y",
   "example": "1y",
   "description": "Time period (e.g., \"24h\", \"7d\", \"1y\", \"3y\")"
  },
  "rollingAverage": {
   "type": "string",
   "default": "8h",
   "example": "8h",
   "description": "Rolling average window (e.g., \"8h\", \"24h\")"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "format": "application/json",
 "example": {
  "name": "Average Number Of Transactions Per Block",
  "unit": "Transactions Per Block",
  "period": "day",
  "status": "ok",
  "values": [
   {
    "x": 1704067200,
    "y": 3142.6
   },
   {
    "x": 1704153600,
    "y": 3288.1
   }
  ],
  "description": "The average number of transactions per block."
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/blockchain-info-n-transactions-per-block-chart-api-8b98ce5a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.blockchain.info](https://www.zero.xyz/host/api.blockchain.info/llms.txt)
