x402serps logox402serps

x402 search API

x402serps implements the x402 payment protocol on every endpoint. Call without payment and you get HTTP 402 with the requirements; sign a USDC payment and retry. $0.004 per search.

x402serps
Protocolx402 v2 (PAYMENT-SIGNATURE header), v1 fallback (X-PAYMENT)
NetworksBase and Solana (USDC)
SettlementCoinbase CDP facilitator
Search price$0.004
Other endpointsnews, images, places, shopping, scholar, videos, extract, research, crawl and more
Without cryptoCard credits via Stripe, used as Authorization: Bearer xs_...

Example with @x402/fetch

import { wrapFetchWithPayment } from "@x402/fetch";
// configure an EVM (Base) or SVM (Solana) signer per the @x402 docs
const pay = wrapFetchWithPayment(fetch, client);
const r = await pay("https://x402serps.com/api/v1/search", {
  method: "POST", headers: { "content-type": "application/json" },
  body: JSON.stringify({ q: "x402 protocol" }) });
console.log(await r.json());

How it works

x402 turns HTTP 402 Payment Required into a working payment flow. When you call /api/v1/search without payment, the response lists what is accepted: scheme exact, network eip155:8453 (Base) or solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp (Solana), the USDC asset, an amount of 4000 (0.004 USDC with 6 decimals) and the payTo address.

Your client signs a payment for one of those options and sends it in the PAYMENT-SIGNATURE header (x402 v2) or X-PAYMENT (v1) on the same request. The facilitator verifies and settles it, and the response carries your results.

Because the price is in the 402 itself, agents can discover and pay for the API without docs, and the endpoints are listed in x402 discovery indexes.

Request and response: /api/v1/search

POST /api/v1/search costs $0.004 per call. Send the parameters as a JSON body.

curl -X POST https://x402serps.com/api/v1/search \
  -H "content-type: application/json" \
  -H "X-Trial: 1" \
  -d '{"q":"x402 protocol","num":10,"gl":"us"}'

Example response (values shortened; field names are exactly what the API returns):

{
  "query": "x402 protocol",
  "provider": "primary",
  "results": [
    {
      "position": 1,
      "title": "x402",
      "url": "https://x402.org/",
      "snippet": "x402 is an open payment standard that lets clients pay for APIs and content over HTTP..."
    },
    {
      "position": 2,
      "title": "coinbase/x402: A payments protocol for the internet",
      "url": "https://github.com/coinbase/x402",
      "snippet": "x402 is a chain-agnostic protocol built around the HTTP 402 Payment Required status code..."
    }
  ]
}

Request and response: /api/v1/news

POST /api/v1/news costs $0.004 per call. Send the parameters as a JSON body.

curl -X POST https://x402serps.com/api/v1/news \
  -H "content-type: application/json" \
  -H "X-Trial: 1" \
  -d '{"q":"stablecoin regulation","freshness":"week","num":10}'

Example response (values shortened; field names are exactly what the API returns):

{
  "query": "stablecoin regulation",
  "provider": "primary",
  "results": [
    {
      "position": 1,
      "title": "Regulators publish new stablecoin guidance",
      "url": "https://example-news.com/stablecoins",
      "snippet": "Officials set out reserve and disclosure rules for dollar-backed tokens...",
      "source": "Example News",
      "date": "2 days ago"
    }
  ]
}

Use cases

  • Agent marketplaces. List a search tool that charges per call with no key management.
  • Wallet-funded agents. Let an agent spend from its own USDC balance.
  • Micro-billing. Charge end users per query by passing costs straight through.
  • Testing x402 clients. Use a real, cheap paid endpoint to test your integration.

Paying for calls

Every call is priced on its own. With x402, an unpaid request returns HTTP 402 with the exact amount, asset and recipient for USDC on Base or Solana; your client signs a payment and repeats the same request, and results come back once the payment settles. No account or API key is involved. If you would rather pay by card, buy a credit pack on the pricing page and send Authorization: Bearer xs_.... Cached repeat queries cost half for credit keys, and failed calls are not charged. Paid calls have no per-minute rate limit.

FAQ

Which x402 versions are supported?

x402 v2 is the default. v1 clients can send X402-Version: 1 to get a v1-format challenge. Multi-unit requests need v2 or a credit key.

What happens if payment fails?

You get another 402 with an error code such as invalid_exact_evm_insufficient_balance. The help page lists every code and its fix.

Which chains and tokens are accepted?

USDC on Base mainnet and Solana mainnet, using the x402 exact scheme. Testnets are not accepted.

Is there a free trial?

Yes. Send the header X-Trial: 1 on search, news, single-URL extract and the vertical endpoints. Trial calls are limited per network and to 10 a minute.

Where do the results come from?

Results are fetched live from a third-party search provider and normalised into a small, stable JSON shape. If the primary provider fails, calls fail over to a backup where one is configured.

Try it free

Add the header X-Trial: 1 for free trial calls (limited per network and to 10 a minute). Paid calls (x402 or a credit key) have no per-minute rate limit.

curl -i -X POST https://x402serps.com/api/v1/search -H "content-type: application/json" -d '{"q":"x402"}'   # returns 402 + requirements

Pricing · Docs · MCP · Integrations · Help

Related