How to give your AI agent web search with x402 (no API key)
Every x402serps endpoint is a normal JSON POST. Send it without payment and you get HTTP 402 back with payment requirements (price, network, payTo). An x402 client signs a USDC payment, puts it in the X-PAYMENT header and retries. There are no API keys. 1. Look at the 402 curl -i -X POST https://x4

Every x402serps endpoint is a normal JSON POST. Send it without payment and you get HTTP 402 back with payment requirements (price, network, payTo). An x402 client signs a USDC payment, puts it in the X-PAYMENT header and retries. There are no API keys.
curl -i -X POST https://x402serps.com/api/v1/search \ -H "content-type: application/json" -d '{"q":"x402 protocol","num":5}' Enter fullscreen mode Exit fullscreen mode The payment-required header lists both Base ( eip155:8453 ) and Solana USDC options, each for 4000 units ($0.004).
curl -X POST https://x402serps.com/api/v1/search -H "content-type: application/json" \ -H "X-Trial: 1" -d '{"q":"x402"}' Enter fullscreen mode Exit fullscreen mode You get 25 trial calls, rate-limited to 10 a minute.
import { wrapFetchWithPayment } from " x402-fetch "; import { privateKeyToAccount } from " viem/accounts "; const account = privateKeyToAccount ( process. env. AGENT_KEY ); // a low-balance agent wallet const pay = wrapFetchWithPayment ( fetch, account ); const r = await pay ( " https://x402serps.com/api/v1/search ", { method: " POST ", headers: { " content-type ": " application/json " }, body: JSON. stringify ({ q: " best MCP servers 2026 ", num: 10, freshness: " week " }), }); const { results } = await r. json (); console. log ( results. map ( x => ` ${ x. position }. ${ x. title } ${ x. url } ` ). join ( " \n " )); Enter fullscreen mode Exit fullscreen mode Use a dedicated wallet with a small balance and a spending cap.
Add the remote server https://x402serps.com/api/mcp (streamable HTTP; MCP Registry name com.x402serps/search ). Tools include web_search, news_search, extract, places_search and deep_research.
Buy prepaid credits by card at /pricing and send Authorization: Bearer xs_....
Search is $0.004 per 10 results and extract is $0.003 per URL. For comparison, Exa lists search from $4 per 1k requests, and Tavily lists pay-as-you-go at $0.008 per credit, with basic search costing 1 credit. Check their pages for current rates.
Docs: https://x402serps.com/docs?utm_source=devto&utm_campaign=launch