{
 "openapi": "3.1.0",
 "info": {
  "title": "Agent Exchange x402 census and directory",
  "version": "1.0.0",
  "summary": "Every listed x402 resource probed unpaid, joined with on-chain settlement facts",
  "description": "Neutral measurement of the x402 catalogs (CDP Bazaar, PayAI): which listed routes answer a valid 402 today, their 402 shape, price matches, dead listings, first/last seen, and public on-chain settlement facts per seller. Free JSON everywhere; three paid x402 routes (placement, probe, report) and one paid listing route.",
  "x-guidance": "Start with GET /search.json?q= or the MCP tool find_resources to get a resource id, then GET /r/{id}.json. Use GET /seller/{host}.json before paying any seller. Paid routes answer 402 with x402 terms to unpaid requests; pay USDC on Base and resend with X-PAYMENT or PAYMENT-SIGNATURE. Never send payment headers to the free routes.",
  "termsOfService": "https://bazaar.agentexchange.work/terms",
  "license": {
   "name": "CC BY 4.0",
   "url": "https://creativecommons.org/licenses/by/4.0/"
  }
 },
 "servers": [
  {
   "url": "https://bazaar.agentexchange.work"
  }
 ],
 "x-discovery": {
  "ownershipProofs": [],
  "llms": "https://bazaar.agentexchange.work/llms.txt",
  "mcp": "https://bazaar.agentexchange.work/mcp",
  "manifest": "https://bazaar.agentexchange.work/.well-known/x402",
  "agentCard": "https://bazaar.agentexchange.work/.well-known/agent-card.json"
 },
 "paths": {
  "/search.json": {
   "get": {
    "operationId": "search",
    "summary": "Search resources",
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "network",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "base",
        "base-sepolia",
        "solana",
        "solana-devnet",
        "polygon",
        "arbitrum",
        "xlayer",
        "polygon-amoy",
        "other",
        "unknown"
       ]
      }
     },
     {
      "name": "max_price",
      "in": "query",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "status",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "live",
        "dead",
        "any"
       ]
      }
     },
     {
      "name": "category",
      "in": "query",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "maximum": 200
      }
     }
    ],
    "security": [],
    "responses": {
     "200": {
      "description": "OK"
     }
    }
   }
  },
  "/r/{id}.json": {
   "get": {
    "operationId": "resource",
    "summary": "One resource record",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^[a-f0-9]{12}$"
      }
     }
    ],
    "security": [],
    "responses": {
     "200": {
      "description": "Record",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Resource"
        }
       }
      }
     },
     "404": {
      "$ref": "#/components/responses/Error"
     }
    }
   }
  },
  "/seller/{host}.json": {
   "get": {
    "operationId": "seller",
    "summary": "One seller record",
    "parameters": [
     {
      "name": "host",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "security": [],
    "responses": {
     "200": {
      "description": "Record"
     },
     "404": {
      "$ref": "#/components/responses/Error"
     }
    }
   }
  },
  "/bazaar.json": {
   "get": {
    "operationId": "bazaarList",
    "summary": "Compact list of every resource",
    "security": [],
    "responses": {
     "200": {
      "description": "OK"
     }
    }
   }
  },
  "/bazaar.csv": {
   "get": {
    "operationId": "bazaarCsv",
    "summary": "CSV of every resource",
    "security": [],
    "responses": {
     "200": {
      "description": "CSV",
      "content": {
       "text/csv": {}
      }
     }
    }
   }
  },
  "/findings.json": {
   "get": {
    "operationId": "findings",
    "summary": "Aggregates behind the report",
    "security": [],
    "responses": {
     "200": {
      "description": "OK"
     }
    }
   }
  },
  "/sellers-index.json": {
   "get": {
    "operationId": "sellersIndex",
    "summary": "One row per seller host",
    "security": [],
    "responses": {
     "200": {
      "description": "OK"
     }
    }
   }
  },
  "/dead.json": {
   "get": {
    "operationId": "dead",
    "summary": "Dead listings",
    "security": [],
    "responses": {
     "200": {
      "description": "OK"
     }
    }
   }
  },
  "/new.json": {
   "get": {
    "operationId": "new",
    "summary": "Catalog timestamp within 7 days",
    "security": [],
    "responses": {
     "200": {
      "description": "OK"
     }
    }
   }
  },
  "/changes.xml": {
   "get": {
    "operationId": "changesFeed",
    "summary": "Atom feed of verdict changes",
    "security": [],
    "responses": {
     "200": {
      "description": "Atom",
      "content": {
       "application/atom+xml": {}
      }
     }
    }
   }
  },
  "/featured.json": {
   "get": {
    "operationId": "featuredList",
    "summary": "Current paid placements",
    "security": [],
    "responses": {
     "200": {
      "description": "OK"
     }
    }
   }
  },
  "/live.json": {
   "get": {
    "operationId": "live",
    "summary": "Re-probe totals",
    "security": [],
    "responses": {
     "200": {
      "description": "OK"
     }
    }
   }
  },
  "/health": {
   "get": {
    "operationId": "health",
    "summary": "Health",
    "security": [],
    "responses": {
     "200": {
      "description": "OK"
     }
    }
   }
  },
  "/mcp": {
   "post": {
    "operationId": "mcp",
    "summary": "MCP JSON-RPC 2.0 (initialize, tools/list, tools/call)",
    "security": [],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "JSON-RPC response"
     }
    }
   }
  },
  "/featured": {
   "post": {
    "operationId": "feature",
    "summary": "Featured placement for 30 days (paid)",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "id"
        ],
        "properties": {
         "id": {
          "type": "string",
          "pattern": "^[a-f0-9]{12}$"
         }
        }
       }
      }
     }
    },
    "x-payment-info": {
     "price": {
      "mode": "fixed",
      "currency": "USD",
      "amount": "1.000000"
     },
     "protocols": [
      {
       "x402": {
        "network": "eip155:8453",
        "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
        "payTo": "0xc91cE6291eDC0713ec753BAFBA002506ffb2b95c",
        "facilitator": "https://facilitator.payai.network"
       }
      }
     ]
    },
    "responses": {
     "200": {
      "description": "Paid result",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "example": {
          "featured": true,
          "id": "3f9a1c2b7d4e",
          "url": "https://api.example.com/v1/tool",
          "expires_at": "2026-10-31T00:00:00.000Z",
          "payer": "0x…",
          "payer_is_payto": true,
          "page": "https://bazaar.agentexchange.work/r/3f9a1c2b7d4e"
         }
        }
       }
      }
     },
     "402": {
      "description": "Payment required: x402 requirements in the JSON body (v1) and base64 in the PAYMENT-REQUIRED header (v2)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Challenge"
        }
       }
      }
     },
     "404": {
      "$ref": "#/components/responses/Error"
     }
    }
   }
  },
  "/r/{id}/probe.json": {
   "get": {
    "operationId": "probeNow",
    "summary": "Re-probe one resource now (paid)",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^[a-f0-9]{12}$"
      }
     }
    ],
    "x-payment-info": {
     "price": {
      "mode": "fixed",
      "currency": "USD",
      "amount": "0.010000"
     },
     "protocols": [
      {
       "x402": {
        "network": "eip155:8453",
        "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
        "payTo": "0xc91cE6291eDC0713ec753BAFBA002506ffb2b95c",
        "facilitator": "https://facilitator.payai.network"
       }
      }
     ]
    },
    "responses": {
     "200": {
      "description": "Paid result",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "example": {
          "id": "3f9a1c2b7d4e",
          "url": "https://api.example.com/v1/tool",
          "probe": {
           "at": "2026-10-01T00:00:00.000Z",
           "head_status": 405,
           "get_status": 402,
           "status": "live",
           "valid_402": true,
           "accepts0": {
            "scheme": "exact",
            "network": "eip155:8453",
            "amount": "10000",
            "payTo": "0x…",
            "asset": "0x8335…"
           },
           "price_matches_catalog": true,
           "latency_ms": 412
          },
          "changed": false,
          "census_status": "live"
         }
        }
       }
      }
     },
     "402": {
      "description": "Payment required: x402 requirements in the JSON body (v1) and base64 in the PAYMENT-REQUIRED header (v2)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Challenge"
        }
       }
      }
     },
     "404": {
      "$ref": "#/components/responses/Error"
     }
    }
   }
  },
  "/seller/{host}/report.json": {
   "get": {
    "operationId": "sellerReport",
    "summary": "Full seller report re-probed now (paid)",
    "parameters": [
     {
      "name": "host",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "x-payment-info": {
     "price": {
      "mode": "fixed",
      "currency": "USD",
      "amount": "0.050000"
     },
     "protocols": [
      {
       "x402": {
        "network": "eip155:8453",
        "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
        "payTo": "0xc91cE6291eDC0713ec753BAFBA002506ffb2b95c",
        "facilitator": "https://facilitator.payai.network"
       }
      }
     ]
    },
    "responses": {
     "200": {
      "description": "Paid result",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "example": {
          "host": "api.example.com",
          "verdict": "live",
          "resources": 12,
          "reprobed": 12,
          "live_now": 11,
          "onchain": {
           "payers": 84,
           "payments": 1210,
           "usd": 12.1
          },
          "files": {
           "manifest": true,
           "agent_card": false,
           "llms": true,
           "openapi": true
          }
         }
        }
       }
      }
     },
     "402": {
      "description": "Payment required: x402 requirements in the JSON body (v1) and base64 in the PAYMENT-REQUIRED header (v2)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Challenge"
        }
       }
      }
     },
     "404": {
      "$ref": "#/components/responses/Error"
     }
    }
   }
  },
  "/listings": {
   "post": {
    "operationId": "listResource",
    "summary": "List a resource we have not found (paid, 30 days)",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "url",
         "name"
        ],
        "properties": {
         "url": {
          "type": "string"
         },
         "name": {
          "type": "string",
          "maxLength": 80
         },
         "description": {
          "type": "string",
          "maxLength": 200
         },
         "payTo": {
          "type": "string"
         }
        }
       }
      }
     }
    },
    "x-payment-info": {
     "price": {
      "mode": "fixed",
      "currency": "USD",
      "amount": "1.000000"
     },
     "protocols": [
      {
       "x402": {
        "network": "eip155:8453",
        "payTo": "0xc91cE6291eDC0713ec753BAFBA002506ffb2b95c"
       }
      }
     ]
    },
    "responses": {
     "201": {
      "description": "Listed"
     },
     "402": {
      "description": "x402 terms"
     }
    }
   }
  },
  "/listings.json": {
   "get": {
    "operationId": "listings",
    "summary": "Current paid listings",
    "security": [],
    "responses": {
     "200": {
      "description": "OK"
     }
    }
   }
  }
 },
 "components": {
  "responses": {
   "Error": {
    "description": "Error envelope",
    "content": {
     "application/json": {
      "schema": {
       "$ref": "#/components/schemas/Error"
      }
     }
    }
   }
  },
  "schemas": {
   "Error": {
    "type": "object",
    "required": [
     "error",
     "code",
     "message"
    ],
    "properties": {
     "error": {
      "type": "string",
      "description": "snake_case code"
     },
     "code": {
      "type": "integer"
     },
     "message": {
      "type": "string"
     },
     "hint": {
      "type": "string"
     },
     "docs": {
      "type": "string"
     },
     "request_id": {
      "type": "string"
     }
    }
   },
   "Challenge": {
    "type": "object",
    "properties": {
     "x402Version": {
      "type": "integer"
     },
     "error": {
      "type": "string"
     },
     "accepts": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "scheme": {
         "type": "string"
        },
        "network": {
         "type": "string"
        },
        "maxAmountRequired": {
         "type": "string"
        },
        "amount": {
         "type": "string"
        },
        "asset": {
         "type": "string"
        },
        "payTo": {
         "type": "string"
        },
        "resource": {
         "type": "string"
        },
        "maxTimeoutSeconds": {
         "type": "integer"
        }
       }
      }
     }
    }
   },
   "Resource": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string"
     },
     "url": {
      "type": "string"
     },
     "host": {
      "type": "string"
     },
     "method": {
      "type": "string"
     },
     "price_usd": {
      "type": [
       "number",
       "null"
      ]
     },
     "price_atomic": {
      "type": [
       "string",
       "null"
      ]
     },
     "network": {
      "type": [
       "string",
       "null"
      ]
     },
     "payTo": {
      "type": [
       "string",
       "null"
      ]
     },
     "catalog_names": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "first_seen_catalog": {
      "type": [
       "string",
       "null"
      ]
     },
     "last_updated_catalog": {
      "type": [
       "string",
       "null"
      ]
     },
     "probe": {
      "type": [
       "object",
       "null"
      ]
     },
     "onchain": {
      "type": "object"
     },
     "status": {
      "type": "string"
     },
     "valid_402": {
      "type": "boolean"
     },
     "dead": {
      "type": "boolean"
     },
     "live_reprobe": {
      "type": [
       "object",
       "null"
      ]
     }
    }
   }
  }
 }
}