Skip to main content

llama-index-tools-decodo

A LlamaIndex tool spec that wraps the Decodo web scraping API, exposing four tools for LlamaIndex agents: scrape_url, search_web, search_amazon, and search_reddit.

Decodo handles JavaScript rendering, anti-bot measures, CAPTCHA, and proxy rotation so your agent can reliably extract content from any page.

Installation

pip install llama-index-tools-decodo

Authentication

Obtain your API token from the Decodo dashboard.

Set it as an environment variable:

export DECODO_API_TOKEN="your-token-here"

Or pass it directly to the constructor.

Auth modes

auth_mode Encoding Endpoint
"basic" (default) base64("token:") POST /v2/scrape
"token" plain token POST /unified/v1/scrape

"basic" sends Authorization: Basic <token>; "token" sends Authorization: Bearer <token>. Use "basic" with a username/password token and "token" with a Unified API key (a plain hex string). A key used in the wrong mode is rejected with a 401.

All tools request markdown output.

Quick start

from llama_index.tools.decodo import DecodoToolSpec

# Uses DECODO_API_TOKEN from environment
spec = DecodoToolSpec()
tools = spec.to_tool_list()

Use with a ReAct agent:

import asyncio

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

spec = DecodoToolSpec()
tools = spec.to_tool_list()
agent = ReActAgent(tools=tools, llm=OpenAI(model="gpt-4o"))


async def main() -> None:
    response = await agent.run("Summarise the homepage of https://news.ycombinator.com")
    print(response)


asyncio.run(main())

Tool reference

scrape_url(url)

Scrape any web page and return its content as markdown.

spec = DecodoToolSpec(api_token="your-token")
content = spec.scrape_url("https://news.ycombinator.com")
print(content)

search_web(query, num_results=10)

Search Google and return a list of results, each with url, content, and status_code.

results = spec.search_web("latest AI research papers", num_results=5)
for r in results:
    print(r["url"], r["content"][:200])

search_amazon(query, num_results=10)

Search Amazon product listings.

results = spec.search_amazon("noise cancelling headphones", num_results=5)
for r in results:
    print(r["url"], r["content"][:200])

search_reddit(query, num_results=10)

Search Reddit via Google with a site:reddit.com filter.

results = spec.search_reddit("best Python async libraries", num_results=5)
for r in results:
    print(r["url"], r["content"][:200])

Errors

All tools raise RuntimeError on an HTTP error from the API. search_web, search_amazon and search_reddit also raise it when Decodo returns no results or only failed ones (for example status 613, "We were not able to scrape the target"), so an agent can retry instead of reading an empty list as "no results".

Auth mode examples

# Basic mode (default) — username/password token
spec = DecodoToolSpec(api_token="your-token", auth_mode="basic")

# Token mode — Unified API key
spec = DecodoToolSpec(api_token="your-token", auth_mode="token")

# Custom timeout (seconds)
spec = DecodoToolSpec(api_token="your-token", timeout=300.0)

License

MIT

Metadata

Release files for llama-index-tools-decodo 0.1.1

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-tools-decodo 0.1.1
File Size Uploaded
llama_index_tools_decodo-0.1.1.tar.gz 7.9 kB Details

Built distribution (wheel)

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

Total release size: 14.5 kB

Release files / llama_index_tools_decodo-0.1.1.tar.gz

Download URL llama_index_tools_decodo-0.1.1.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6daf10f2dabbe0ac1f5230c8e13a985f1041d41682e084e744eae6bacb151bc2
BLAKE2b-256 checksum
How to use checksums
2b02be81721c3f90312d3e88c0aa07bafaf09a70eb5f005e5d63bd3b23d45e33
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_tools_decodo-0.1.1-py3-none-any.whl

Download URL llama_index_tools_decodo-0.1.1-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ee5105d99fe3dc11f56e6dbf9f953c4b1096040db7633e8595e1347256ceeffa
BLAKE2b-256 checksum
How to use checksums
77181ed66bf2fc6aa1a4f4e349fa11248b9984c9a25db1e9c3711b2c87ac4327
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.2

2 release files

This release

0.1.1 This release

2 release files

0.1.0

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