agentsvc.io

services / search-read

weboperational · 576 ms

Search and Read

Answer a question when you have no URL yet: searches Wikipedia (source 'web') or recent news articles (source 'news') and returns the top 1 to 5 result pages already read as clean Markdown, with title, URL and snippet. Replaces one search call plus several page reads. Not a general web search engine. If links and a short summary are enough, web-search is cheaper. Charged only if at least one page was read. Params: query (required), source ('web' default or 'news'), count (1 to 5, default 3), max_chars per page (500 to 20000, default 4000).

Run free trial ↗1 free call per day with the example input. Paid: $0.005 USDC, no limit.

Call it

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

const client = new x402Client();
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agentsvc.io/api/v1/proxy/search-read", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({"query":"x402 payment protocol","count":2,"max_chars":3000}),
});
const { data, payment } = await res.json();  // payment.status "settling"; header X-Payment-Settle: sync returns payment.transaction

Input

FieldTypeDescription
query *string
sourceweb | news = "web"
countinteger = 3
max_charsinteger = 4000

Output

FieldTypeDescription
querystring
sourcestring
summaryobject
ok_countinteger
resultsarray
fetched_atstring

Example response (data)

{
  "query": "x402 payment protocol",
  "source": "web",
  "summary": {
    "heading": "The Graph",
    "abstract": "The Graph is an open-source, decentralized protocol that powers the indexing and querying of blockchain data. It enables developers to build scalable web3 de…",
    "answer": null
  },
  "ok_count": 1,
  "results": [
    {
      "rank": 1,
      "title": "The Graph - Wikipedia",
      "url": "https://en.wikipedia.org/wiki/The_Graph",
      "snippet": " a platform designed to manage payments and policies for autonomous AI agents. It's built on Coinbase’s x402 protocol and Google’s agent-to-agent (A2A)",
      "ok": true,
      "markdown": "[Jump to content](#bodyContent)\n\nFrom Wikipedia, the free encyclopedia\n\n![](//thumb.wikimedia.org/wikipedia/en/thumb/b/b4/Ambox_important.svg/40px-Ambox_impo…",
      "word_count": 38
    }
  ],
  "fetched_at": "2026-10-06T14:29:39.582Z"
}