{"uid":"cap_QkzT_s7VSAeaznzPe_dZc","slug":"mach-gallery-base-contract-code-lookup-c4c48953","name":"Mach Gallery Base Contract Code Lookup","description":"Fast, low-cost Base data for autonomous agents. No API keys, no subscriptions; pay per call with USDC over x402.","url":"https://api.mach.gallery/api/base/contract-code?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Wallet or account address on Base mainnet."}}},"responseSchema":{"type":"json","example":{"address":"0x4200000000000000000000000000000000000006","network":"eip155:8453","is_contract":true,"bytecode_bytes":1000}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_80tSC7D7sZbnA0UTbqs7D","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","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 contract status for a given EVM address on the Base network","exampleAgentPrompt":"Can you check if the address 0x4200000000000000000000000000000000000006 on Base is a deployed smart contract, and if so, how big is its bytecode?","exampleUseCases":[{"title":"Verify contract deployment before interaction","prompt":"Before I call this contract, can you confirm that 0xAbCd1234AbCd1234AbCd1234AbCd1234AbCd1234 is actually a deployed smart contract on Base and not just a wallet address?"},{"title":"Audit contract bytecode size","prompt":"I need to know the bytecode size of the contract at 0x4200000000000000000000000000000000000006 on Base — can you pull that for me?"},{"title":"Security check on unknown address","prompt":"Someone sent me this Base address 0xDeAdBeEfDeAdBeEfDeAdBeEfDeAdBeEfDeAdBeEf — can you tell me if it's a contract and fetch its bytecode so I can inspect it?"}],"resultDescription":"Returns a JSON object with the queried address, the network identifier (eip155:8453 for Base mainnet), a boolean indicating whether the address is a deployed smart contract, and the size of the contract bytecode in bytes.","failureModes":["Invalid address format (not a 40-hex-character 0x address) returns a validation error","Address is a valid EOA (externally owned account) — returns is_contract: false with zero bytecode","Network unavailability or Base RPC issues may cause timeouts","Payment failure via x402 if insufficient USDC balance"],"whenToPreferThis":"Use this endpoint when you need lightweight, pay-per-call contract existence and bytecode-size checks on Base without managing API keys or subscriptions. Prefer it over full node RPC calls or heavier blockchain indexers when you only need contract status and bytecode metadata rather than decoded ABI, events, or full source code.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T04:34:00.471Z","isFirstParty":false,"canonicalSlug":"mach-gallery-base-contract-code-lookup-c4c48953"}