{"uid":"cap_Z3RPSMogJHG6SdAOlPPYP","slug":"agent402-contract-code-checker-004db440","name":"Agent402 Contract Code Checker","description":"Is this address a contract, and what code does it hold? Returns isContract, deployed bytecode size, and the keccak-256 hash of the bytecode (stable fingerprint for comparing deployments) on Ethereum, Base, Polygon, Arbitrum, or Optimism. Keyless multi-endpoint failover. ?address=0x…&network=base","url":"https://agent402.tools/api/contract-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"],"type":"string"},"queryParams":{"type":"object","required":["address"],"properties":{"address":{"type":"string","description":"EVM address to check (0x…)."},"network":{"type":"string","description":"ethereum / base / polygon / arbitrum / optimism (default base)."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["network","address","isContract","bytecodeBytes","keccak256"],"properties":{"address":{"type":"string"},"network":{"type":"string"},"keccak256":{"type":"string"},"isContract":{"type":"boolean"},"bytecodeBytes":{"type":"integer"}}}}}}},"responseSchema":{"type":"json","example":{"address":"0x8335…","network":"base","keccak256":"0x…","isContract":true,"bytecodeBytes":2148}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_z6XjPzUCRvOcXwnGMWVHd","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Retrieves the deployed bytecode and keccak256 hash for an EVM address, indicating whether it is a smart contract on a specified network.","exampleAgentPrompt":"Can you check if the address 0x8335aBc5d73A00c35F3f7C6F5Ea44C52E7a2C90 is a smart contract on Base, and if so give me its bytecode hash and size?","exampleUseCases":[{"title":"Smart contract deployment verification","prompt":"Is 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 actually a deployed contract on Ethereum, or just a regular wallet? If it's a contract, what's its bytecode keccak256 hash?"},{"title":"DeFi protocol address auditing","prompt":"I have this address 0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45 on Arbitrum — can you confirm it has deployed bytecode and tell me how large the contract is?"},{"title":"Cross-chain contract presence check","prompt":"Check whether 0x4200000000000000000000000000000000000006 is a smart contract on Optimism and return its bytecode hash so I can compare it across networks."}],"resultDescription":"Returns a JSON object containing the queried EVM address, the network it was checked on, a keccak256 hash of the deployed bytecode, a boolean flag indicating whether the address is a contract, and the size of the bytecode in bytes.","failureModes":["Invalid or malformed EVM address (not a valid 0x… hex address) — returns an error","Address not found or network unavailable — may return isContract: false or an error","Unsupported network name provided — falls back to Base or returns an error","Payment failure (insufficient USDC balance or unsupported chain) — 402 response with payment instructions","Rate limiting or node timeout on the target network — transient error response"],"whenToPreferThis":"Choose this endpoint when you need a fast, pay-per-call, no-signup way to programmatically determine if an EVM address has deployed contract bytecode, get its keccak256 hash, or check contract presence across multiple chains (Ethereum, Base, Polygon, Arbitrum, Optimism). It is ideal for AI agents that need on-chain contract verification without maintaining API keys or subscriptions, paying only $0.002 USDC per call via x402.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T19:14:05.682Z","isFirstParty":false}