x402hub API
Search the x402 registry programmatically. Pay per call in USDC, no account or key.
x402hub is not just a website. The same registry powers a live x402-payable API, so your agent can
find payable services on the fly and pay $0.002 USDC per query. It dogfoods the protocol it indexes.
Endpoint
GET https://api-service-sandy.vercel.app/api/search?q=<query>&limit=<n>
1 · An unpaid request returns the price (HTTP 402)
curl -i "https://api-service-sandy.vercel.app/api/search?q=weather&limit=3"
HTTP/1.1 402 Payment Required
{
"x402Version": 1,
"accepts": [{
"scheme": "exact",
"network": "base",
"maxAmountRequired": "2000", // $0.002 USDC (6 decimals)
"asset": "USDC",
"payTo": "0x40BbeB1BEd1D4ba6f1d4C0eE0C9D93e2dA3347C6",
"resource": "https://api-service-sandy.vercel.app/api/search",
"description": "Search the x402 service registry."
}]
}
2 · Pay and retry (any x402 client does this automatically)
// npm i x402-fetch viem
import { wrapFetchWithPayment } from "x402-fetch";
import { createWalletClient, http } from "viem";
import { privateKeyToAccount } from "viem/accounts";
import { base } from "viem/chains";
const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const wallet = createWalletClient({ account, chain: base, transport: http() });
const pay = wrapFetchWithPayment(fetch, wallet);
const res = await pay("https://api-service-sandy.vercel.app/api/search?q=weather&limit=3");
console.log(await res.json()); // { query, count, results: [{ name, resource, priceUSDC, network, tags }] }
Free descriptor
A plain GET https://api-service-sandy.vercel.app/ returns a self-documenting JSON descriptor (price, payTo, example, and Bazaar discovery metadata) at no charge, so agents and crawlers can learn the service without paying.
Live on Base mainnet: payments are real USDC, verified and settled on-chain by a keyless facilitator
(no account, no fees, gas sponsored). Your agent pays, the endpoint serves, and the USDC lands at the address above.
ad slot · a crypto-native, no-tracking ad loads here in production
Query this registry programmatically. Every service here is searchable through the
x402hub API, an x402-payable endpoint your agents call and pay per request in USDC.
https://api-service-sandy.vercel.app · GET /api/search?q=... · $0.002 / call
Prefer to just support the project? Tip USDC on Base to
0x40BbeB1BEd1D4ba6f1d4C0eE0C9D93e2dA3347C6. This hub is free and ad-light.