Multi-search (batch)

$0.08 per call · USDC via x402 · POST /api/multi-search

Run 2-5 web searches in one call with a 20% volume discount vs. individual searches. Send POST /api/multi-search with the required field queries and pay $0.08 per call over x402 or MPP (there is no free tier). It returns a JSON object with searches and totalResults.

Each query returns ranked results (title, URL, snippet). Ideal for multi-faceted research or comparing sources on different aspects of a topic.

Category: Web & documents · Tags: search batch multi-search research parallel

TRY IN PLAYGROUND →

Parameters

NameTypeRequiredDescription
queriesarray of stringyesArray of 2-5 search queries (each max 400 chars)
countnumbernoResults per query, 1-10 (default 5)
freshnessstringnoOptional: pd, pw, pm, or py (past day/week/month/year)

Example request

curl -i -X POST https://agent402.tools/api/multi-search \
  -H "Content-Type: application/json" \
  -d '{"queries":["x402 payment protocol","USDC micropayments"]}'

Without payment this returns HTTP 402 Payment Required with the exact price for multi-search; any x402 v2 or MPP client pays it and retries.

Example response

{
  "searches": [
    {
      "query": "x402 payment protocol",
      "count": 2,
      "results": [
        {
          "title": "x402.org",
          "url": "https://www.x402.org/",
          "description": "An open standard…",
          "age": null
        }
      ]
    },
    {
      "query": "USDC micropayments",
      "count": 2,
      "results": [
        {
          "title": "Circle USDC",
          "url": "https://www.circle.com/usdc",
          "description": "Digital dollar…",
          "age": null
        }
      ]
    }
  ],
  "totalResults": 4
}
FieldTypeAlways presentIn the example
searchesarray of objectsyes2 items in the example
totalResultsnumberyes4

From an MCP client

catalog.call {
  "slug": "multi-search",
  "params": {
    "queries": [
      "x402 payment protocol",
      "USDC micropayments"
    ]
  }
}

The hosted connector at https://agent402.tools/mcp needs a payment for multi-search; the stdio package pays it from a wallet or from AGENT402_CREDITS_KEY. Local install: npx -y agent402-mcp.

Errors and behavior

Paid call (JavaScript agent)

import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
client.setSpendControls?.(false); // keep your own spending ceiling in code
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agent402.tools/api/multi-search", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "queries": [
      "x402 payment protocol",
      "USDC micropayments"
    ]
  }),
});

Related tools

Web answer

$0.08 · GET /api/answer

AI-generated answer to a natural-language question, grounded in live web search results with source citations. Returns c…

LLM grounding context

$0.02 · POST /api/llm-context

Web search that returns READY-TO-USE grounding text, not links: for one query you get the passages an independent search…

Web search

$0.01 · GET /api/search

Live web search: ranked results[] of {title, url, description (the snippet, plain text), age, publishedAt (ISO)} from an…

Image search

$0.02 · GET /api/search-images

Live image search: ranked image results (title, source page, image URL, thumbnail URL, dimensions) from an independent s…

News search

$0.01 · GET /api/search-news

Live news search: ranked recent articles as results[] of {title, url, description (the snippet, plain text), age, publis…

Video search

$0.02 · GET /api/search-videos

Live video search: ranked video results (title, video page URL, description, duration, creator, publisher, thumbnail, ag…