x402-scraper
Lightweight httpx client for x402 Markdown Scraper. It wraps all five featured SKUs and settles x402 v2 Exact USDC on Base (eip155:8453). On HTTP 402 the x402 SDK builds the EIP-3009 transfer authorization, sets PAYMENT-SIGNATURE, and retries.
Install
pip install x402-scraper
Python 3.12 or 3.13 is recommended for EVM signing wheels.
Usage
import asyncio
import os
from x402_scraper import ScraperClient
os.environ["EVM_PRIVATE_KEY"] = "0x..." # Base wallet that holds USDC
async def main() -> None:
async with ScraperClient() as client:
page = await client.scrape("https://example.com") # $0.01
brief = await client.summary("https://example.com") # $0.02
meta = await client.extract_metadata("https://example.com") # $0.01
pdf = await client.parse_pdf("https://example.com/paper.pdf") # $0.05
site = await client.deep_crawl("https://example.com", max_depth=2) # $0.15
print(page["sku"], brief["summary"], meta["word_count"], pdf["page_count"], site["page_count"])
asyncio.run(main())
Without EVM_PRIVATE_KEY, unpaid calls raise ScraperError with status_code=402 so you can inspect PAYMENT-REQUIRED yourself.
SKUs
| Method | Path | Price |
|---|---|---|
| GET/POST | /v1/scrape |
$0.01 USDC |
| GET/POST | /v1/summary |
$0.02 USDC |
| GET/POST | /v1/extract-metadata |
$0.01 USDC |
| GET/POST | /v1/parse-pdf |
$0.05 USDC |
| GET/POST | /v1/deep-crawl |
$0.15 USDC |
Network: eip155:8453. Asset: Base USDC. Scheme: exact.
Metadata
Release files for x402-scraper 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| x402_scraper-0.5.0.tar.gz | 3.8 kB | Without provenance | Details for x402_scraper-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| x402_scraper-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for x402_scraper-0.5.0-py3-none-any.whl |
Total release size: 7.7 kB
Release files / x402_scraper-0.5.0.tar.gz
| Download URL | x402_scraper-0.5.0.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d430f6a9b65c275764852e27e9101a2c30b411d58ae5b64a9306bed30ff3a091
|
|
BLAKE2b-256 checksum How to use checksums |
467d8eba31a4c832b688fce44b8c8c601349da1974b22f8d5c45c32e3ce8ddfb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.15.1
|
Release files / x402_scraper-0.5.0-py3-none-any.whl
| Download URL | x402_scraper-0.5.0-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
94d640850a421b8f2ec937adf0bb0ee5d2f53687659fe84ad9415bb7e39c95bb
|
|
BLAKE2b-256 checksum How to use checksums |
0947c174918573fe8f105f1a5ef3deaa627742cd508a517754daf997f5871642
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.15.1
|
Security for x402-scraper 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.