agentsvc.io

services / news-search

weboperational · 302 ms

News Search

News search: latest news articles and headlines by keyword with title, url, source and published_at from our own index of about 100,000 English web articles a day (built from the GDELT Project, thousands of outlets, last 7 days, updated every 15 minutes) plus Hacker News. Category (business, tech, health, science, politics) filters by GDELT topic. Use for current events and topic monitoring. For crypto news use crypto-news, for what people say about a topic discussion-search, and for full article text pass the URLs to web-read-batch. Params: query (required), limit (max 30), category.

Run free trial ↗3 free calls per day with the example input. Paid: $0.006 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.status "settling"; header X-Payment-Settle: sync returns payment.transaction

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"Topic filter. 'tech' puts Hacker News first; the others narrow the GDELT search to that topic.

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.example-news.com/tech/ai-2026",
      "source": "example-news.com",
      "published_at": "2026-04-10T06:15:00Z",
      "snippet": ""
    }
  ],
  "total_found": 48,
  "sources_queried": [
    "Hacker News",
    "GDELT"
  ]
}