# Ethereum eth_getCode – Contract Bytecode Lookup

> Ethereum eth_getCode – Contract Bytecode Lookup is a paid API for AI agents from ari001.tailb4ac3a.ts.net, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-14).

Returns the deployed bytecode of a smart contract at a given Ethereum mainnet address via eth_getCode RPC call.

## Facts

- Endpoint: GET https://ari001.tailb4ac3a.ts.net/v1/ventures/ethereum_rpc_api/eth_getcode?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/ethereum-eth-getcode-contract-bytecode-lookup-821032dd
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_lucEivKIN41Ol6u5A3iUm

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability ethereum-eth-getcode-contract-bytecode-lookup-821032dd
```

Example prompt: Can you fetch the deployed bytecode for the Ethereum contract at 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 on mainnet?

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

Returns the bytecode of a contract at a given address on Ethereum mainnet via eth_getCode RPC call. Query: address (0x + 40 hex).

## Output

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.

## Request schema (JSON Schema)

```json
{
 "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"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ethereum-eth-getcode-contract-bytecode-lookup-821032dd/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from ari001.tailb4ac3a.ts.net](https://www.zero.xyz/host/ari001.tailb4ac3a.ts.net/llms.txt)
