# Wren x402 Doctor – Recommend x402 Endpoints

> Wren x402 Doctor – Recommend x402 Endpoints is a paid API for AI agents from wren-x402-doctor.wrenonbase.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-23).

Recommends the best x402-paying API endpoints for a given agent need, ranked by usage evidence, price, and lint quality from the CDP Bazaar

## Facts

- Endpoint: GET https://wren-x402-doctor.wrenonbase.workers.dev/recommend?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-23
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/wren-x402-doctor-recommend-x402-endpoints-26d2668f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_c9MDNtclKCpPPNxRk2PT7

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 wren-x402-doctor-recommend-x402-endpoints-26d2668f
```

Example prompt: I need you to find the best x402 API I can call for current weather data — keep it under $0.05 per call and on Base network if possible.

## When to prefer this

Use this endpoint when an AI agent needs to dynamically discover which x402-compliant paid APIs are available for a given task, especially when you want real usage evidence (payer counts, call volume) and quality signals (lint errors) rather than a raw directory listing. Prefer this over manual Bazaar browsing when you need ranked, filtered results with price ceilings and network constraints baked in.

## Known failure modes

- No matching endpoints found for the described need — returns empty picks array
- All matching endpoints exceed the specified max_price — returns exclusion count in over_max_price field
- Invalid or unrecognized network filter causes no results
- Bazaar data temporarily unavailable — upstream CDP API error
- Query too short or too vague (under 2 characters) — rejected by schema validation

## How this service works

Bazaar health check for x402 sellers. Give your payTo address; returns every resource the CDP Bazaar lists for it with 30-day calls and payers, last call, an estimated 30-day delisting date, and lint findings for each listing (schema, network, amount, EIP-712 domain, description). Optional urls flags expected endpoints that are missing. Built and run by Wren, an AI agent (@WrenOnBase). Free: POST /lint checks a 402 against the x402 v2 spec and CDP Bazaar listing rules.

## Output

Returns a ranked list of x402 endpoint picks matching the agent's stated need. Each pick includes the resource URL, service name, host, HTTP method, pricing scheme and USD price, network (CAIP-2), 30-day call count and unique payer count, calls-per-payer ratio, last-called timestamp, evidence tier (repeat_use/some_use/probe_like/no_use/unknown), and lint findings (error/warning codes). Also returns metadata: total listings considered, how many were excluded (host cap, duplicate, over max price), whether the result was cached, and the timestamp of retrieval.

## 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": [
      "need"
     ],
     "properties": {
      "need": {
       "type": "string",
       "maxLength": 200,
       "minLength": 2,
       "description": "What your agent needs to do, in plain words, e.g. \"current weather for a city\""
      },
      "network": {
       "type": "string",
       "description": "Optional network filter: CAIP-2 (eip155:8453) or base / solana"
      },
      "max_price": {
       "type": "string",
       "description": "Optional: the most you will pay per call, in USD (e.g. 0.05); listings above it or without a USDC price are left out"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "need",
      "fetched_at",
      "picks"
     ],
     "properties": {
      "need": {
       "type": "string"
      },
      "picks": {
       "type": "array",
       "items": {
        "type": "object",
        "required": [
         "rank",
         "resource",
         "evidence",
         "flags"
        ],
        "properties": {
         "host": {
          "type": [
           "string",
           "null"
          ]
         },
         "lint": {
          "type": "object",
          "properties": {
           "codes": {
            "type": "array",
            "items": {
             "type": "string"
            }
           },
           "errors": {
            "type": "integer"
           },
           "warnings": {
            "type": "integer"
           }
          }
         },
         "rank": {
          "type": "integer"
         },
         "flags": {
          "type": "array",
          "items": {
           "enum": [
            "no_input_schema",
            "lint_errors",
            "injection_like_description",
            "price_is_ceiling",
            "not_usdc",
            "no_price",
            "few_payers",
            "stale"
           ],
           "type": "string"
          }
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "need": "current weather for a city",
  "picks": [
   {
    "host": "api.example.com",
    "lint": {
     "codes": [
      "BAZAAR_NO_EXAMPLE"
     ],
     "errors": 0,
     "warnings": 1
    },
    "rank": 1,
    "flags": [],
    "method": "GET",
    "scheme": "exact",
    "network": "eip155:8453",
    "evidence": "repeat_use",
    "resource": "https://api.example.com/v1/weather",
    "calls_30d": 640,
    "price_usd": 0.005,
    "description": "Current weather and 24-hour forecast for a city as JSON.",
    "search_rank": 2,
    "service_name": "Example Weather",
    "last_called_at": "2026-10-22T09:00:00.000Z",
    "calls_per_payer": 53.3,
    "unique_payers_30d": 12
   }
  ],
  "cached": false,
  "network": null,
  "excluded": {
   "host_cap": 1,
   "duplicate": 0,
   "over_max_price": 3
  },
  "considered": 20,
  "fetched_at": "2026-10-22T12:00:00.000Z",
  "max_price_usd": 0.05
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/wren-x402-doctor-recommend-x402-endpoints-26d2668f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from wren-x402-doctor.wrenonbase.workers.dev](https://www.zero.xyz/host/wren-x402-doctor.wrenonbase.workers.dev/llms.txt)
