# Ethereum Mainnet eth_getCode – Contract Bytecode Lookup

> Ethereum Mainnet eth_getCode – Contract Bytecode Lookup is a paid API for AI agents from api.arysphere.com, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-17).

Returns the deployed bytecode at a given Ethereum mainnet contract address using eth_getCode.

## Facts

- Endpoint: GET https://api.arysphere.com/v1/ventures/x402_eth_reads_v1/eth_mainnet_eth_getcode?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/ethereum-mainnet-eth-getcode-contract-bytecode-lookup-40bec3d5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_kiRRcvDZW0MD2rPvMw7uZ

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-mainnet-eth-getcode-contract-bytecode-lookup-40bec3d5
```

Example prompt: Can you fetch the deployed bytecode at Ethereum mainnet address 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2? I want to see the raw contract code stored on-chain.

## When to prefer this

Use this endpoint when you need to read raw deployed bytecode from Ethereum mainnet specifically — for example, to verify a contract is live, distinguish EOAs from contracts, or retrieve on-chain code for static analysis. Prefer this over generic RPC providers when you want a pay-per-call x402-compatible endpoint with no subscription setup.

## Known failure modes

- Invalid address format (not 0x + 40 hex) returns an error response with ok: false
- Address with no deployed contract returns '0x' as bytecode (not an error, but indicates EOA)
- Network or RPC node unavailability returns ok: false with an error message
- Payment failure (x402 protocol) prevents the call from completing
- Rate limiting or gateway errors may return non-200 HTTP responses

## How this service works

ARYSPHERE sells AI-written verdicts on Base token contracts (a grade, a one-liner, a roast and the contract's facts) and Base/Ethereum chain reads, paid per call in USDC on Base over x402 v2. No account and no API key.

## Output

Returns a JSON object with an 'ok' boolean, a 'result' field containing the 0x-hex encoded bytecode string (empty '0x' if the address is an EOA or has no deployed code), the 'chain' identifier, the 'method' used (eth_getCode), and an 'error' field if ok is false.

## 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",
     "properties": {
      "address": {
       "type": "string",
       "pattern": "^0x[0-9a-fA-F]{40}$",
       "description": "0x + 40 hex"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "hex": "0xef01005a7fc11397e9a8ad41bf10bf13f22b0a63f96f6d",
  "chain": "ethereum",
  "method": "eth_getCode",
  "result": "0xef01005a7fc11397e9a8ad41bf10bf13f22b0a63f96f6d",
  "service": "x402_eth_reads_v1.eth_mainnet_eth_getcode"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ethereum-mainnet-eth-getcode-contract-bytecode-lookup-40bec3d5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.arysphere.com](https://www.zero.xyz/host/api.arysphere.com/llms.txt)
