The Etherscan web page shows the creator address of a contract, like this ("Circle: Deployer" in the image, but I'm fine with just the address): USDC contract

Is there a way how to get this address information using the Etherscan API, similar to how the source code and ABI of a contract can be read?

  • did you figure it out? I'd love to know as well. Thanks! Jul 22, 2023 at 3:01
  • @bernatfortet did not find an easy way, something like getting all tx for the contract and looking at the sender of the first one could work, but I never got to implement it.
    – kfx
    Jul 22, 2023 at 18:37

2 Answers 2


Etherscan/Polygonscan API Solution:

I did finally find the proper endpoint for these requests. You can batch a max of 5 contracts per request. The etherscan API seems more reliable than JSON RPC method mentioned below. Additionally the etherscan API is much faster. Use npm lib node-fetch if in a node-js context. Solution also works with polygonscan:

// You can get an API key on the free-tier of etherscan/polygonscan
const APIKEY="YourApiKey" 

async function getContractCreators(
  // Array of contract-address strings (Maximum 5 per API call)
  const url = `https://api.etherscan.io/api?module=contract&action=getcontractcreation&apiKey=${APIKEY}&contractaddresses=${contracts.toString()}`;
  const req = await fetch(url);
  const res = await req.json()
  // Make sure req was success
    console.warn("Handle req error here",res)
    return []
  res.result.forEach(c => {
    let contract = c.contractAddress; // contract-address
    let creator  = c. contractCreator; // creator-wallet-address
    console.log("🔎 Found Creator"
    console.log("  -> contract :" + contract);
    console.log("  -> creator :" + creator)
  return res.result


Old Solution With EVM JSON RPC:

See this answer https://ethereum.stackexchange.com/a/65210/125787

The code looks like this and it may not work if the creator of the contract was another contract and not a wallet.

import Web3 from "web3";

// Here we use alchemy but you can use others http or websocket
const web3 = new Web3("https://eth-mainnet.alchemyapi.io/v2/<YourAPIKey>")

async function search_contract_cretion_block(contract_address) {
    var highest_block = await web3.eth.getBlockNumber();
    var lowest_block = 0;

    var contract_code = await web3.eth.getCode(contract_address, highest_block);
    if (contract_code == "0x") {
        console.error("Contract " + contract_address + " does not exist!");
        return -1;

    while (lowest_block <= highest_block) {
        let search_block = parseInt((lowest_block + highest_block) / 2)
        contract_code = await web3.eth.getCode(contract_address, search_block);

        //console.log(highest_block, lowest_block, search_block, contract_code);

        if (contract_code != "0x") {
            highest_block = search_block;
        } else if (contract_code == "0x") {
            lowest_block = search_block;

        if (highest_block == lowest_block + 1) {
            return highest_block;


async function search_contract_creator (contract_address, block) {
    var block = await web3.eth.getBlock(block);

    var transactions = block.transactions;

    for (let transaction in transactions) {
        let receipt = await web3.eth.getTransactionReceipt(transactions[transaction]);
        if (receipt.contractAddress?.toLowerCase() == contract_address.toLowerCase()) {
            return receipt.from

    return -1;

async function find_contract_creator (contract_address) {
    var block = await search_contract_cretion_block(contract_address);
    var creator = await search_contract_creator(contract_address, block);
    return creator;


for get contract creator and creation transaction hash use this service:


documentation : link

for get contract source code and contract ABI read this document: link

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.