74trust / 100

Scrape Batch

by Agent Utility Suite in Search & web

x402 APIPassing, checked 14 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
Price
$0.008
per call in USDC
Uptime
97.6%
last 30 days
Response time
242 ms
630 ms slowest 5%
Last check
Passed
14 h ago, next any minute now

Run a free test callHow to call it

Reliability

All checks passedSome failedAll failedNot checked

Status and outage history · Atom feed · Watch with other listings

How to call it

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

Each call costs $0.008 in USDC on Base, paid with the request over x402.

Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.

Example request

From the listing.

POST https://x402-agent-api.onrender.com/api/v1/scrape-batch
content-type: application/json

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

Parameters

ParameterTypeRequiredDescription
include_linksbooleanNoAlso return each page's links as a list (url, text, internal). Default false. Default: false.
max_chars_per_pageintegerNoReturn at most this many characters of each page (1,000-50,000, default 20,000). Read the rest of a long page with scrape_markdown and its next_offset. Default: 20000.
modestringNomain (default): each page's article or main content only. full: whole pages, including navigation and footers. One of: main, full. Default: "main".
strip_link_urlsbooleanNoWrite links as plain text in the Markdown (keeps the text, drops the URLs) to save tokens. Default false. Default: false.
urlsarray of string (uri)Yes2-5 different public http(s) URLs to read, e.g. ["https://example.com/pricing", "https://example.com/docs"]. Results come back in the same order.
viastringNoOptional: the tool whose next_calls suggested this call (filled in for you).

Example response

The provider's example. We can't check it without paying.

Example response, 53 lines
{
  "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
}

Call it from code

The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.008.

curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://x402-agent-api.onrender.com/api/v1/scrape-batch' \
  -H 'content-type: application/json' \
  --data-raw '{"max_chars_per_page":20000,"urls":["https://example.com/","https://example.org/missing"]}'

# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - -X POST 'https://x402-agent-api.onrender.com/api/v1/scrape-batch' \
  -H 'content-type: application/json' \
  --data-raw '{"max_chars_per_page":20000,"urls":["https://example.com/","https://example.org/missing"]}' \
  | grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decode
JavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

// Pays at most $0.008 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.008" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.008 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fx402-agent-api.onrender.com%2Fapi%2Fv1%2Fscrape-batch&method=POST
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(res.status, await res.text());
Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

# Pays at most $0.008 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.008"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))

with x402_requests(client) as session:
    res = session.post(
        "https://x402-agent-api.onrender.com/api/v1/scrape-batch",
        json={
            "max_chars_per_page": 20000,
            "urls": [
                "https://example.com/",
                "https://example.org/missing",
            ],
        },
    )
    print(res.status_code, res.text)

Security scan

No findings

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

Recent checks

WhenResultHTTPTimePrice
14 h agoPassed402374 ms$0.008
30 h agoPassed402632 ms$0.008
47 h agoExpected HTTP 402, got 503503200 ms-
3 days agoTimed out---
5 days agoPassed402348 ms$0.008
Show 10 older checks
6 days agoPassed402220 ms$0.008
7 days agoPassed402227 ms$0.008
7 days agoPassed402255 ms$0.008
8 days agoPassed402218 ms$0.008
9 days agoPassed402246 ms$0.008
9 days agoPassed402249 ms$0.008
10 days agoPassed402248 ms$0.008
10 days agoPassed402267 ms$0.008
11 days agoPassed402254 ms$0.008
11 days agoPassed402256 ms$0.008