Bazaar (Discovery Layer)

The x402 Bazaar is the discovery layer for the x402 ecosystem - a machine-readable catalog that helps developers and AI agents find and integrate with x402-compatible API endpoints. Think of it as a search index for payable APIs, enabling the autonomous discovery and consumption of services.

The x402 Bazaar is in early development. While our vision is to build the "Google for agentic endpoints," we're currently more like "Yahoo search" - functional but evolving. Features and APIs may change as we gather feedback and expand capabilities.

Overview

The Bazaar solves a critical problem in the x402 ecosystem: discoverability. Without it, x402-compatible endpoints are like hidden stalls in a vast market. The Bazaar provides:

  • For Buyers (API Consumers): Programmatically discover available x402-enabled services, understand their capabilities, pricing, and schemas

  • For Sellers (API Providers): Automatic visibility for your x402-enabled services to a global audience of developers and AI agents

  • For AI Agents: Dynamic service discovery without pre-baked integrations - query, find, pay, and use

How It Works

The Bazaar currently provides a simple /list endpoint that returns all x402-compatible services registered with the CDP facilitator. Services are automatically opted-in when they use the CDP facilitator, making discovery frictionless for sellers.

Note: While a discovery layer is live today for the CDP Facilitator, the spec for the marketplace items is open and part of the x402 scheme, meaning any facilitator can create their own discovery layer.

Basic Flow

  1. Discovery: Clients query the /list endpoint to find available services

  2. Selection: Choose a service based on price, capabilities, and requirements

  3. Execution: Use x402 to pay for and access the selected service

  4. No Manual Setup: No API keys, no account creation, just discover and pay

API Reference

List Endpoint

Retrieve all available x402-compatible endpoints:

Note: the recommended way to use this endpoint is to use the useFacilitator hook as described below.

Response Schema

Each endpoint in the list contains the following fields:

Quickstart for Buyers

See the full example here for Python and Node.js.

Step 1: Discover Available Services

Fetch the list of available x402 services using the facilitator client:

Typescript:

Python:

Step 2: Call a Discovered Service

Once you've found a suitable service, use an x402 client to call it:

Typescript:

Python:

Quickstart for Sellers

Automatic Listing with Discoverable Flag

If your API uses the latest version of the CDP facilitator for x402 payments, it's ingested in the bazaar if you make the discoverable flag true in the input schema (see below).

Adding Metadata

To enhance your listing with descriptions and schemas, include them when setting up your x402 middleware. You should include descriptions for each parameter to make it clear for the agent to call your endpoints:

Typescript:

Python

Coming Soon

The x402 Bazaar is rapidly evolving, and your feedback helps us prioritize features.

Support

FAQ

Q: How do I get my service listed? A: If you're using the CDP facilitator, your service is listed once you include the discoverable flag

Q: How can I make endpoint calls more accurate? Include descriptions clearly stating what each parameter does and how to call your endpoint, but do so as succinctly as possible.

Q: How does pricing work? A: Listing is free. Services set their own prices per API call, paid via x402.

Q: What networks are supported? A: Currently Base (mainnet) with USDC payments.

Q: Can I list non-x402 services? A: No, only x402-compatible endpoints can be listed. See our seller quickstart to make your API x402-compatible.

Last updated