{"uid":"cap_lucEivKIN41Ol6u5A3iUm","slug":"ethereum-eth-getcode-contract-bytecode-lookup-821032dd","name":"Ethereum eth_getCode – Contract Bytecode Lookup","description":"Returns the bytecode of a contract at a given address on Ethereum mainnet via eth_getCode RPC call. Query: address (0x + 40 hex).","url":"https://ari001.tailb4ac3a.ts.net/v1/ventures/ethereum_rpc_api/eth_getcode?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":["address"],"properties":{"address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"0x + 40 hex"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["ok","service"],"properties":{"ok":{"type":"boolean"},"hex":{"type":["string","null"]},"chain":{"type":"string"},"error":{"type":"string","description":"present when ok is false"},"method":{"type":"string"},"result":{"type":"string","description":"the bytecode, 0x-hex"},"service":{"type":"string"}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_KI3pjJDbFmlSTnAmXv7n5","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns the deployed bytecode of a smart contract at a given Ethereum mainnet address via eth_getCode RPC call.","exampleAgentPrompt":"Can you fetch the deployed bytecode for the Ethereum contract at 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 on mainnet?","exampleUseCases":[{"title":"Verify contract deployment on mainnet","prompt":"Can you check whether the address 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 actually has contract code deployed on Ethereum mainnet, or is it just a regular wallet?"},{"title":"Audit smart contract bytecode","prompt":"Pull the raw bytecode for the contract at 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D on Ethereum mainnet — I need to compare it against our expected deployment hash."},{"title":"Detect proxy vs implementation contract","prompt":"Fetch the bytecode at 0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f on Ethereum so I can check whether it's a minimal proxy pattern or a full implementation contract."}],"resultDescription":"Returns a JSON object with an `ok` boolean, the `result` field containing the 0x-prefixed hex bytecode string (empty 0x if the address is an EOA or undeployed), the `chain` identifier, and the `method` name. On failure, an `error` field is present with a description.","failureModes":["Invalid address format (not 0x + 40 hex) returns a validation error","Address with no deployed contract returns '0x' (empty bytecode, not an error)","RPC node unavailability causes a failed response with ok: false and an error message","Malformed request missing the required address query parameter returns an error"],"whenToPreferThis":"Use this endpoint when you need to verify whether a given Ethereum address has deployed contract code, retrieve raw bytecode for auditing or comparison, or distinguish between externally owned accounts (EOAs) and smart contracts on Ethereum mainnet. Prefer this over general-purpose Ethereum RPC wrappers when you want a simple, pay-per-call REST interface without managing your own node or API key.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-14T12:46:21.948Z","isFirstParty":false,"canonicalSlug":"ethereum-eth-getcode-contract-bytecode-lookup-821032dd"}