# Zcash JSON-RPC API

> GetBlock provides fast and reliable access to Zcash nodes via JSON-RPC API. Connect to the Zcash network without running your own infrastructure.

The Zcash JSON-RPC API exposes the Zebra (`zebrad`) node interface: a Bitcoin Core-compatible method set for blocks, transactions, the mempool, and mining, extended with `z_*` methods for the shielded pools. Requests `POST` a JSON-RPC 2.0 body to the endpoint; the method is selected by the body.

> **Info:** Unlike most UTXO nodes, Zebra indexes **transparent** addresses, so `getaddressbalance`, `getaddresstxids`, and `getaddressutxos` answer address queries directly over JSON-RPC. Shielded (Sapling, Orchard) balances and notes cannot be enumerated by any public endpoint, because they are encrypted to the holder's viewing key.

### Base URL

```bash
https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/
```

### Request Format

```bash
curl --location --request POST 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "getblockcount",
    "params": [],
    "id": "getblock.io"
}'
```

### Available Methods

#### Node & Client Info

| Method | Description |
| --- | --- |
| [`getinfo`](/api-reference/zcash-zec/zcash-json-rpc-api/getinfo-zcash/) | Basic node status, version, block height, connections |
| [`getnetworkinfo`](/api-reference/zcash-zec/zcash-json-rpc-api/getnetworkinfo-zcash/) | Network status, peer info, protocol version |

#### Blockchain State

| Method | Description |
| --- | --- |
| [`getblockchaininfo`](/api-reference/zcash-zec/zcash-json-rpc-api/getblockchaininfo-zcash/) | Chain state, activated upgrades, value pool balances |
| [`getbestblockhash`](/api-reference/zcash-zec/zcash-json-rpc-api/getbestblockhash-zcash/) | Hash of the chain tip |
| [`getbestblockheightandhash`](/api-reference/zcash-zec/zcash-json-rpc-api/getbestblockheightandhash-zcash/) | Chain tip height and hash together (Zebra-specific) |
| [`getblockcount`](/api-reference/zcash-zec/zcash-json-rpc-api/getblockcount-zcash/) | Chain tip height |
| [`getblockhash`](/api-reference/zcash-zec/zcash-json-rpc-api/getblockhash-zcash/) | Block hash by height |
| [`getblock`](/api-reference/zcash-zec/zcash-json-rpc-api/getblock-zcash/) | Block by hash or height (verbosity 0/1/2, includes `nTx`) |
| [`getblockheader`](/api-reference/zcash-zec/zcash-json-rpc-api/getblockheader-zcash/) | Block header only |
| [`getdifficulty`](/api-reference/zcash-zec/zcash-json-rpc-api/getdifficulty-zcash/) | Proof-of-work difficulty multiplier |

#### Transactions

| Method | Description |
| --- | --- |
| [`getrawtransaction`](/api-reference/zcash-zec/zcash-json-rpc-api/getrawtransaction-zcash/) | Raw transaction by txid (verbosity 0/1) |
| [`sendrawtransaction`](/api-reference/zcash-zec/zcash-json-rpc-api/sendrawtransaction-zcash/) | Submit a signed raw transaction |
| [`gettxout`](/api-reference/zcash-zec/zcash-json-rpc-api/gettxout-zcash/) | UTXO lookup (transparent outputs only) |

#### Mempool

| Method | Description |
| --- | --- |
| [`getrawmempool`](/api-reference/zcash-zec/zcash-json-rpc-api/getrawmempool-zcash/) | List transactions in the mempool |
| [`getmempoolinfo`](/api-reference/zcash-zec/zcash-json-rpc-api/getmempoolinfo-zcash/) | Mempool statistics |

#### Mining & Difficulty

| Method | Description |
| --- | --- |
| [`getblocktemplate`](/api-reference/zcash-zec/zcash-json-rpc-api/getblocktemplate-zcash/) | Template for constructing candidate blocks |
| [`getmininginfo`](/api-reference/zcash-zec/zcash-json-rpc-api/getmininginfo-zcash/) | Mining status and current difficulty |
| [`getnetworksolps`](/api-reference/zcash-zec/zcash-json-rpc-api/getnetworksolps-zcash/) | Estimated network Equihash solutions per second |

#### Peer Info

| Method | Description |
| --- | --- |
| [`getpeerinfo`](/api-reference/zcash-zec/zcash-json-rpc-api/getpeerinfo-zcash/) | Connected peer details |

#### Address Queries (Zcash Extensions)

| Method | Description |
| --- | --- |
| [`getaddressbalance`](/api-reference/zcash-zec/zcash-json-rpc-api/getaddressbalance-zcash/) | Transparent balance for one or more addresses |
| [`getaddresstxids`](/api-reference/zcash-zec/zcash-json-rpc-api/getaddresstxids-zcash/) | Transaction IDs involving an address |
| [`getaddressutxos`](/api-reference/zcash-zec/zcash-json-rpc-api/getaddressutxos-zcash/) | UTXOs held by an address |

#### Address & Script Utilities

| Method | Description |
| --- | --- |
| [`validateaddress`](/api-reference/zcash-zec/zcash-json-rpc-api/validateaddress-zcash/) | Validate a transparent (t1/t3) address |
| [`z_validateaddress`](/api-reference/zcash-zec/zcash-json-rpc-api/z_validateaddress-zcash/) | Validate a Sapling, Orchard, or Unified address |

#### Shielded Pool

| Method | Description |
| --- | --- |
| [`z_getsubtreesbyindex`](/api-reference/zcash-zec/zcash-json-rpc-api/z_getsubtreesbyindex-zcash/) | Subtree roots by index (Ironwood NCT) |
| [`z_gettreestate`](/api-reference/zcash-zec/zcash-json-rpc-api/z_gettreestate-zcash/) | Note commitment tree state at a given block |
| [`z_listunifiedreceivers`](/api-reference/zcash-zec/zcash-json-rpc-api/z_listunifiedreceivers-zcash/) | Decompose a Unified Address into its component receivers |

### Support

* Support: [support@getblock.io](mailto:support@getblock.io)
