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:
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.
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.
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.
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.
The examples below also require llama-index-llms-openai, llama-index-embeddings-openai, and an OPENAI_API_KEY environment variable.
1. Index live pages
2. Give an agent web access
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.
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.
Research agents
Let an agent search Google, open the most relevant results and write a summary with sources, all in one agent.run().
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.
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.
S
Skaler.app
Easy to get things done
Decodo provides great service with a simple setup and friendly support team.
R
RoiDynamic
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.
C
Cybereg
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.
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
