# TzKT Contracts Count

> TzKT Contracts Count 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).

Returns the total count of smart contracts on the Tezos blockchain, optionally filtered by contract kind

## Facts

- Endpoint: GET https://x402.tzkt.io/v1/contracts/count
- 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-contracts-count-16401d75
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_NY3PPVFB3nnYoVgjAzqQK

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-contracts-count-16401d75
```

Example prompt: How many smart contracts are currently deployed on the Tezos blockchain? Only count 'originated' kind contracts.

## When to prefer this

Use this endpoint when you need a fast, single-integer count of Tezos smart contracts without needing full contract details. Prefer this over fetching a full contract list when only the total number matters, or when building dashboards, monitoring scripts, or statistics aggregations for the Tezos network. Ideal for agents that need to assess Tezos ecosystem size or monitor contract deployment growth.

## Known failure modes

- Invalid 'kind' filter value returns an error or zero result
- Network timeout if TzKT indexer is temporarily unavailable
- Payment failure (HTTP 402) if the 0.002 USDC x402 payment is not submitted correctly
- Empty response if indexer is reindexing or out of sync

## 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

A single integer representing the total count of Tezos smart contracts matching the optional kind filter (e.g. 'originated', 'delegator'). No pagination or additional metadata is returned — just the raw count.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "kind": {
   "enum": [
    "smart_contract",
    "delegator_contract"
   ],
   "type": "string",
   "description": "Contract kind filter"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "integer"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tzkt-contracts-count-16401d75/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)
