LlamaIndex Web Scraping for RAG and Agents

Decodo’s LlamaIndex web scraping integration ships as two Python packages. Readers turn live web pages and search results into Document objects ready to index. A tool spec gives your agents scraping and search they can call while they reason. JavaScript rendering, proxy rotation and CAPTCHAs happen on Decodo’s side, so your index gets the content, not the block page.

14-day money-back option

Your RAG pipeline is only as current as its data

LlamaIndex can index almost anything. The hard part is getting clean, current web content into it in the first place.

Basic requests miss page content

A basic HTTP request may return incomplete content from JavaScript-rendered pages. Index that, and your embeddings capture nothing useful.

Blocked pages look like real content

A 403 page or a CAPTCHA wall still returns text. Without a check, it ends up in your vector store next to real pages, and your retriever serves it as an answer.

Outdated answers without live data

An agent relying on outdated information may miss recent changes to pricing, releases, or documentation.

Trusted by:

RTMP.IN logo

Built for the way LlamaIndex works

The packages follow LlamaIndex conventions (BaseReader, BaseToolSpec, Document), so they fit into an existing pipeline without adapter code.

Markdown, not raw HTML

Pages are returned as Markdown rather than HTML, reducing markup clutter and making the content easier to process in RAG pipelines.

Metadata you can cite

Each Document carries url, source and status_code. Use this metadata to trace retrieved content back to its source.

Keep the batch running

Failed requests can return Documents with error metadata instead of stopping the run. Filter them before indexing, or set continue_on_error=False to raise an error.

Purple glowing exclamation mark inside a circular icon indicating an alert.

Errors agents can act on

If a search fails or returns no usable results, the tools raise a RuntimeError instead of an empty list, allowing the agent to retry or handle the failure.

A minimalist purple icon of a computer chip or CPU against a dark background.

Any LLM, any agent type

The tools work with FunctionAgent, ReActAgent and any model LlamaIndex supports. Swap OpenAI for Anthropic or a local model without changing the Decodo code.

A stylized purple icon depicting a branching or connection symbol on a dark background.

Open source, MIT-licensed

Both packages are on PyPI and GitHub. Read the source, pin a version, or fork it for your own targets.

How do I add Decodo to a LlamaIndex project?

Install the packages, set your Web Data API key, and pass auth_mode="token" to each class.

pip install llama-index-readers-decodo llama-index-tools-decodo
export DECODO_API_TOKEN=your_api_key

The examples below also require llama-index-llms-openai, llama-index-embeddings-openai, and an OPENAI_API_KEY environment variable.

1. Index live pages

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


reader = DecodoWebReader(auth_mode="token")
docs = reader.load_data([
    "https://docs.python.org/3/whatsnew/3.13.html",
])


# Skip pages that failed to scrape
docs = [
    d for d in docs
    if "error" not in d.metadata
    and d.metadata.get("status_code") == 200
]




index = VectorStoreIndex.from_documents(docs)
print(index.as_query_engine().query("What changed in Python 3.13?"))

2. Give an agent web access

import asyncio


from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI
from llama_index.tools.decodo import DecodoToolSpec


agent = FunctionAgent(
    tools=DecodoToolSpec(auth_mode="token").to_tool_list(),
    llm=OpenAI(model="gpt-5-mini"),
)


async def main():
    answer = await agent.run(
        "Search Google for the latest LlamaIndex release notes, "
        "open the most relevant page and summarize what changed."
    )
    print(answer)


asyncio.run(main())

What teams build with Decodo and LlamaIndex

Readers for knowledge that should stay in the index, tools for questions that need the web right now.

Purple glowing outline of an open book icon on a dark background.

Docs assistants that keep up

Index product docs, changelogs and API references from live URLs. Schedule data refreshes and update your index to keep answers grounded in recent documentation.

Purple magnifying glass icon on a dark background, symbolizing search or discovery.

Research agents

Let an agent search Google, open the most relevant results and write a summary with sources, all in one agent.run().

A neon purple target icon with a dart hitting the bullseye.

Competitor tracking

Load competitor pricing and feature pages into an index. Store periodic snapshots of competitor pricing and feature pages, then compare changes over time.

Product and price research

search_amazon gives an agent live listings, so questions like “what do wireless keyboards under $50 look like right now” get current answers.

