# First Dollar On-Chain Data API (ERC-8004 Agent Lookup)

> First Dollar On-Chain Data API (ERC-8004 Agent Lookup) is a paid API for AI agents from firstdollar-api.onrender.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-29).

Returns live Base chain data about an ERC-8004 agent, including sales/reads count, fetched per call via x402 micropayment.

## Facts

- Endpoint: GET https://firstdollar-api.onrender.com/agent8004?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/first-dollar-on-chain-data-api-erc-8004-agent-lookup-077dcf45
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Gexo76TC2wfOIPe8bOQ9o

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 first-dollar-on-chain-data-api-erc-8004-agent-lookup-077dcf45
```

Example prompt: Pull the live on-chain data for ERC-8004 agent ID 42 from First Dollar — I want to see how many times it's been sold on Base chain.

## When to prefer this

Use this endpoint when you need live, per-call on-chain data about a specific ERC-8004 agent on the Base blockchain — particularly sales or read counts. Prefer it over cached or indexed alternatives when freshness matters. The $0.02/call micropayment via x402 makes it suitable for low-frequency lookups rather than high-volume batch queries.

## Known failure modes

- Missing or invalid 'id' query parameter returns an error (id is required)
- Non-existent agent ID may return empty or null data if the agent hasn't been registered on-chain
- x402 payment failure (insufficient USDC balance or misconfigured payment) blocks the request
- Network or RPC latency from Base chain may cause slow or failed reads
- Onrender free-tier cold start may cause initial timeout for the hosted endpoint

## How this service works

Live Base chain reads sold per call over x402 (exact, USDC on Base, $0.02/call).

## Output

Returns live on-chain data for the specified ERC-8004 agent from the Base blockchain, including the number of times the agent has been sold or read. Data is fetched in real time at call time and paid via x402 micropayment ($0.02 USDC per call).

## 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"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "id"
     ],
     "properties": {
      "id": {
       "type": "string",
       "description": "ERC-8004 agent id (integer)"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/first-dollar-on-chain-data-api-erc-8004-agent-lookup-077dcf45/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from firstdollar-api.onrender.com](https://www.zero.xyz/host/firstdollar-api.onrender.com/llms.txt)
