Resolve an ENS Name to an Address - Etherscan
Short summary
This is documentation for Etherscan's API endpoint that converts ENS names (like etherscan.eth) into their corresponding Ethereum addresses. It shows how to call the endpoint across multiple programming languages and explains the rate limits and caching behavior.
- The endpoint resolves ENS names and onchain subdomains to Ethereum addresses via a simple GET request to the Etherscan API
- Free tier is throttled to 1 call per second, with results cached for up to 5 minutes before reflecting onchain changes
- Names requiring offchain resolution (EIP-3668 CCIP Read, ENSIP-10 Wildcard Resolution) like jesse.base.eth are not supported
Full summary
This is documentation for Etherscan's ENS name resolution API endpoint. It converts human-readable Ethereum Name Service names like "etherscan.eth" or "gm.etherscan.eth" into their corresponding wallet addresses. You make a GET request to the `/v2/api` endpoint with your API key, set the action to "forwardresolve," and pass in the ENS name you want to resolve. The API returns a JSON response containing the resolved Ethereum address (a 42-character hex string starting with 0x).
The documentation includes code examples in six languages—curl, Python, JavaScript, PHP, Go, and Ruby—so you can integrate this into whatever stack you're using. All examples follow the same pattern: construct the request URL with your API key and parameters, make the GET call, and parse the JSON response. The response structure is straightforward: a status field (1 for success, 0 for failure), a message field, and the actual result containing the resolved address.
There are some practical limitations worth knowing. The free tier is throttled to one call per second, and results cache for up to five minutes, so recent name changes won't show immediately. The endpoint only works on Ethereum mainnet and doesn't support names requiring offchain resolution like "jesse.base.eth" (those use EIP-3668 CCIP Read or ENSIP-10 wildcard resolution, which this API doesn't handle).