OnFinality
New RPC users get 35% off their first monthView the offer
Starknet logo

Starknet RPC Endpoint and API

It is the secure scaling technology bringing Ethereum’s benefits to the world.

OnFinality provides managed Starknet RPC endpoints and API access for developers building on Starknet, a permissionless Validity-Rollup (ZK-rollup) for Ethereum. With OnFinality, you can connect to Starknet mainnet without running your own node, using authenticated endpoints designed for production workloads.

Create a free API key for 400,000 response units per day and up to 40 response units/second. Method weights apply.

Public endpoint rate limit: 5 req/sec

Quick Start
curl -H 'Content-Type: application/json' -d '{"id":1,"jsonrpc":"2.0","method":"starknet_blockNumber"}' 'https://starknet.api.onfinality.io/public'
curl -H 'Content-Type: application/json' -d '{"id":1,"jsonrpc":"2.0","method":"starknet_blockNumber"}' 'https://starknet.api.onfinality.io/public'
HTTPs
https://starknet.api.onfinality.io/public
https://starknet.api.onfinality.io/public
Websocket
wss://starknet.api.onfinality.io/public-ws
wss://starknet.api.onfinality.io/public-ws
GET CONNECTED

Connect to Starknet

Connect to Starknet Mainnet with OnFinality RPC. Copy the HTTPS endpoint, verify SN_MAIN and the JSON-RPC version, and create an API key for your Cairo app.

Try the public interface

First request
curl 'https://starknet.api.onfinality.io/public' \
  -H 'Content-Type: application/json' \
  --data '{"id":1,"jsonrpc":"2.0","method":"starknet_blockNumber"}'

Use the interface and request shown above for an initial check, then test the methods and traffic pattern your application actually needs.

02

Create your own access

  1. Open the dashboard and select this network.
  2. Create an endpoint and copy the access details supplied by the dashboard.
  3. Validate your application's methods, peak traffic and error handling before production.
Create an RPC endpoint for Starknet
NETWORK REFERENCE

Verify Starknet Mainnet and the RPC version

Connect your Starknet SDK to the public HTTPS endpoint. Starknet uses its own JSON-RPC methods. Use starknet_chainId to distinguish Mainnet from Sepolia and starknet_specVersion to check whether your SDK supports the endpoint's RPC version.

bash
curl -sS 'https://starknet.api.onfinality.io/public' \
  -H 'Content-Type: application/json' \
  --data '{"jsonrpc":"2.0","id":1,"method":"starknet_chainId","params":[]}'

Mainnet returns 0x534e5f4d41494e, which decodes to SN_MAIN. When troubleshooting a contract call, check the chain ID, the RPC version and the block identifier before changing the call payload. See the Starknet chain reference.

Use the Starknet method reference to check the transport and methods your integration needs. For a Cairo contract read, first test starknet_call at the intended block. For a subscription, verify that your client and endpoint support the required WebSocket method.

RPC API

RPC API plans & response units

Choose a shared RPC plan by response-unit allowance and peak throughput. Method weights and network-specific availability still apply.

Developer

Free
Included response units
400,000/day
Rate limit
Up to 40 RU/s
Extra RU
Not available

Accelerate

$249/month
Included response units
100 million/month
Rate limit
500 RU/s
Extra RU
$3.75/million
Compare RPC plans

Plan figures checked 8 November 2026. RU are not always raw requests; WebSocket responses also count toward limits. Check the current pricing and this network's method documentation. Node charges and applicable taxes are additional.

NETWORK REFERENCE

Starknet service details

NetworkCAPABILITIES
NetworkStarknet
ProtocolStarknet JSON-RPC
API capabilitiesArchive
BUILT FOR YOUR WORKLOAD

Build with Starknet

Plan access around the requests, operational requirements and release workflow your application needs.

Integration

Start with a connection check, then validate the reads, transactions or data workflows required by your application.

Usage planning

Review method-specific limits, plan allowances and usage before increasing traffic. Different methods can consume different response units.

Operations

Use your real client region and request pattern when evaluating latency, retries and service availability.

Never Worry about Infrastructure Again

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

Get Started