XDC Network · Chain ID 50

XDC Network API by OpenScan.AI

A Blockscout-compatible REST API v2 for everything on XDC — blocks, transactions, addresses, tokens, and verified contracts. Free to use, no API key required to get started.

Swagger UI → OpenAPI spec → The OpenAPI spec is served from the Swagger UI.
Quick start · cURL
# Fetch live XDC Network stats (Blockscout v2 REST API)
curl https://xdcscan.io/api/v2/stats
JavaScript
const res = await fetch("https://xdcscan.io/api/v2/stats");
const stats = await res.json();

console.log(stats.total_blocks, stats.total_transactions);

Get started in 3 steps

From zero to your first XDC API call in under five minutes — no API key needed today.

01

Open the API docs

Browse every endpoint interactively in the Swagger UI at xdcscan.io/api-docs. No account or API key needed today.

02

Copy your first call

Grab the snippet below — it hits the live stats endpoint and works from any terminal or HTTP client.

03

Make the call

Run it and you have live XDC chain data. When API keys for higher rate limits go live, they will be created in XDCScan My Account.

Your first call
curl https://xdcscan.io/api/v2/stats

Every endpoint you need

Six endpoint families cover the full XDC chain surface. Every route is documented interactively in the Swagger UI.

Blocks

Latest blocks, block details, and rewards by number or hash.

  • GET /api/v2/blocks
  • GET /api/v2/blocks/{number}

Transactions

Transaction lookups, receipts, logs, and pending txpool data.

  • GET /api/v2/transactions
  • GET /api/v2/transactions/{hash}

Addresses

Balances, coin balance history, and counters for any XDC address.

  • GET /api/v2/addresses/{address}
  • GET /api/v2/addresses/{address}/transactions

Tokens

XRC-20 / XRC-721 metadata, holders, and transfers across the network.

  • GET /api/v2/tokens
  • GET /api/v2/tokens/{address}

Smart Contracts

Verified contract source, ABIs, and read/write methods.

  • GET /api/v2/smart-contracts
  • GET /api/v2/smart-contracts/{address}

Stats

Network-wide metrics: total blocks, transactions, gas, and prices.

  • GET /api/v2/stats

Rate limits & fair use

The XDC API is free for public use under a fair-use policy. Anonymous requests are rate-limited per IP; limits are tuned for typical dApp and integration workloads. If you are building something heavier — indexing, backfills, or high-frequency polling — reach out via the contact form and we will work out a plan.

When a limit is hit the API responds with HTTP 429 — back off and retry, or add caching on your side.

What developers build with the XDC API

Wallets & portfolio apps

Resolve balances, token holdings, and full transaction history for any XDC address.

Analytics & dashboards

Pull network stats and block/transaction feeds to power charts and monitoring.

AI agents & automation

Blockscout-compatible endpoints work out of the box with codegen, Postman, and AI tooling.

Start exploring.