# BRAINIAC Smart Contract Read API

> BRAINIAC Smart Contract Read API is a paid API for AI agents from www.brainiac.software, paid per call via x402, $0.02/call, status unknown (last checked 2026-11-17).

Reads data from an EVM smart contract on Base by calling a contract function with optional calldata and block number.

## Facts

- Endpoint: POST https://www.brainiac.software/api/v1/chain-data/contract/read?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/brainiac-smart-contract-read-api-89fd638b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_W50vO0AgSOtxNiyelnivR

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 brainiac-smart-contract-read-api-89fd638b -d '<json body>'
```

Example prompt: Can you read the smart contract at 0x1234567890abcdef1234567890abcdef12345678 on Base using calldata 0xabcdef and tell me what it returns at block 12345678?

## When to prefer this

Use this endpoint when you need to query on-chain state from a smart contract on Base without setting up your own RPC node or Web3 provider. It is ideal for AI agents that need pay-per-call access to blockchain data with no account setup, using x402 micropayments. Prefer this over self-hosted solutions when you want zero-infrastructure contract reads at $0.02 per call.

## Known failure modes

- Invalid contract address (not a valid 0x hex address) returns an error
- Malformed calldata (not valid hex) is rejected by input validation
- Block number exceeds current chain head or is invalid returns an error
- Contract does not exist at the given address returns empty or revert data
- Network congestion or RPC errors may cause timeout
- Payment not received or insufficient USDC causes 402 response

## How this service works

Pay-per-call APIs for AI agents: OFAC sanctions screening, compliance checks, token security, and Base chain data via x402. No account. Fixed USDC price. MCP-ready.

## Output

Returns a JSON response containing the raw result data from the smart contract read call, typically the ABI-encoded return value of the contract function that was called. The agent can decode this output according to the expected return type (address, uint256, bytes, etc.).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "data": {
   "type": "string",
   "pattern": "^0x[0-9a-fA-F]*$"
  },
  "address": {
   "type": "string",
   "pattern": "^0x[0-9a-fA-F]{40}$"
  },
  "blockNumber": {
   "type": "integer",
   "maximum": 9007199254740991,
   "minimum": 0
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": "0x12345678",
  "result": "0x",
  "source": {
   "url": "https://mainnet.base.org",
   "status": "OK"
  },
  "address": "0x1234567890123456789012345678901234567890",
  "chainId": 8453,
  "retrievedAt": "2026-11-07T12:08:59.324Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/brainiac-smart-contract-read-api-89fd638b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.brainiac.software](https://www.zero.xyz/host/www.brainiac.software/llms.txt)
