Client SDKs & Libraries

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.


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 caseRecommended 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 methodsREST API /smart-contracts/{hash}
Search boxes and autocompleteREST 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

Open source

OpenScan.AI is open source. Report issues and contribute at github.com/OpenScanAI.