{"uid":"cap_Zf5MzGvjXQ0UaO_OKJAtY","slug":"santyvv-data-ethereum-address-contract-detection-bytecode-size-9fb5db36","name":"santyvv-data: Ethereum Address Contract Detection (Bytecode Size)","description":"Is this address a contract? Bytecode size","url":"https://santyvv-x402.santyvv1993.workers.dev/api/chain/code?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"],"type":"string"},"queryParams":{"type":"object","properties":{}}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_akcmES7x7JbPljwNblWI7","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Checks whether an Ethereum address is a smart contract by returning its bytecode size","exampleAgentPrompt":"Can you check if the Ethereum address 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 is a smart contract or a regular wallet?","exampleUseCases":[{"title":"Validate contract before DeFi interaction","prompt":"Before I interact with 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D, can you confirm it's actually a deployed smart contract and not just a regular address?"},{"title":"Token address verification","prompt":"I got this token address 0x6B175474E89094C44Da98b954EedeAC495271d0f from somewhere — can you check if it's really a contract so I know it's a legit token?"},{"title":"Security check on unknown address","prompt":"Someone sent me this address 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984 and I want to know if it's a contract or just a plain wallet before I send any funds."}],"resultDescription":"Returns the bytecode size of the given Ethereum address. A bytecode size greater than zero indicates the address is a deployed smart contract; a size of zero indicates it is an externally owned account (regular wallet). This allows agents to definitively distinguish contracts from EOAs.","failureModes":["Invalid or malformed Ethereum address returns an error","Network or RPC timeout causes request failure","Address exists but is on a chain not supported by this endpoint","Missing or invalid payment header causes 402 response","Empty or missing input parameter returns validation error"],"whenToPreferThis":"Use this endpoint when you need a lightweight, cheap check to determine if an Ethereum address hosts deployed bytecode (i.e., is a smart contract) versus a regular wallet. Ideal before executing contract interactions, verifying token addresses, or auditing unknown addresses. Prefer over full bytecode retrieval if you only need to confirm contract presence, not inspect the code itself.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T12:51:56.156Z","isFirstParty":false,"canonicalSlug":"santyvv-data-ethereum-address-contract-detection-bytecode-size-9fb5db36"}