X

X402labs · Scraping Scrape

by X402labs

POSTBase Sepolia

$0.01

per call · USDC on Base Sepolia

Scraping endpoint

Endpoint

POST https://test.x402labs.sh/v1/scraping/scrape

33

Calls / 30d

1

Unique payers / 30d

Aug 30

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://test.x402labs.sh/v1/scraping/scrape", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "formats": [
      "markdown"
    ],
    "onlyMainContent": true,
    "url": "https://x402labs.sh"
  }),
});
const data = await res.json();
cURL
curl -X POST \
  "https://test.x402labs.sh/v1/scraping/scrape" \
  -H "Content-Type: application/json" \
  -d '{"formats":["markdown"],"onlyMainContent":true,"url":"https://x402labs.sh"}' \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "html": "<html><body><h1>Hello</h1></body></html>",
  "markdown": "# Hello",
  "metadata": {
    "title": "Example"
  }
}

Payment details

Pay to0x3fd04211963f79be7e5356438680542aa97b089f
AssetUSDC · 0x036cbd53842c5426634e7929541ec2318f3dcf7e
NetworksBase Sepolia
Schemesexact

Is this your API?

Pin it to the top of Search & Web and the homepage with a featured placement.

Get featured →

More from X402labs & similar services