What this API does
The Etherscan API provides developers with robust access to Ethereum blockchain data, allowing queries for wallet balances, transaction histories, smart contract details, and token information such as ERC-20 and ERC-721 tokens. Its straightforward HTTP-based interface delivers data in JSON format, simplifying integration in various applications.
How it works
Developers can send HTTP GET requests to the API to retrieve information. The API supports multiple endpoints tailored to different developer needs, enabling real-time data access for wallets, transactions, and token details. Examples of queries include fetching recent transactions for a wallet or retrieving token balances.
Authentication
To use the Etherscan API, developers need to obtain a free API key from the Etherscan website. This key allows access to the API's features without any credit card requirement.
Example usage
/api?module=account&action=balance&address=your_wallet_address&tag=latest&apikey=your_api_key- Retrieves the balance of a specific Ethereum address./api?module=account&action=txlist&address=your_wallet_address&startblock=0&endblock=99999999&sort=asc&apikey=your_api_key- Fetches transaction history for a specific address./api?module=token&action=getTokenInfo&contractaddress=your_token_contract_address&apikey=your_api_key- Gets details about a specific ERC-20 token.
Limits
The Etherscan API allows 5 requests per second and up to 100,000 calls per day with a free key. Rate limits are enforced to ensure reliable access for all developers.
Ideal use cases
- Building Ethereum wallets that require balance and transaction tracking.
- Creating DeFi platforms that interact with smart contracts.
- Developing blockchain analytics tools for data visualization.
- Integrating Ethereum transaction data into educational software.