# zkSync Era On-Chain API
> Live zkSync Era on-chain data as an API, built on the open Blockscout explorer. zkSync Era (chain id 324) is a leading Ethereum zk-rollup Layer-2 by Matter Labs; its native currency is ETH and fees are a fraction of mainnet. Pull network stats (total blocks and transactions, ETH price, live gas), a gas oracle with slow, average and fast prices in gwei, the most recent blocks and full block detail by height or hash. Look up any address for its balance and contract status, any transaction by hash for its value, fee, status, sender and receiver, and any ERC-20 token by contract for its name, symbol, decimals, holders and USD rate. A universal search resolves addresses, tokens, blocks and transactions in one call. Real on-chain data, no key needed upstream. Ideal for zkSync wallets, block explorers, gas trackers, DeFi dashboards and on-chain analytics.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/zksync-api/..."
```

## Pricing
- **Free** (Free) — 8,200 calls/Mo, 2 req/s
- **Starter** ($4/Mo) — 112,000 calls/Mo, 8 req/s
- **Pro** ($19/Mo) — 615,000 calls/Mo, 25 req/s
- **Mega** ($71/Mo) — 2,950,000 calls/Mo, 50 req/s

## Endpoints

### zkSync

#### `GET /v1/address` — Address balance & contract info

**Parameters:**
- `address` (query, required, string) — A zkSync address (0x + 40 hex) Example: `0x3355df6D4c9C3035724Fd0e3914dE96A5a83aaf4`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/zksync-api/v1/address?address=0x3355df6D4c9C3035724Fd0e3914dE96A5a83aaf4"
```

**Response:**
```json
{
    "data": {
        "address": {
            "ens": null,
            "hash": "0x3355df6D4c9C3035724Fd0e3914dE96A5a83aaf4",
            "name": "zkSync Bridged USDC (zkSync)",
            "token": {
                "name": "zkSync Bridged USDC (zkSync)",
                "type": "ERC-20",
                "symbol": "USDC"
            },
            "creator": "0x689a1966931eB4Bb6fB81430E6ce0A03aABDf174",
            "balance_eth": 0,
            "balance_wei": "0",
            "is_contract": true,
            "is_verified": false
        }
    },
    "meta": {
        "timestamp": "2026-06-08T01:18:21.141Z",
        "request_id": "7dd58f87-b960-452e-828a-b35baae22643"
    },
    "status": "ok",
    "message": "Address retrieved successfully",
    "success": true
}
```

#### `GET /v1/block` — Block detail by height or hash

**Parameters:**
- `height` (query, optional, string) — Block height, e.g. 30000000 Example: `30000000`
- `hash` (query, optional, string) — Block hash (alternative to height)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/zksync-api/v1/block?height=30000000"
```

**Response:**
```json
{
    "data": {
        "block": {
            "hash": "0x99ebfb7085d714f7b9ba49689797c99052f4547a183c1916374a4683e1684fa9",
            "size": 0,
            "miner": "0x0000000000000000000000000000000000000000",
            "height": 30000000,
            "gas_used": 8222549,
            "tx_count": 16,
            "gas_limit": 4294967295,
            "timestamp": "2024-03-27T13:26:04.000000Z",
            "burnt_fees": "205563725000000",
            "difficulty": "0",
            "base_fee_per_gas": "25000000"
        }
    },
    "meta": {
        "timestamp": "2026-06-08T01:18:21.301Z",
        "request_id": "730401c1-a452-4539-ac6b-0b7d067eb98e"
    },
    "status": "ok",
    "message": "Block retrieved successfully",
    "success": true
}
```

#### `GET /v1/blocks` — The most recent blocks

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/zksync-api/v1/blocks"
```

