Metadata-Version: 2.4
Name: llama-index-readers-wellmarked
Version: 0.1.0
Summary: Official LlamaIndex reader for the WellMarked API — load any URL as clean Markdown.
Project-URL: Homepage, https://wellmarked.io
Project-URL: Documentation, https://wellmarked.io/docs
Project-URL: Source, https://github.com/WellMarkedAPI/llama-index-readers-wellmarked
Project-URL: Issues, https://github.com/WellMarkedAPI/llama-index-readers-wellmarked/issues
Author-email: WellMarked <support@wellmarked.io>
License: MIT
License-File: LICENSE
Keywords: llama-index,llm,markdown,rag,reader,scraping,wellmarked
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: llama-index-core<0.15,>=0.12
Requires-Dist: wellmarked<2.0,>=1.1
Provides-Extra: dev
Requires-Dist: pytest>=7; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Description-Content-Type: text/markdown

# llama-index-readers-wellmarked

The official [LlamaIndex](https://www.llamaindex.ai/) reader for **[WellMarked](https://wellmarked.io)** — load any URL as clean Markdown `Document`s.

```bash
pip install llama-index-readers-wellmarked
```

## Quick start

Set your API key (get one at [wellmarked.io](https://wellmarked.io)):

```bash
export WELLMARKED_API_KEY="wm_..."
```

Load a single page:

```python
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):

```python
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:

```python
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 `Document`s.

## Related

- [`wellmarked`](https://pypi.org/project/wellmarked/) — the underlying Python SDK (this package wraps it)
- [WellMarked API docs](https://wellmarked.io/docs)
- [`langchain-wellmarked`](https://github.com/WellMarkedAPI/langchain-wellmarked) — the LangChain equivalent
