Standard API Quickstart

This quickstart shows how to make a first Standard API request over HTTPS using an Ethereum JSON-RPC method as a general example. Node API endpoints are chain-specific, so production requests must use the endpoint for the chain you want to query.

Prerequisites

Before you start, make sure you have:

  • A W3api account with access to public Node API endpoints.
  • A Node API HTTPS endpoint copied from the Web3 API platform for the selected chain.
  • A terminal with curl.

Copy Your HTTPS Endpoint

  1. Open the Web3 API platform.
  2. Select the project and blockchain network you want to use.
  3. Copy the network’s HTTPS endpoint.
  4. Store it as YOUR_HTTPS_ENDPOINT in the examples below.

Make a Request with curl

Use eth_blockNumber to request the latest block number from an Ethereum-compatible endpoint:

$curl -X POST YOUR_HTTPS_ENDPOINT \
> -H "Content-Type: application/json" \
> -d '{
> "jsonrpc": "2.0",
> "method": "eth_blockNumber",
> "params": [],
> "id": 1
> }'

A successful response returns the latest block number as a hexadecimal value:

1{
2 "jsonrpc": "2.0",
3 "id": 1,
4 "result": "0x134d5c7"
5}

Next Steps

The Standard API references are chain-specific. Select the one you’d like to interact with to view its method details:

Ethereum

View Ethereum API reference.

Solana

View Solana API reference.

BNB Smart Chain
BNB Smart Chain

Coming soon…

Polygon PoS
Polygon PoS

Coming soon…

Base

Coming soon…

Arbitrum

Coming soon…

Bitcoin
Bitcoin

Coming soon…

OP Mainnet
Optimism

Coming soon…

Avalanche
Avalanche

Coming soon…

Tron
TRON

Coming soon…

Monad
Monad

Coming soon…

Sui
Sui

Coming soon…