**Response:**
```json
{
    "data": {
        "count": 50,
        "blocks": [
            {
                "hash": "0x1b756b3cefca716bf23adcd7e5b5d1cf3f47e6064ac810f8e61eb89c4fa5c6f5",
                "size": 0,
                "miner": "0x0000000000000000000000000000000000000000",
                "height": 70613558,
                "gas_used": 176241,
                "tx_count": 1,
                "gas_limit": 1125899906842624,
                "timestamp": "2026-06-08T01:18:07.000000Z",
                "burnt_fees": "7974905250000",
                "difficulty": "0",
                "base_fee_per_gas": "45250000"
            },
            {
                "hash": "0xbdf22c6abe97955bdf7403352c30ce1b6195f6b3b260a7b2c8d4fa549a98723c",
                "size": 0,
                "miner": "0x0000000000000000000000000000000000000000",
                "height": 70613557,
                "gas_used": 148371,
                "tx_count": 1,
                "gas_limit": 1125899906842624,
                "timestamp": "2026-06-08T01:18:06.000000Z",
                "burnt_fees": "6713787750000",
                "difficulty": "0",
                "base_fee_per_gas": "45250000"
            },
            {
                "hash": "0xf4af98edbd8b51a654ac97be8886b3640407d4880e037d78b915ea1a6261f4ad",
                "size": 0,
                "miner": "0x0000000000000000000000000000000000000000",
                "height": 70613556,
                "gas_used": 225295,
                "tx_count": 1,
              
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/gas` — Gas oracle (gwei)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/zksync-api/v1/gas"
```

**Response:**
```json
{
    "data": {
        "fast": 0.12,
        "slow": 0.11,
        "unit": "gwei",
        "average": 0.12,
        "gas_used_today": "4708387864"
    },
    "meta": {
        "timestamp": "2026-06-08T01:18:21.769Z",
        "request_id": "6b1c59e2-c7ca-4a8a-921c-7a02fbf09e38"
    },
    "status": "ok",
    "message": "Gas retrieved successfully",
    "success": true
}
```

#### `GET /v1/search` — Search addresses, tokens, blocks & txns

**Parameters:**
- `q` (query, required, string) — Search term, e.g. USDC Example: `USDC`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/zksync-api/v1/search?q=USDC"
```

**Response:**
```json
{
    "data": {
        "count": 50,
        "query": "USDC",
        "results": [
            {
                "name": "USDC",
                "type": "token",
                "symbol": "USDC",
                "address": "0x1d17CBcF0D6D143135aE902365D2E5e2A16538D4"
            },
            {
                "name": "zkSync Bridged USDC (zkSync)",
                "type": "token",
                "symbol": "USDC",
                "address": "0x3355df6D4c9C3035724Fd0e3914dE96A5a83aaf4"
            },
            {
                "name": "Holdstation USDC",
                "type": "token",
                "symbol": "HSUSDC",
                "address": "0xaf08a9d918f16332F22cf8Dc9ABE9D9E14DdcbC2"
            },
            {
                "name": "SyncSwap USDC/WETH Classic LP",
                "type": "token",
                "symbol": "USDC/WETH cSLP",
                "address": "0x80115c708E12eDd42E504c1cD52Aea96C547c05c"
            },
            {
                "name": "Volatile Mute LP (USDC/WETH)",
                "type": "token",
                "symbol": "vMLP (USDC/WETH)",
                "address": "0xDFAaB828f5F515E104BaaBa4d8D554DA9096f0e4"
            },
            {
                "name": "ReactorFusion USDC",
                "type": "token",
                "symbol": "rfUSDC",
                "address": "0x04e9Db37d8EA0760072e1aCE3F2A219988Fdac29"
            },
            {
                "name": "Mock USDC Token",
                "type": "token",
  
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/stats` — Network stats

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/zksync-api/v1/stats"
```

**Response:**
```json
{
    "data": {
        "tvl_usd": null,
        "gas_prices": {
            "fast": 0.12,
            "slow": 0.11,
            "average": 0.12
        },
        "total_blocks": 70612948,
        "coin_price_usd": 1694.257351831698,
        "gas_used_today": "4708387864",
        "market_cap_usd": 204470630179.50754,
        "total_addresses": "17427244",
        "total_transactions": "474015675",
        "transactions_today": "20322",
        "network_utilization_percent": 2.09876578338708e-8
    },
    "meta": {
        "timestamp": "2026-06-08T01:18:22.319Z",
        "request_id": "c20c1953-c8f6-4fb7-80ee-a0935dd07036"
    },
    "status": "ok",
    "message": "Stats retrieved successfully",
    "success": true
}
```

#### `GET /v1/token` — ERC-20 token detail by contract

**Parameters:**
- `address` (query, required, string) — Token contract address Example: `0x3355df6D4c9C3035724Fd0e3914dE96A5a83aaf4`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/zksync-api/v1/token?address=0x3355df6D4c9C3035724Fd0e3914dE96A5a83aaf4"
```

