# Webacy Smart Contract Source Code Fetcher

> Webacy Smart Contract Source Code Fetcher is a paid API for AI agents from api.webacy.com, paid per call via x402, $0.5/call, status unknown (last checked 2026-10-31).

Fetches verified source code for a smart contract from the chain-appropriate block explorer, returning null if unverified or unavailable.

## Facts

- Endpoint: GET https://api.webacy.com/source-code/:contractAddress?utm_source=zero.xyz
- Price: $0.5/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/webacy-smart-contract-source-code-fetcher-2fed1ecc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_lfUyRjQmzogWZ2GDNOUt0

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 webacy-smart-contract-source-code-fetcher-2fed1ecc
```

Example prompt: Can you pull the verified source code for the smart contract at 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 on Ethereum (eth)?

## When to prefer this

Use this endpoint when you need to retrieve the raw, verified Solidity (or other language) source code for a specific smart contract on an EVM-compatible chain. Prefer this over generic block explorer scraping because it normalizes the response across multiple chains and integrates with Webacy's broader risk analysis ecosystem. Best suited when verifying whether a contract is open-source before conducting audits, security reviews, or investing.

## Known failure modes

- Returns null if the contract source is not verified on the block explorer
- Invalid or malformed contract address returns an error
- Unsupported chain identifier causes a bad request response
- Contract address not found on the specified chain
- Rate limiting or API quota exceeded
- Network/timeout errors when reaching the block explorer

## How this service works

Verified source code for a smart contract, fetched from the chain-appropriate block explorer. Returns `null` if unverified or unavailable.

## Output

Returns the verified source code of the smart contract as fetched from the relevant block explorer (e.g. Etherscan, BscScan, Polygonscan). Returns null if the contract's source code is unverified or unavailable on that chain's explorer.

## 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"
     ],
     "type": "string"
    },
    "pathParams": {
     "type": "object",
     "properties": {
      "contractAddress": {
       "type": "string",
       "description": "Contract address"
      }
     }
    },
    "queryParams": {
     "type": "object",
     "required": [
      "chain"
     ],
     "properties": {
      "chain": {
       "type": "string",
       "description": "Blockchain network, e.g. eth, bsc, pol, arb, opt, base"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/webacy-smart-contract-source-code-fetcher-2fed1ecc/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.webacy.com](https://www.zero.xyz/host/api.webacy.com/llms.txt)
