{"uid":"cap_6huSwdl5mvXL8r1lr9jw5","slug":"evm-address-code-inspector-contract-vs-eoa-detector-b7653f40","name":"EVM Address Code Inspector (Contract vs EOA Detector)","description":"Is an address a contract or an EOA on Base, Ethereum, Arbitrum, Optimism, Polygon or BNB (default Base)? Returns is_contract, deployed code size in bytes, and the keccak256 code hash (eth_getCode).","url":"https://api.agentstools.dev/code","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","description":"Address (0x..)"},"network":{"enum":["base","ethereum","arbitrum","optimism","polygon","bnb"],"type":"string","description":"EVM network to read from (default base)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"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_Z3qrJYMUGSLNa3bVDMVVj","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":"Determines whether an Ethereum-compatible address is a smart contract or an externally owned account (EOA), returning deployed bytecode size and keccak256 code hash across major EVM networks.","exampleAgentPrompt":"Can you check whether 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 is a smart contract or a regular wallet on Ethereum, and give me its code size and code hash?","exampleUseCases":null,"resultDescription":"Returns a JSON object with: is_contract (boolean indicating whether the address has deployed bytecode), code_size (integer number of bytes of deployed code), and code_hash (keccak256 hash of the deployed bytecode via eth_getCode). An EOA returns code_size of 0 and the empty keccak256 hash.","failureModes":["Invalid address format (not a valid 0x hex address) returns an error","Unsupported network value returns an enum validation error","Address not found or RPC node unavailable may return a timeout or upstream error","Rate limiting or payment failure returns 402 Payment Required"],"whenToPreferThis":"Use this endpoint when you need to programmatically distinguish smart contracts from EOAs on Base, Ethereum, Arbitrum, Optimism, Polygon, or BNB — especially when you need the exact bytecode size or code hash for security analysis, contract verification, or on-chain due diligence. Prefer this over general blockchain explorers when you need a simple, structured API response without scraping.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:56:30.337Z","isFirstParty":false}