**Response:**
```json
{
    "data": {
        "token": {
            "icon": "https://assets.coingecko.com/coins/images/35262/small/USDC_Icon.png?1708008941",
            "name": "zkSync Bridged USDC (zkSync)",
            "type": "ERC-20",
            "symbol": "USDC",
            "holders": null,
            "decimals": 6,
            "total_supply": "22198963280588",
            "exchange_rate_usd": null,
            "circulating_market_cap": null
        }
    },
    "meta": {
        "timestamp": "2026-06-08T01:18:22.451Z",
        "request_id": "9b2dc54e-c560-44e9-b713-caf738131844"
    },
    "status": "ok",
    "message": "Token retrieved successfully",
    "success": true
}
```

#### `GET /v1/transaction` — Transaction detail by hash

**Parameters:**
- `hash` (query, required, string) — A transaction hash (0x + 64 hex) Example: `0x87332711fe9f527bd69ac8273c16736743893db3b1e83506409e70631330f660`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/zksync-api/v1/transaction?hash=0x87332711fe9f527bd69ac8273c16736743893db3b1e83506409e70631330f660"
```

**Response:**
```json
{
    "data": {
        "transaction": {
            "to": "0x5AEa5775959fBC2557Cc8789bC1bf90A239D9a91",
            "from": "0x478ae7AEE3EC17379Cea71aD1a6C692eBB305622",
            "hash": "0x87332711fe9f527bd69ac8273c16736743893db3b1e83506409e70631330f660",
            "type": 2,
            "block": 30000000,
            "nonce": 47,
            "method": "OwnerTransferV7b711143",
            "status": "ok",
            "fee_eth": 3.6242e-6,
            "fee_wei": "3624200000000",
            "gas_used": 144968,
            "gas_price": "25000000",
            "timestamp": "2024-03-27T13:26:04.000000Z",
            "value_eth": 0,
            "value_wei": "0",
            "confirmations": 40613560
        }
    },
    "meta": {
        "timestamp": "2026-06-08T01:18:24.585Z",
        "request_id": "bcbe8c11-63e6-4de1-8948-da1e3bd04655"
    },
    "status": "ok",
    "message": "Transaction retrieved successfully",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Service description & endpoints

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/zksync-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "service": "zksync-api",
        "endpoints": {
            "GET /v1/gas": "Gas oracle (slow/average/fast in gwei).",
            "GET /v1/meta": "This document.",
            "GET /v1/block": "Block detail by height= or hash=.",
            "GET /v1/stats": "Network stats (blocks, txns, coin price, market cap, gas).",
            "GET /v1/token": "ERC-20 token detail by contract (address=).",
            "GET /v1/blocks": "The most recent blocks.",
            "GET /v1/search": "Search addresses, tokens, blocks & txns (q=).",
            "GET /v1/address": "Address balance, ENS & contract info (address=).",
            "GET /v1/transaction": "Transaction detail (hash=)."
        },
        "description": "Live zkSync Era (L2) on-chain data via Blockscout: network stats, a gas oracle (gwei), recent blocks and block detail, address balances with ENS, transaction detail, ERC-20 token detail and a universal search across addresses, tokens, blocks and transactions. zkSync Era is an Ethereum zk-rollup L2; gas and balances are in ETH. Real on-chain data, no key."
    },
    "meta": {
        "timestamp": "2026-06-08T01:18:24.691Z",
        "request_id": "a3495850-317c-406b-99fc-5c2e750cd13f"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/zksync-api
OpenAPI spec: https://www.oanor.com/api/zksync-api/openapi.json
