LlamaIndex Readers: x402 CleanWeb Data Reader
Official LlamaIndex integration for CleanWeb Studio (x402-cleanweb-agent).
This loader ingests web pages at scale, stripping boilerplate HTML, navigation scripts, and advertisements to achieve an 87% reduction in token consumption while protecting RAG pipelines against indirect prompt injection.
🌟 Key Features
- 87% Token Compression: Reduces 25,000-token HTML pages to ~3,000 clean Markdown tokens.
- Indirect Prompt Injection Defense: Strips hidden CSS containers (
display:none,font-size:0), zero-width steganography, and malicious tracking pixels. - Multimodal Alt-Text Preservation: Keeps descriptive image captions and charts (
) for multimodal models while dropping 1x1 tracking beacons. - Zero-Overhead SPA Hydration: Ingests pre-rendered state from Next.js (
__NEXT_DATA__), Nuxt.js (__NUXT_DATA__), and Schema.org JSON-LD in sub-milliseconds without heavy headless browsers. - Verifiable Provenance: Attaches canonical URL, title, reading time, and SHA-256 content fingerprints directly into LlamaIndex
Document.metadata. - Autonomous Web3 x402 Settlement: Native machine-to-machine USDC micropayments on Base, Polygon, Arbitrum, and Solana with a zero-auth sandbox trial.
🚀 Installation
pip install llama-index-readers-x402-cleanweb
💻 Quickstart Usage
from llama_index.readers.x402_cleanweb import X402CleanWebReader
from llama_index.core import VectorStoreIndex
# 1. Initialize reader (optionally pass pre-funded Vault Session Key)
reader = X402CleanWebReader(vault_key="your_vault_session_key")
# 2. Ingest clean web documents
documents = reader.load_data(
urls=[
"https://en.wikipedia.org/wiki/Artificial_intelligence",
"https://news.ycombinator.com/"
],
preserve_alt_text=True,
dynamic_render=False
)
# 3. Build Vector Index directly
index = VectorStoreIndex.from_documents(documents)
query_engine = index.as_query_engine()
response = query_engine.query("What are the key discussions?")
print(response)
📄 License
MIT License.
Metadata
Release files for llama-index-readers-x402-cleanweb 0.1.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 |
|---|---|---|---|---|
| llama_index_readers_x402_cleanweb-0.1.0.tar.gz | 4.8 kB | Without provenance | Details for llama_index_readers_x402_cleanweb-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| llama_index_readers_x402_cleanweb-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for llama_index_readers_x402_cleanweb-0.1.0-py3-none-any.whl |
Total release size: 9.9 kB
Release files / llama_index_readers_x402_cleanweb-0.1.0.tar.gz
| Download URL | llama_index_readers_x402_cleanweb-0.1.0.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1706e6e91ef33cd1876865d60d68b2a8e6b4444acc736c0d1c234894250a331e
|
|
BLAKE2b-256 checksum How to use checksums |
dc4ae594d1875d53bbc079776479949539184061cbd2e4680a97e919a63ab9e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / llama_index_readers_x402_cleanweb-0.1.0-py3-none-any.whl
| Download URL | llama_index_readers_x402_cleanweb-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e212a2a019f96b4416b7c2a6e43f50d620775ac79f31f523850ecf9f53e12390
|
|
BLAKE2b-256 checksum How to use checksums |
de6a85fe24d6f304e159b40c2a4dcfb300b0daae96f57add520efeb5782bd655
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Security for llama-index-readers-x402-cleanweb 0.1.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.