Discover and query x402-enabled API endpoints indexed on the Coinbase CDP Bazaar. Returns structured JSON with endpoint metadata, schemas, pricing and payment info. Useful when an agent needs to find APIs that accept USDC micropayments on Base mainnet.
Parameters
categorystringdefi · ai · social · web · data · storage · messaging
qstringSearch by name, description or domain
max_pricefloatMax price in USDC per call (e.g. 0.05)
limitintMax results, default 50, max 200
offsetintPagination offset
qualityboolFilter junk endpoints, default true
Code Example
import { X402Client } from"@x402terminal/x402-js";
const client = new X402Client({ privateKey: process.env.WALLET_KEY });
// Find DeFi APIs under $0.05const { data } = await client.call(
"https://terminalx402.xyz/api/v1/discover",
{ query: { category: "defi", max_price: "0.05" } }
);
// Use the first resultconst api = data.endpoints[0];
const result = await client.call(api.resource);
x402 Payment Flow
1 · GET /api/v1/discover → 402 Payment Required
2 · Sign EIP-3009 TransferWithAuthorization — $0.001 USDC
3 · Retry with X-Payment header
4 · 200 OK — structured endpoint JSON