Skip to main content

llama-index-readers-skim

Give your LlamaIndex pipeline the ability to read any URL — clean Markdown, ~4x smaller than raw HTML. No ads, no nav, no boilerplate.

PyPI version License: MIT

llama-index-readers-skim is the official LlamaIndex reader for Skim — the clean reader API for AI agents. It exposes one reader, SkimReader, that turns any web page into a LlamaIndex Document of agent-ready Markdown plus structured metadata. Output is ~4x smaller than raw HTML — your pipeline ingests more pages with fewer tokens.

Two ways to pay: card plan with API key (free tier: 1,000 reads/month — skim402.com/pricing) or x402 wallet pay-per-call ($0.002 USDC on Base, no account needed).

See it before you wire it: try Skim free in your browser — 10 free skims a day, no wallet, no signup. Paste a URL, see exactly what your agent gets back.


Install

pip install llama-index-readers-skim

Quickstart (60 seconds)

1. Get a free API key

Go to skim402.com/pricing, sign up for the free plan (1,000 reads/month), and copy your sk402_... key.

2. Set the env var

export SKIM_API_KEY=sk402_your_key_here

3. Use it

from llama_index.readers.skim import SkimReader

reader = SkimReader()  # reads SKIM_API_KEY from the environment

documents = reader.load_data(urls=["https://en.wikipedia.org/wiki/HTTP_402"])
print(documents[0].text)
print(documents[0].metadata)

Each Document contains the clean Markdown as text and page metadata in metadata. ~4x smaller than raw HTML.


Alternative: pay per call with a crypto wallet

If you prefer x402 wallet pay-per-call instead of a card plan:

export SKIM_WALLET_PRIVATE_KEY=0xYOUR_BASE_WALLET_PRIVATE_KEY

Fund a dedicated Base wallet with a small USDC balance. Each read costs $0.002 on Base. Full setup guide: https://skim402.com/wallet.

Use a fresh wallet, not your personal one. This wallet's private key signs payment authorizations on your machine — treat it like a hot wallet for paying $0.002 tolls, not a savings account.


Build an index from web pages

SkimReader returns standard LlamaIndex Document objects, so it drops straight into any ingestion pipeline:

from llama_index.core import VectorStoreIndex
from llama_index.readers.skim import SkimReader

reader = SkimReader()
documents = reader.load_data(
    urls=[
        "https://example.com/article-one",
        "https://example.com/article-two",
    ]
)

index = VectorStoreIndex.from_documents(documents)
query_engine = index.as_query_engine()
print(query_engine.query("What do these articles have in common?"))

Output shape

load_data returns a list of Document objects. Each Document has:

  • text — the cleaned article body in Markdown.
  • metadata — a dict with the source URL plus the page metadata Skim extracted:
{
    "source": "https://example.com/article",
    "title": "Example article",
    "byline": "Jane Doe",
    "publishedAt": "2025-01-15",
    "lang": "en",
    "excerpt": "A short summary...",
}

Empty and None metadata values are dropped. Set include_metadata=False to keep only the source URL.


Configuration

SkimReader takes the following parameters:

Parameter Default Notes
api_key $SKIM_API_KEY Card-plan API key (sk402_...). Get one free at skim402.com/pricing. Takes priority over private_key.
private_key $SKIM_WALLET_PRIVATE_KEY Wallet lane only. Hex private key for the Base wallet. Ignored when api_key is set.
base_url https://skim402.com Override the API base URL. For self-hosting or local development.
max_price_usd 0.01 Wallet lane only. Hard cap on per-call price in USD. Skim is $0.002/call.
include_metadata True Populate each Document's metadata with the page metadata Skim returns.
timeout 60 Per-request timeout in seconds.
# Card key (recommended)
reader = SkimReader(api_key="sk402_...")

# Or wallet
reader = SkimReader(
    private_key="0x...",
    max_price_usd=0.005,
    include_metadata=False,
)

Security

  • No outbound telemetry from this package. llama-index-readers-skim only talks to skim402.com (or whatever you set as base_url). No analytics, no error reporting, no phone-home.
  • Wallet lane: the private key only signs payment authorizations locally — it never leaves your machine.

Links


License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llama_index_readers_skim-0.1.4.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llama_index_readers_skim-0.1.4-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file llama_index_readers_skim-0.1.4.tar.gz.

File metadata

File hashes

Hashes for llama_index_readers_skim-0.1.4.tar.gz
Algorithm Hash digest
SHA256 80cd070a710d4db4be2807abaef1ccdcc3b96af35c5dc3fe9b27915b9600e1b5
MD5 0b1ba220ea950bb11aa0e06b51cc81c4
BLAKE2b-256 7e2f2aceb31696366e47a7d0cab0076ad3fe57b5d537433db9f986b56cf88374

See more details on using hashes here.

File details

Details for the file llama_index_readers_skim-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_readers_skim-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 71eb8197d1104fac94b9f7a3b96c66025fe984bc3b7edce350456cbef0c19253
MD5 13863dd4e0d67c474db1b6092eb47699
BLAKE2b-256 71978be09c6f617e818707e09ad1af5f015baeb91fda3516e51e01d906147207

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page