SEO content gap checks

Have an agent search Google for a target keyword, read the top-ranking pages and list the subtopics they cover that your page doesn’t.

Fresher chatbots

Combine your internal index with live search results, so customer-facing assistants can handle questions about events after their last data load.

How much does the Web Data API cost?

Both packages are free and open source. Web Data API requests made by your readers and agents are billed under your existing Decodo plan, with no additional integration fee. Start on the free plan while you build, then pick a tier once you know your page volume.

10 req/s

$0

/month

Up to 5K crawls or 10K pages scraped

10 req/s

$19

/month

Up to 19K crawls or 38K pages scraped

25 req/s

$49

/month

Up to 65K crawls or 122K pages scraped

50 req/s

$99

/month

Up to 141K crawls or 330K pages scraped

100 req/s

$249

/month

Up to 383K crawls or 1.2M pages scraped

With each plan, you access:

JavaScript rendering

99.99% success rate

HTML, Markdown, XHR, plus JSON, PNG where supported

One-click AI integrations

LLM-ready Markdown format

100+ pre-built templates

Single API key for all endpoints

/scrape, /search, /map, /crawl

24/7 tech support

14-day money-back

SSL Secure Payment

Your information is protected by 256-bit SSL

What are users saying about Decodo?

We're proud to support a thriving community of 135K+ users and the industry's best.

Helping us build

Decodo lets us collect data from 10M+ ads every month without throttling, so our small team can focus on building.

Easy to get things done

Decodo provides great service with a simple setup and friendly support team.

A key to our work

Decodo enables us to develop and test applications in varied environments while supporting precise data collection for research and audience profiling.

Decodo-best-usability-award-2025-by-G2

Best Usability 2025

Awarded for the ease of use and fastest time to value for proxy and scraping solutions.

Decodo-Highest-User-Adoption-2025-award-by-G2

Best User Adoption 2025

Praised for the seamless onboarding experience and impactful engagement efforts.

Decodo-best-value-by-Proxyway-2025-award

Best Value 2025

Recognized for the 5th year in a row for top-tier proxy and scraping solutions.

Frequently asked questions

What is in the Decodo LlamaIndex integration?

Two Python packages:

  • llama-index-readers-decodo provides DecodoWebReader and DecodoSearchReader, which load web pages and search results as LlamaIndex Documents.
  • llama-index-tools-decodo provides DecodoToolSpec, which gives agents tools to scrape URLs and search Google and Amazon.

Do I need the readers, the tool spec, or both?

Use the readers when you know which pages belong in your index and want them embedded ahead of time. Use the tool spec when an agent should decide at runtime what to search for and read. Many projects use both: readers for the core knowledge base, tools for anything the index doesn’t cover.

How do I authenticate?

Copy your Web Data API key from the Decodo dashboard into the DECODO_API_TOKEN environment variable. Then pass auth_mode="token" when you create each class. Without it, the key is sent as basic auth and requests fail with Username invalid. Older plans with a basic authentication token can leave auth_mode out.

What format does the content come back in?

Markdown. DecodoWebReader returns one Document per URL, with url, source, and status_code in its metadata. DecodoSearchReader returns one Document per search, with the full results page as Markdown, metadata including the query, search engine, source URL, and status code.

What happens when a page can’t be scraped?

By default, DecodoWebReader can return failed requests as Documents with error metadata, allowing you to filter them before indexing. Set continue_on_error=False to raise an exception instead. The search reader and agent search tools raise a RuntimeError that your application or agent can handle.

Do I need my own proxies or CAPTCHA handling?

No. Decodo renders JavaScript, rotates IPs from a 125M+ global pool and handles CAPTCHAs and retries on its side.

Which LLMs and agent types are supported?

Any LLM LlamaIndex supports. The tool spec works with FunctionAgent and ReActAgent; the docs and repo include examples of both. The packages require Python 3.10 or newer.

What does it cost?

The packages are free and MIT-licensed. Requests are billed as standard Web Data API usage. A free plan is available, so you can test before upgrading.

Bring Live Web Data Into LlamaIndex

Two Python packages and one API key. Your next query engine answers from today’s pages, not last month’s snapshot.

14-day money-back option

© 2018-2026 decodo.com (formerly smartproxy.com). All Rights Reserved