Guides

x402 Payments 101

x402 is a payment protocol that enables per-request billing. Instead of prepaying credits, you pay for each scrape as it happens.

How it works

Step 1

You make a scrape request

Send your URL to /scrape like normal.

Step 2

We return 402 with pricing

Response includes the cost and payment URL.

Step 3

Your client pays

x402 SDK handles the payment flow automatically.

Step 4

Re-send with proof

Same request, now with X-402-Payment header.

The full flow

1. Initial request

Requestbash

2. 402 Response with pricing

Response (402 Payment Required)json

3. Pay and retry with proof

Request with paymentbash

4. Success response

Responsejson

Using our SDKs

Our SDKs handle the x402 flow automatically. You just make requests and the payment happens transparently.

Node.js SDKjavascript