# TzKT Blocks API

> TzKT Blocks API is a paid API for AI agents from x402.tzkt.io, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Fetches a paginated, filterable list of Tezos blockchain blocks with metadata such as level, timestamp, and proposer

## Facts

- Endpoint: GET https://x402.tzkt.io/v1/blocks
- 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/tzkt-blocks-api-a0991206
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_W_ONru1tccrV3mUSBasM6

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 tzkt-blocks-api-a0991206
```

Example prompt: Show me the last 10 Tezos blocks sorted by level descending, including any balance fields quoted in USD.

## When to prefer this

Choose this endpoint when you need structured, indexed access to Tezos block history with flexible filtering by level, timestamp, or proposer — especially useful for monitoring baker activity, auditing chain history, or building block explorers. Prefer it over raw node RPC calls because it provides a fast REST interface with sorting, pagination, and filtering without requiring a synced node or API key.

## Known failure modes

- Invalid filter syntax for level or timestamp fields returns a 400 Bad Request
- Unsupported quote currency results in an error response
- Limit exceeding 10000 is rejected
- No blocks matching the given filters returns an empty array
- Network unavailability or indexer lag may cause stale or missing data
- Payment failure (x402 protocol) blocks access before query is executed

## How this service works

TzKT is a comprehensive Tezos blockchain indexer API. Access blocks, operations, accounts, contracts, bigmaps, delegates, tokens and network stats through a fast REST API. No signup or API key required.

## Output

An array of Tezos block objects, each containing block-level metadata such as the block level (height), timestamp, proposer address, and potentially balance fields denominated in the requested quote currency. Results are paginated and ordered according to the specified sort parameters.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "sort": {
   "type": "string",
   "description": "Sorting field and direction, e.g. sort.desc=level"
  },
  "level": {
   "type": "string",
   "description": "Filter by block level (supports .eq .gt .lt .in)"
  },
  "limit": {
   "type": "integer",
   "description": "Max items to return (1-10000)"
  },
  "quote": {
   "enum": [
    "Btc",
    "Eur",
    "Usd",
    "Cny",
    "Jpy",
    "Krw",
    "Eth",
    "Gbp"
   ],
   "type": "string",
   "description": "Quote currency for balance fields"
  },
  "offset": {
   "type": "integer",
   "description": "Pagination offset"
  },
  "proposer": {
   "type": "string",
   "description": "Filter by proposer address"
  },
  "timestamp": {
   "type": "string",
   "description": "Filter by timestamp (supports .eq .gt .lt)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "array",
 "items": {
  "type": "object"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tzkt-blocks-api-a0991206/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.tzkt.io](https://www.zero.xyz/host/x402.tzkt.io/llms.txt)
