Query the OpenScan.AI API from your applications using standard HTTP and web3 libraries.
There is no proprietary SDK to install. The OpenScan.AI REST API follows the Blockscout v2 API specification, so any HTTP client works — and any Blockscout-compatible SDK works unchanged by pointing it at https://xdcscan.io/api/v2.
Recommended libraries
JavaScript / TypeScript
- fetch (built into Node.js 18+ and all browsers) — simplest option, zero dependencies
- axios — convenient interceptors for auth headers and retries
- viem — modern web3 library; combine JSON-RPC reads with REST calls for indexed data
- ethers.js — widely used web3 library with broad ecosystem support
Python
- requests / httpx — plain REST calls
- web3.py — JSON-RPC companion for on-chain reads
Which one do I need?
| Use case | Recommended tool |
|---|---|
| Indexed data (history, holders, stats) | fetch / axios / requests → REST API |
| Live chain reads (latest nonce, raw call) | viem / ethers / web3.py → JSON-RPC |
| Decoding verified contract methods | REST API /smart-contracts/{hash} |
| Search boxes and autocomplete | REST API /search/quick |
Use the REST API for anything indexed; use JSON-RPC against the chain’s RPC endpoint for live state that has not been indexed yet.
Documentation
- Installation — add a client library to your project
- Quick Start — your first API calls in minutes
- API Keys & Rate Limits — raise limits and handle 429s
- Examples — real-world scripts and apps
- API Reference — every endpoint, parameter, and response field
Open source
OpenScan.AI is open source. Report issues and contribute at github.com/OpenScanAI.