81trust / 100

Scrape Batch

by Agent Utility Suite in Search & web

x402 APIPassing, checked 2 h ago

Read 2-5 public URLs as clean Markdown in one call: articles, docs, pricing pages, PDFs, feeds. Per page: main content, tables, code, author and dates, optional links; failures reported per URL so one bad page does not spoil the batch. Not charged when no page can be read. One payment instead of five. No account or API key. $0.008 USDC per call.

POST https://x402-agent-api.onrender.com/api/v1/scrape-batch

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
243 ms typical, 243 ms slowest 5%
Last check
2 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://x402-agent-api.onrender.com/api/v1/scrape-batch" \
  -H "content-type: application/json" \
  -d '{"max_chars_per_page":20000,"urls":["https://example.com/","https://example.org/missing"]}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fx402-agent-api.onrender.com%2Fapi%2Fv1%2Fscrape-batch
const res = await pay("https://x402-agent-api.onrender.com/api/v1/scrape-batch", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"max_chars_per_page":20000,"urls":["https://example.com/","https://example.org/missing"]}),
});
console.log(await res.json());

Example input

{
  "max_chars_per_page": 20000,
  "urls": [
    "https://example.com/",
    "https://example.org/missing"
  ]
}

Example output

{
  "failed": 1,
  "next_calls": [
    {
      "arguments": {
        "domain": "example.com"
      },
      "price": "$0.004",
      "tool": "domain_enrich",
      "why": "Who runs this site's email, and which SaaS does its domain use?"
    }
  ],
  "results": [
    {
      "char_count": 149,
      "content_type": "text/html",
      "final_url": "https://example.com/",
      "markdown": "This domain is for use in documentation examples without needing permission. Avoid use in operations.\n\n[Learn more](https://iana.org/domains/example)",
      "metadata": {
        "author": null,
        "canonical_url": null,
        "description": null,
        "image": null,
        "language": "en",
        "modified_time": null,
        "pages": null,
        "published_time": null,
        "site_name": null,
        "type": null
      },
      "next_offset": null,
      "offset": 0,
      "ok": true,
      "source": "html",
      "status": 200,
      "title": "Example Domain",
      "token_estimate": 38,
      "total_chars": 149,
      "truncated": false,
      "url": "https://example.com/",
      "word_count": 17
    },
    {
      "error": {
        "code": "UPSTREAM_FAILED",
        "message": "The page returned HTTP 404."
      },
      "ok": false,
      "url": "https://example.org/missing"
    }
  ],
  "succeeded": 1
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
2 h agoPassed402246 ms$0.008
5 h agoPassed402243 ms$0.008
10 h agoPassed402201 ms$0.008