OpenViSTAI · Agents · Blockchain · Crypto
Menu
Developer Tools

Py Etherscan API

Py Etherscan API is a Python library that wraps selected Etherscan API modules for querying account, contract, statistics, token, proxy, block, transaction, log and gas-tracker data.

Independent OpenViST project profile, based on linked sources.

Py Etherscan API — OpenViST project profile in Developer Tools.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when a Python workflow needs to query Etherscan through one of the library’s listed API modules and the required Etherscan account and API key are available.

Who it is for

  • Python developers building scripts that retrieve Etherscan account or transaction data.
  • Developers creating contract, token or gas-tracking data utilities.
  • Analysts who want to incorporate Etherscan responses into Python-based blockchain workflows.

Documented uses

  • Retrieve account and transaction data through Etherscan API bindings.
  • Look up contract and token information.
  • Query listed block, log, statistics and proxy modules.
  • Consume gas-tracker data in analysis scripts.
Before you choose

Requirements & limits

The README requires an Etherscan user account and API key, with the key supplied at runtime. It documents pip installation and lists Mainnet and Ropsten support.

  • The README lists bindings for accounts, contracts, statistics, tokens, proxies, blocks, transactions, logs and gas tracking; it does not claim to cover every Etherscan API module.
  • The documented networks are Mainnet and Ropsten.
  • Examples and Jupyter notebooks are referenced, while the README says fuller documentation, a unit test suite and request throttling were TODO items.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Install py-etherscan-api and prepare an API key

Install the Python package and configure the key file used by its provided examples.

Before you start

  • Python 3 with pip
  • An Etherscan user account and API key

Steps

  1. Run the command below.

    Documented command
    python3 -m pip install py-etherscan-api
  2. For the provided examples, create api_key.json in the base directory containing { "key" : "YourApiKeyToken" }, replacing the placeholder with your Etherscan API key.

  3. Use the key at runtime when calling the API; the library documents Mainnet and Ropsten support.

Expected outcome

The package is installed, and the examples can read an API key from the documented JSON file.

Guide limitations

  • An Etherscan API key is required at runtime.
  • The documented networks are Mainnet and Ropsten; available bindings are limited to accounts, contracts, stats, tokens, proxies, blocks, transactions, logs, and Gas Tracker.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
14 October 2026
Original website title
corpetty/py-etherscan-api · Official homepage title · retained in its source language