Logo

ZKsync RPC Endpoints & API | OnFinality

The Elastic Network

Connect to ZKsync in seconds with OnFinality RPC endpoints, request analytics, scalable rate limits, and 99.99% uptime for production Web3 apps.

The Elastic Network

ZKsync RPC Endpoint

The below example uses the public API endpoint*. This endpoint is only suitable for testing. To avoid rate limiting and service interruption, sign up now to get your own API key.
curl -H 'content-type:application/json' -d '{"id": 1, "jsonrpc": "2.0", "method": "eth_blockNumber"}' 'https://zksync.api.onfinality.io/public'
https://zksync.api.onfinality.io/public
wss://zksync.api.onfinality.io/public-ws

* The public endpoint is rate limited

RPC API Service

RPC API Features

Archive

ZKsync RPC Endpoints

ZKsync is an Ethereum Layer 2 scaling solution that uses zero-knowledge rollups (ZK-rollups) to provide high throughput, low transaction costs, and full EVM compatibility. As an elastic network, ZKsync enables developers to build scalable dApps, DeFi protocols, wallets, and analytics tools with the security of Ethereum.

Why Use ZKsync RPC?

Developers connect to ZKsync via JSON-RPC endpoints to read blockchain data, submit transactions, and interact with smart contracts. Common use cases include:

  • dApps and wallets: Enable users to send transactions and query balances.
  • DeFi products: Monitor liquidity pools, execute swaps, and fetch price data.
  • Analytics tools: Retrieve historical data for dashboards and reporting.
  • Bots and backend services: Automate on-chain interactions and index events.

ZKsync RPC on OnFinality

OnFinality provides managed API endpoints for ZKsync mainnet, supporting both HTTP and WebSocket transports. Our infrastructure is designed for production workloads, offering:

  • Archive access: Query historical state and past blocks for deep analytics.
  • Reliable connectivity: Redundant nodes and global points of presence.
  • Usage analytics: Monitor request volume, errors, and latency through the OnFinality dashboard.

How to Connect

  1. Create or sign in to your OnFinality account.
  2. Select ZKsync from the supported networks list.
  3. Create an API endpoint (shared or dedicated).
  4. Test your endpoint with eth_blockNumber.
  5. Monitor usage and move critical traffic to production.

Public vs. Authenticated RPC

Public ZKsync RPC endpoints are suitable for lightweight testing but often lack rate-limit transparency and reliability guarantees. OnFinality's authenticated endpoints provide clearer limits, request visibility, and a path to higher-capacity plans or dedicated nodes.

Key Facts

  • Network: ZKsync Mainnet (Chain ID: 324)
  • Protocol: EVM JSON-RPC
  • Transports: HTTP and WebSocket
  • Advanced access: Archive support available
  • Common users: Production dApps, DeFi, analytics, wallets, bots

Get Started

Ready to build on ZKsync? Create an OnFinality account and get your API key in minutes.

RPC API SERVICE
Reliable RPC endpoints with high rate limits
Powerful RPC request analytics
99.99% uptime
Connect via HTTPS or websocket
Decentralised servers hosted globally
Full archive access at no extra cost
PRICING

Calculate Your Costs

Only pay for what you need.

Million Standard Requests
0100M200M300M400M
Total Cost
$49/ month

Recommended Plan: GROWTH

Continue with this plan

Latest ZKsync Updates!

OnFinality boosts ZKsync with lightning fast RPC endpoint

Mar 25,2025

OnFinality boosts ZKsync with lightning fast RPC endpoint

OnFinality provides easy to use, reliable and scalable API endpoints for builders to deploy and run their dApps on ZKsync quickly and easily!

Never Worry about Infrastructure Again

OnFinality takes away the heavy lifting of DevOps so you can build smarter and faster.

Get Started