What is Bazaar?
Bazaar is the discovery layer for x402. It answers: "What can I buy here, and how much does it cost?" Agents browse a structured catalog of services, prices, and input/output schemas at /.well-known/x402.json.
How it works
Publish /.well-known/x402.json:
{
"x402Version": 2,
"name": "Your Service",
"description": "What your service does",
"network": "base",
"facilitator": "coinbase",
"payTo": "0xYourWallet",
"services": [
{
"method": "POST",
"path": "/api/generate",
"description": "Generate content",
"amount": "100000",
"discoverable": true,
"outputSchema": {
"input": {
"type": "http",
"method": "POST",
"bodyFields": {
"prompt": { "type": "string", "required": true }
}
},
"output": {
"result": { "type": "string" }
}
}
}
],
"freeEndpoints": [
{ "method": "GET", "path": "/api/status", "description": "Health check (free)" }
]
}
Key fields
- name: Your service's display name in the catalog
- facilitator: Payment processor —
"coinbase"for mainnet - payTo: Wallet address that receives payments
- discoverable: Set
trueon services you want agents to find - outputSchema: Describes request/response format so agents know how to call your API
- freeEndpoints: Listed so agents know what they can access without paying
402 header extensions
For full Bazaar support, also include extensions.bazaar in your 402 response header:
{
"x402Version": 2,
"accepts": [...],
"extensions": {
"bazaar": { "discoverable": true }
}
}
Spec maturity
Part of x402 v2. Bazaar discovery is defined within the x402 specification.
Learn more
- x402.org — x402 protocol spec (includes Bazaar)