CHAINLIST_API_v1.0.0

REST API for blockchain chain information

> Free REST API for 2400+ blockchain networks

> No API keys required • No rate limits • CORS enabled

> Data updated daily from chainlist.org

> Response time: ~5-20ms • Powered by Cloudflare Workers

SYSTEM_STATUS

Loading... TOTAL_CHAINS
... MAINNETS
... TESTNETS
... WITH_ICONS

SEARCH_CHAINS

API_ENDPOINTS

GET /chains/:chainId
Get detailed chain information by ID

Parameters: None (chainId in URL)

Returns: Single chain object with all metadata

Example IDs: 1 (Ethereum), 8453 (Base), 137 (Polygon), 8333 (B3)

curl https://chainlistapi.com/chains/1

# Response includes:
# - chainId, name, chain, shortName
# - nativeCurrency (name, symbol, decimals)
# - rpc[] (array of RPC endpoints with tracking info)
# - iconUrl (full URL to chain icon)
# - explorers[] (block explorers)
# - isTestnet, tvl, parent (L2 info)
GET /chains/search
Full-text search across all chains

Parameters:

> q (string, optional): Search query (name, chain, shortName)

> page (number, default: 1): Page number

> limit (number, default: 20, max: 100): Results per page

> testnet (boolean): Filter by testnet (true/false)

> hasIcon (boolean): Filter by icon availability (true/false)

Returns: Paginated results with total count

# Search for ethereum
curl "https://chainlistapi.com/chains/search?q=ethereum"

# Only mainnets with icons
curl "https://chainlistapi.com/chains/search?q=polygon&testnet=false&hasIcon=true"

# Paginate results
curl "https://chainlistapi.com/chains/search?q=eth&page=2&limit=50"
GET /chains/all
Get all chains with filtering and pagination

Parameters:

> page (number, default: 1): Page number

> limit (number, default: 20, max: 100): Results per page

> testnet (boolean): Filter by testnet (true/false)

> hasIcon (boolean): Filter by icon availability (true/false)

Sorting: Results sorted by TVL (Total Value Locked) descending

# Get top 50 mainnets with icons
curl "https://chainlistapi.com/chains/all?testnet=false&hasIcon=true&limit=50"

# Get all testnets
curl "https://chainlistapi.com/chains/all?testnet=true&limit=100"

# Get chains without icons
curl "https://chainlistapi.com/chains/all?hasIcon=false"
GET /stats
Get API statistics and top chains by TVL

Returns:

> Total chains, mainnets, testnets counts

> Chains with/without icons

> Top 10 chains by Total Value Locked (TVL)

> Last data update timestamp

curl https://chainlistapi.com/stats
GET /icons/:iconName
Get chain icon image

Parameters: iconName in URL (e.g., ethereum.jpg, base.webp)

Returns: Image file with proper content-type

Cache: 1 year cache for optimal performance

Formats: PNG, JPG, SVG, WebP supported

curl https://chainlistapi.com/icons/ethereum.jpg -o ethereum.jpg
curl https://chainlistapi.com/icons/base.webp -o base.webp

CODE_EXAMPLES

JavaScript - Get Single Chain

const chain = await fetch('https://chainlistapi.com/chains/1')
  .then(r => r.json());

console.log(chain.name); // "Ethereum Mainnet"
console.log(chain.chainId); // 1
console.log(chain.nativeCurrency.symbol); // "ETH"
console.log(chain.rpc[0].url); // First RPC endpoint
console.log(chain.iconUrl); // Icon URL
console.log(chain.explorers[0].url); // Block explorer

JavaScript - Search and Filter

// Search for polygon chains
const result = await fetch(
  'https://chainlistapi.com/chains/search?q=polygon&testnet=false&hasIcon=true'
).then(r => r.json());

console.log(`Found ${result.total} chains`);
result.results.forEach(chain => {
  console.log(`${chain.chainId}: ${chain.name} (${chain.nativeCurrency.symbol})`);
});

TypeScript - Type-Safe Client

interface Chain {
  chainId: number;
  name: string;
  nativeCurrency: {
    symbol: string;
    decimals: number;
  };
  rpc: Array<{ url: string; tracking?: string }>;
  iconUrl: string | null;
  explorers: Array<{ name: string; url: string }>;
}

async function getChain(chainId: number): Promise {
  const res = await fetch(`https://chainlistapi.com/chains/${chainId}`);
  return res.json();
}

// Usage
const base = await getChain(8453);
console.log(`Connect to ${base.name} at ${base.rpc[0].url}`);

Python - Complete Example

import requests

class ChainListAPI:
    BASE_URL = "https://chainlistapi.com"
    
    def get_chain(self, chain_id):
        return requests.get(
            f"{self.BASE_URL}/chains/{chain_id}"
        ).json()
    
    def search_chains(self, query, testnet=None, has_icon=None):
        params = {'q': query}
        if testnet is not None:
            params['testnet'] = str(testnet).lower()
        if has_icon is not None:
            params['hasIcon'] = str(has_icon).lower()
        return requests.get(
            f"{self.BASE_URL}/chains/search",
            params=params
        ).json()

# Usage
api = ChainListAPI()

# Get Ethereum
eth = api.get_chain(1)
print(f"Chain: {eth['name']}")
print(f"Symbol: {eth['nativeCurrency']['symbol']}")
print(f"RPC: {eth['rpc'][0]['url']}")

