Documentation
If you can send an HTTP request, you can use PayPerScrape.
The Run Down
What is PayPerScrape? Learn about x402 scraping and the no-platform philosophy.
5-minute Quickstart
Get your first scrape running in under 5 minutes.
Scrape Endpoint Reference
Full API reference for the /api/scrape endpoint.
Quick example
typescript
import { createSigner, wrapFetchWithPayment } from "@coinbase/x402";
const signer = await createSigner("base", privateKey);
const fetchWithPayment = wrapFetchWithPayment(fetch, signer);
const response = await fetchWithPayment(
"https://payperscrape.com/api/scrape",
{
method: "POST",
body: JSON.stringify({
url: "https://example.com"
})
}
);
const body = await response.json();
// {
// "status": "success",
// "html": "<!DOCTYPE html>...",
// "metadata": {
// "domain": "example.com",
// "attempts": 1,
// "escalations": 0,
// "byte_size": 24589,
// "is_partial": false,
// "decision_reason": "ok"
// },
// "attempts": ["static:ok"]
// }