Contracts
Get Contract Source Code
Retrieve the source code for a verified smart contract.
GET
Get Contract Source Code
Documentation Index
Fetch the complete documentation index at: https://docs.etherscan.io/llms.txt
Use this file to discover all available pages before exploring further.
Query Parameters
Your Etherscan API key.
Chain ID to query, eg
1 for Ethereum, 8453 for Base from our supported chains.Set to
contract for this endpoint.Set to
getsourcecode for this endpoint.The contract address to query.