--- id: etherscan-python version: "2.1.0" license: MIT license_treatment: permissive maintenance: active --- # etherscan-python — A minimal, yet complete, python API for etherscan.io. License: permissive · Maintenance: active · Downloads: 100.7K/mo ## What it is and what it does etherscan-python wraps Etherscan.io's REST API into a Python client, letting you query Ethereum blockchain data without writing HTTP requests directly. It covers standard endpoints for account balances, transaction history, contract metadata, block information, token transfers (ERC20 and ERC721), gas prices, and network statistics, plus PRO endpoints for historical analytics when you have a paid API key. The client supports Ethereum mainnet and testnets (Kovan, Rinkeby, Ropsten) by passing a network parameter. You instantiate a client with your API key, then call methods like `get_eth_balance()`, `get_normal_txs_by_address()`, or `get_gas_oracle()` to retrieve data as strings or structured results. The package is minimal—it depends only on requests—and aims for completeness rather than abstraction, exposing most of Etherscan's public API surface directly. Use it for: - Fetch ETH balances and transaction history for addresses to build wallet monitoring or portfolio tracking tools. - Retrieve ERC20 and ERC721 token transfer events for a contract or address to audit token movements. - Look up smart contract source code and ABI from Etherscan to interact with contracts programmatically. - Query gas price estimates and confirmation time predictions to optimize transaction timing. - Access block rewards, block timestamps, and network statistics for blockchain analysis or research. - Test your code against Ethereum testnets (Ropsten, Rinkeby, Kovan) before mainnet deployment. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides a complete Python client for Etherscan.io's blockchain API, covering accounts, contracts, transactions, blocks, tokens, gas tracking, and network statistics across mainnet and testnets. Yes, if you need to query Etherscan data from Python and are comfortable managing an API key. The package is straightforward, has no complex dependencies, and covers a broad API surface. The main caveat is that the last release was in 2021, so verify that its endpoints match your current Etherscan API needs and that it works with your Python version before relying on it for production. ## Install pip install etherscan-python uv add etherscan-python poetry add etherscan-python ## Installing etherscan-python Before you install: Low friction installation with a single runtime dependency (requests). Repository is active with recent commits as of 2026-06-17, though the package itself has not had a release since 2021-03-31. License in practice: MIT license permits commercial and private use with minimal restrictions, requiring only attribution and inclusion of the license text. Quickstart: pip install etherscan-python from etherscan import Etherscan eth = Etherscan('YOUR_API_KEY') balance = eth.get_eth_balance(address='0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a') Requires a free Etherscan.io account and personal API key; PRO endpoints require a paid subscription. Verify before relying: - Whether the package works with current Python versions given no explicit version constraint is specified. - Whether recent repository activity indicates active maintenance or if commits are from community contributors. - Whether the 2021-03-31 release date means the package is stable or potentially stale relative to Etherscan API changes. ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 100.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags etherscan api python client, ethereum blockchain data query, eth address balance lookup, transaction history ethereum, smart contract abi retrieval, ethereum testnet api, gas price oracle, erc20 token transfers, blockchain, ethereum, web3 [View on SkillFed](https://skillfed.io/packages/etherscan-python) · [View on PyPI](https://pypi.org/project/etherscan-python/)