Skip to main content
decodo-crewai is the Python package that gives CrewAI agents live web data. It adds four tools to a crew: one that scrapes any public URL as Markdown, and three that return parsed JSON from search engines, Google AI Mode, and ecommerce stores. All four run on the Web Data API.
View the crewAI repository for the source code, examples, and latest releases.

Features

  • Web scraping – fetch any public page and hand the agent clean Markdown
  • Search – Google web results or Amazon product listings, parsed
  • SERP – Google, Bing, and Google AI Mode results with paging
  • Ecommerce – product details or search results from Amazon, Walmart, and Target
  • CrewAI integration – standard BaseTool classes that drop into any agent, crew, or flow
  • Failures the agent can act on – a failed request comes back as a CrewAI ToolFailure, not an exception

Requirements

Installation

This pulls in crewai 1.15.9 or newer and the Python SDK (decodo-sdk) 2.5.0 or newer.

Authentication

Copy your API key from your Web Data API subscription in the Web Data API playground and store it in the DECODO_API_KEY environment variable. Every tool reads it from there:
You can also pass it to a tool directly:
These tools take an API key only. The basic authentication token from older plans (a base64-encoded username:password) isn’t supported, even though the Python SDK accepts one.
A tool raises ValueError as soon as you create it if no key is found, so a missing key fails at startup rather than on the crew’s first web request.

Quick start

A one-agent crew that searches the web and reads the pages it finds. CrewAI calls its own LLM, so you also need a key for that – it defaults to OpenAI’s gpt-4.1-mini:
To use another model, set MODEL, for example MODEL=gpt-4.1. Other providers need their CrewAI extra and key, for example pip install "crewai[anthropic]" with ANTHROPIC_API_KEY and MODEL=anthropic/<model>.

Available tools

You can also call a tool directly, without an agent:
Every tool takes api_key when you create it, defaulting to DECODO_API_KEY. The arguments below that are the ones the agent fills in on each call.

DecodoWebScraperTool

It returns the page as a Markdown string. When a page is truncated, the tool adds a last line that gives the kept and the full character counts, so the agent knows it didn’t get the whole page. Lower max_chars when an agent reads several pages in one task:

DecodoSearchTool

DecodoSERPTool

Bing results are rendered in a headless browser and can take over a minute.

DecodoEcommerceTool

Pass either product_id or query, not both. Target pages are rendered in a headless browser and can take close to a minute.
The three JSON tools return the full parsed response, with no truncation. An Amazon search comes back as roughly 117,000 characters, which is enough to crowd a small context window and show up on your LLM bill. Give those tools to an agent whose task needs the whole result set, and keep broad research on DecodoSearchTool with source="google".

Errors

When a request fails – an invalid API key, a rate limit, a page that returns 404, or a network error that never reaches Decodo – the tools return a CrewAI ToolFailure instead of raising. The agent sees what went wrong and can retry or change course, and CrewAI records the failure according to the agent’s tool_failure_policy. Each failure carries a code, and the ones worth retrying are marked retryable:

Example crew

The repository has a research crew: a researcher that searches Google and picks five sources, an analyst that reads each one with the scraper, and a writer that turns the notes into a cited Markdown report. Point it at any topic and it prints the report and saves it to report.md. For the full list of API parameters behind these tools, see Parameters.
  • LangChain (Python) – Decodo tools and a document loader for LangChain.
  • LlamaIndex – Decodo readers and agent tools for LlamaIndex.
  • Python SDK – Typed access to every Decodo target from Python.
  • MCP Server – Connect AI agents and MCP-compatible tools to Decodo.
  • GitHub repository – View the source code, examples, and latest releases.

Support

Need help or just want to say hello? Our support is available 24/7.
You can also reach us anytime via email at support@decodo.com.

Feedback

Can’t find what you’re looking for? Request an article!
Have feedback? Share your thoughts on how we can improve.