Skip to main content

llama-index-readers-decodo

LlamaIndex data readers that pull web pages and search results from the Decodo web scraping API and return them as Document objects ready for indexing or RAG pipelines.

Decodo handles JavaScript rendering, anti-bot measures, CAPTCHA, and proxy rotation transparently.

Installation

pip install llama-index-readers-decodo

Authentication

Obtain your API token from the Decodo dashboard.

export DECODO_API_TOKEN="your-token-here"

Auth modes

auth_mode Header scheme Endpoint
"basic" (default) Authorization: Basic <base64(token:)> POST /v2/scrape
"token" Authorization: Bearer <token> POST /unified/v1/scrape

A Unified API key (a plain hex string) only works with auth_mode="token"; with the default "basic" mode it is rejected with a 401. Both readers request markdown output, so Document.text is markdown rather than raw HTML.

DecodoWebReader

Load one or more URLs as LlamaIndex Document objects.

from llama_index.readers.decodo import DecodoWebReader

reader = DecodoWebReader()  # reads DECODO_API_TOKEN from env

docs = reader.load_data([
    "https://news.ycombinator.com",
    "https://example.com",
])

for doc in docs:
    print(doc.metadata["url"], doc.text[:200])

Each Document has metadata with keys url, status_code, and source.

Error handling

By default (continue_on_error=True), failed URLs produce a Document with error metadata rather than raising an exception:

docs = reader.load_data(
    ["https://good-url.com", "https://bad-url.com"],
    continue_on_error=True,   # default
)
# One Document per URL; failed ones have "error" in metadata

docs = reader.load_data(["https://bad-url.com"], continue_on_error=False)
# Raises RuntimeError on first failure

DecodoSearchReader

Run a query against Google, Amazon, or Reddit and return results as Document objects.

from llama_index.readers.decodo import DecodoSearchReader

reader = DecodoSearchReader()

# Google search
docs = reader.load_data("open source LLMs", engine="google", num_results=10)

# Amazon product search
docs = reader.load_data("mechanical keyboards", engine="amazon", num_results=5)

# Reddit search
docs = reader.load_data("best async Python", engine="reddit", num_results=5)

for doc in docs:
    print(doc.metadata["engine"], doc.metadata["url"])
    print(doc.text[:300])

Each Document has metadata: query, engine, target, url, status_code, and source.

load_data raises RuntimeError on an HTTP error, and also when Decodo returns no results or only failed ones (for example status 613), rather than returning an empty list. The Reddit engine uses Google Search with a site:reddit.com filter, so it can occasionally fail this way; retrying usually succeeds.

Auth mode examples

# Basic mode (default)
reader = DecodoWebReader(api_token="your-token", auth_mode="basic")

# Token mode
reader = DecodoWebReader(api_token="your-token", auth_mode="token")

# Custom timeout
reader = DecodoWebReader(api_token="your-token", timeout=300.0)

# Same options for DecodoSearchReader
search_reader = DecodoSearchReader(api_token="your-token", auth_mode="token")

Use in a RAG pipeline

from llama_index.core import VectorStoreIndex
from llama_index.readers.decodo import DecodoWebReader

reader = DecodoWebReader()
docs = reader.load_data(["https://docs.example.com/guide"])
index = VectorStoreIndex.from_documents(docs)
query_engine = index.as_query_engine()
response = query_engine.query("How do I get started?")
print(response)

License

MIT

Metadata

Release files for llama-index-readers-decodo 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llama-index-readers-decodo 0.1.2
File Size Uploaded
llama_index_readers_decodo-0.1.2.tar.gz 8.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for llama-index-readers-decodo 0.1.2
File Interpreter ABI Platform
llama_index_readers_decodo-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 15.9 kB

Release files / llama_index_readers_decodo-0.1.2.tar.gz

Download URL llama_index_readers_decodo-0.1.2.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
548f7ce173f264bac1eaec1dc60eb84d874638303ccc46729a134aebfff91090
BLAKE2b-256 checksum
How to use checksums
d27db5cab64c402fd9d4d69c78e1741f91c6333de1718a4c294ce8aeb50a3a09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.

Transparency log

Release files / llama_index_readers_decodo-0.1.2-py3-none-any.whl

Download URL llama_index_readers_decodo-0.1.2-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e674b301f9daf919f253c8f0c86fda2a099de4332b3684efb312862c9c18975f
BLAKE2b-256 checksum
How to use checksums
7a938a61c0f784fe86ac919ab94635c12d324f5658473e85db178b80da184870
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

This release

0.1.2 This release

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page