# Search mainnets with icons
chains = api.search_chains('base', testnet=False, has_icon=True)
for chain in chains['results']:
    print(f"{chain['chainId']}: {chain['name']}")

React Hook

import { useState, useEffect } from 'react';

function useChain(chainId) {
  const [chain, setChain] = useState(null);
  const [loading, setLoading] = useState(true);
  
  useEffect(() => {
    fetch(`https://chainlistapi.com/chains/${chainId}`)
      .then(r => r.json())
      .then(data => {
        setChain(data);
        setLoading(false);
      });
  }, [chainId]);
  
  return { chain, loading };
}

// Component usage
function ChainSelector({ chainId }) {
  const { chain, loading } = useChain(chainId);
  
  if (loading) return 
Loading...
; return (
{chain.name}

{chain.name}

Symbol: {chain.nativeCurrency.symbol}

); }

USE_CASES

> DApp Integration: Fetch RPC endpoints for multi-chain support

> Wallet Builders: Get chain metadata and native currency info

> Chain Explorers: Display chain logos and explorer links

> Analytics: Filter chains by testnet/mainnet, TVL data available

> Network Switchers: Build chain selectors with icons

FEATURES

> Full-text search across 2400+ blockchain networks

> Filter by testnet/mainnet status

> Filter by icon availability (hasIcon=true/false)

> Pagination support (page, limit)

> RPC endpoint tracking information

> Native currency details (name, symbol, decimals)

> Block explorer links

> Chain parent information (L2s)

> TVL data for major chains

ABOUT_CHAINLIST_API

Comprehensive Blockchain Network Data

ChainList API is a free, open-source REST API providing comprehensive information about blockchain networks, crypto chains, and EVM-compatible networks. Access data for over 2,400 blockchain networks including Ethereum, Base, Polygon, Arbitrum, Optimism, Avalanche, BNB Chain, and hundreds more.

RPC Endpoints for Web3 Development

Our API provides curated RPC endpoints for each blockchain network, including information about tracking, privacy, and performance. Perfect for Web3 developers building multi-chain DApps, wallets, or blockchain explorers. Each chain includes multiple RPC providers with tracking information to help you choose the best endpoint for your needs.

Blockchain Icons and Branding Assets

Access high-quality chain icons and logos for all major blockchain networks. Icons are served through Cloudflare's global CDN with 1-year caching for optimal performance. Perfect for building chain selectors, network switchers, or displaying blockchain branding in your application. Supports PNG, JPG, SVG, and WebP formats.

Native Currency Information

Get detailed information about each blockchain's native currency including name, symbol (ETH, MATIC, AVAX, BNB, etc.), and decimals. Essential for wallet integration, token displays, and transaction formatting in your Web3 application.

Block Explorer Integration

Every chain includes links to block explorers like Etherscan, Basescan, Polygonscan, and more. Easily integrate transaction tracking and address lookup functionality into your DApp with verified explorer URLs following EIP3091 standards.

Mainnet and Testnet Support

Filter between production mainnet networks and development testnet networks. Our API tracks over 1,400 mainnets and 900+ testnets including Sepolia, Goerli, Mumbai, and other test networks. Perfect for development and testing workflows.

Layer 2 and Scaling Solutions

Comprehensive data for Layer 2 networks and scaling solutions including Arbitrum, Optimism, Base, zkSync Era, Polygon zkEVM, Linea, Scroll, and more. Each L2 includes parent chain information and bridge details for cross-chain functionality.

DeFi and TVL Data

Total Value Locked (TVL) data for major blockchain networks helps you understand network activity and adoption. Results are automatically sorted by TVL to surface the most active and liquid networks first.

Free for Developers

No API keys, no authentication, no rate limits. ChainList API is completely free for all developers. Use it in your production applications, development tools, research projects, or educational resources. CORS is enabled for direct browser integration.

Use Cases

> Crypto Wallets: Build network switchers with proper chain metadata and RPC endpoints

> DApp Development: Support multi-chain deployment with automatic network detection

> Blockchain Analytics: Analyze network distribution, testnet adoption, and ecosystem growth

> Developer Tools: Create chain selection UIs, network configuration tools, or RPC aggregators

> Educational Resources: Build learning platforms showing blockchain ecosystem diversity

SUPPORTED_NETWORKS

Major EVM Chains: Ethereum, Base, Polygon, Arbitrum, Optimism, Avalanche, BNB Chain, Fantom, Cronos, Gnosis Chain, Celo, Harmony, Moonbeam, Moonriver, Aurora, Fuse

Layer 2 Networks: Base, Arbitrum One, Arbitrum Nova, Optimism, Polygon zkEVM, zkSync Era, Linea, Scroll, Mantle, Mode, Blast, Manta Pacific, Metis, Boba, Loopring, StarkNet

Emerging Chains: B3, Berachain, Monad, Sei, Abstract, Movement, Eclipse, Fuel, Sonic, Unichain, Plasma, Katana, Story Protocol

Established Networks: BNB Smart Chain, Avalanche C-Chain, Fantom Opera, Cronos, Gnosis Chain, Celo, Harmony, Moonbeam, Aurora, Klaytn, Oasis

Bitcoin Layers: Rootstock (RSK), Stacks, BOB, Merlin Chain, B² Network, Bitlayer, Core DAO

Testnets: Sepolia, Goerli (deprecated), Holesky, Mumbai, Fuji, BSC Testnet, Base Sepolia, Arbitrum Sepolia, Optimism Sepolia, and 900+ test networks