Module

Networks — 0 credits (free)

Query supported blockchain networks and their metadata. Free, no authentication required.

Public — no auth required
list()
GET 0 credits

List all supported networks with their chain IDs, symbols, explorer URLs, and testnet status. Use this to populate a network selector dropdown or verify a network name before using it in API calls.

Example

$networks = Web3Api::networks()->list();

foreach ($networks as $network) {
    echo $network['name'];         // "polygon"
    echo $network['chain_id'];     // 137
    echo $network['symbol'];       // "MATIC"
    echo $network['explorer_url']; // "https://polygonscan.com"
    echo $network['is_testnet'];   // false
    echo $network['is_active'];    // true
}

Response item shape

{
  "id":           "550e8400-e29b-41d4-a716-446655440000",
  "name":         "polygon",
  "chain_id":     137,
  "symbol":       "MATIC",
  "explorer_url": "https://polygonscan.com",
  "is_testnet":   false,
  "is_active":    true
}

All supported networks

NameChain IDSymbolExplorerType
ethereum1ETHetherscan.ioMainnet
polygon137MATICpolygonscan.comMainnet
bsc56BNBbscscan.comMainnet
arbitrum42161ETHarbiscan.ioMainnet
optimism10ETHoptimistic.etherscan.ioMainnet
avalanche43114AVAXsnowtrace.ioMainnet
polygon_mumbai80001MATICmumbai.polygonscan.comTestnet
goerli5ETHgoerli.etherscan.ioTestnet
sepolia11155111ETHsepolia.etherscan.ioTestnet
get()
GET 0 credits

Get details for a single network by its slug name.

Parameters

NameTypeRequiredDescription
$networkNamestringYesNetwork slug (e.g. "polygon", "ethereum")

Example

$network = Web3Api::networks()->get(networkName: 'polygon');

echo $network['chain_id'];     // 137
echo $network['symbol'];       // "MATIC"
echo $network['explorer_url']; // "https://polygonscan.com"