Advanced API Quickstart
This quickstart shows how to make a first Advanced API request over HTTPS using JSON-RPC 2.0.
Prerequisites
Before you start, make sure you have:
- A W3API project with Advanced API access.
- A project API key copied from the Web3 API platform.
- A terminal with
curl, or a JavaScript runtime that supportsfetch.
Keep your API key private. Do not commit it to source control or expose it in frontend code.
Set Your Endpoint
Advanced API requests use the multichain endpoint:
Replace <apiKey> with your project API key. In the examples below, store the full URL as YOUR_ADVANCED_API_ENDPOINT.
The interactive Try it playground uses a docs proxy to make sample requests without exposing a project API key. Production applications should call the multichain endpoint above with their own project API key.
Make a Request with curl
Use ankr_getTokenPrice to request the current price for the ANKR token on Ethereum:
A successful response returns a JSON-RPC result object with token price data:
The exact price changes over time.
Next Steps
After the first request works, open Methods for the generated Advanced API reference. It includes the available Query API, Token API, and NFT API methods with request parameters, response schemas, and examples from the OpenRPC spec.