Skip to main content

Official LlamaIndex reader for the WellMarked API — load any URL as clean Markdown.

Project description

llama-index-readers-wellmarked

The official LlamaIndex reader for WellMarked — load any URL as clean Markdown Documents.

pip install llama-index-readers-wellmarked

Quick start

Set your API key (get one at wellmarked.io):

export WELLMARKED_API_KEY="wm_..."

Load a single page:

from llama_index.readers.wellmarked import WellMarkedReader

reader = WellMarkedReader()
docs = reader.load_data("https://example.com/article")

docs[0].text       # clean Markdown
docs[0].metadata   # {"source": ..., "title": ..., "author": ..., "retrieved_at": ...}

Or crawl a whole site BFS-style — one Document per successfully extracted page (Pro plan and above):

reader = WellMarkedReader(mode="crawl", depth=2)
docs = reader.load_data("https://docs.example.com")

docs[0].metadata["depth"]   # how far from the root URL this page sits

Drop the documents straight into an index:

from llama_index.core import VectorStoreIndex

index = VectorStoreIndex.from_documents(docs)

Options

All options are constructor arguments; load_data(url) takes only the URL.

Parameter Default Description
api_key env var WellMarked API key; falls back to WELLMARKED_API_KEY
mode "extract" "extract" (single page) or "crawl" (same-site BFS)
depth 1 Crawl depth (mode="crawl" only)
render_js False Render JS-heavy pages with a headless browser (Pro and above)
job_timeout 300.0 Seconds to wait for a crawl job; None waits forever

In crawl mode, pages that fail to extract (timeouts, robots-disallowed, no content) are skipped; only successful pages become Documents.

Related

Project details


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_wellmarked-0.1.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file llama_index_readers_wellmarked-0.1.0.tar.gz.

File metadata

File hashes

Hashes for llama_index_readers_wellmarked-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ea9739728ade4c4c113617ac06b5bb503b1b8a67d2b576a7f8b1ef69a185e7f4
MD5 8177bde48b42dc137194380436f65d10
BLAKE2b-256 60adc3aa162fe361992cde4a8013c579b583ff864053bccc07d3328e410afd9f

See more details on using hashes here.

Provenance

The following attestation bundles were made for llama_index_readers_wellmarked-0.1.0.tar.gz:

Publisher: release.yml on WellMarkedAPI/llama-index-readers-wellmarked

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file llama_index_readers_wellmarked-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_readers_wellmarked-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a13fd8b7cb05a9ad857bbbed72c6a22e6353c4f0962bae1c0ab0e868e1fa917d
MD5 b8509082ca15fc3678aca29813435ce5
BLAKE2b-256 8b9d30343d6ac4ac41f675db96dd32114695b0e1f93928251221a99f02bfa6dc

See more details on using hashes here.

Provenance

The following attestation bundles were made for llama_index_readers_wellmarked-0.1.0-py3-none-any.whl:

Publisher: release.yml on WellMarkedAPI/llama-index-readers-wellmarked

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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