# Mach Gallery Base Logs Fetch

> Mach Gallery Base Logs Fetch is a paid API for AI agents from api.mach.gallery, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-02).

Fetches event logs emitted by a smart contract address on the Base blockchain within a specified block range and filtered by topics

## Facts

- Endpoint: POST https://api.mach.gallery/api/base/logs?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/mach-gallery-base-logs-fetch-28d2260a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_uSCMqcKOWAPcYCe0S1QO4

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 mach-gallery-base-logs-fetch-28d2260a -d '<json body>'
```

Example prompt: Pull all event logs for Base contract address 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 from block 15000000 to 15001000, filtering by the Transfer topic 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.

## When to prefer this

Choose this endpoint when you need raw EVM event logs from the Base blockchain without setting up API keys or subscriptions — ideal for autonomous agents that want pay-per-call access to Base log data. Prefer it over node providers like Alchemy or Infura when you need zero-setup, USDC micropayment-based access and are already operating in an x402-compatible payment environment.

## Known failure modes

- Invalid EVM address format returns a validation error
- Block range too large may return empty or truncated results
- No matching logs returns an empty array with count 0
- Insufficient USDC payment via x402 results in a 402 Payment Required response
- Invalid topic hash format causes request rejection
- from_block greater than to_block may return an error or empty result

## How this service works

Fast, low-cost Base data for autonomous agents. No API keys, no subscriptions; pay per call with USDC over x402.

## Output

Returns a JSON object containing an array of matching event logs, the count of results, and the network identifier (eip155:8453 for Base mainnet). Each log typically includes contract address, topics, data, block number, and transaction hash.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "topics": {
   "type": "array",
   "items": {
    "type": [
     "string",
     "null"
    ],
    "description": "Ethereum log topic or null wildcard."
   },
   "maxItems": 4
  },
  "address": {
   "type": "string",
   "pattern": "^0x[0-9a-fA-F]{40}$",
   "description": "Smart-contract address on Base mainnet."
  },
  "to_block": {
   "type": "integer",
   "minimum": 0,
   "description": "Last Base block to include in the log query."
  },
  "from_block": {
   "type": "integer",
   "minimum": 0,
   "description": "First Base block to include in the log query."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "logs": [],
  "count": 1,
  "network": "eip155:8453"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/mach-gallery-base-logs-fetch-28d2260a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.mach.gallery](https://www.zero.xyz/host/api.mach.gallery/llms.txt)
