> For the complete documentation index, see [llms.txt](https://docs.getblock.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.getblock.io/api-reference/zcash-zec/zcash-json-rpc-api.md).

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

{% hint style="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.
{% endhint %}

### Base URL

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

### Request Format

{% code overflow="wrap" %}

```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"
}'
```

{% endcode %}

### Available Methods

#### Node & Client Info

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

#### Blockchain State

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

#### Transactions

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

#### Mempool

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

#### Mining & Difficulty

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

#### Peer Info

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

#### Address Queries (Zcash Extensions)

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

#### Address & Script Utilities

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

#### Shielded Pool

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

### Support

* Support: <support@getblock.io>
