agentsvc.io

services / news-search

weboperational · 286 ms

News Search

Search recent news articles by keyword. Returns articles with title, url, source, published_at, and snippet. Sources: HackerNews Algolia (tech) + BBC RSS (general/world). Optional category filter: general/tech/business/science/health/politics. Limit max 30. Use for current events, topic monitoring, or market sentiment.

Run free trial ↗3 free calls per day with the example input. Paid: $0.003 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/news-search", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({"query":"AI agents","limit":5}),
});
const { data, payment } = await res.json();  // payment.transaction = on-chain receipt

Input

FieldTypeDescription
query *stringSearch query (e.g. 'artificial intelligence', 'climate change 2026', 'Apple earnings')
limitinteger = 10Number of articles to return (default: 10, max: 30)
categorygeneral | tech | business | science | health | politics = "general"News category filter. 'tech' searches HackerNews for developer/tech news. Others search BBC + general news feeds.

Output

FieldTypeDescription
querystringThe search query
articlesarray
total_foundintegerTotal number of matching articles found (before limit)
sources_queriedarrayNews sources that were searched

Example response (data)

{
  "query": "artificial intelligence",
  "articles": [
    {
      "title": "OpenCode – Open source AI coding agent",
      "url": "https://github.com/opencode-ai/opencode",
      "source": "Hacker News",
      "published_at": "2026-04-10T08:32:00Z",
      "snippet": "",
      "score": 1274
    },
    {
      "title": "AI breakthroughs in 2026: what's next",
      "url": "https://www.bbc.co.uk/news/technology-67890123",
      "source": "BBC News",
      "published_at": "2026-04-10T06:15:00Z",
      "snippet": "Scientists and engineers are pushing the boundaries..."
    }
  ],
  "total_found": 48,
  "sources_queried": [
    "Hacker News",
    "BBC News"
  ]
}