ScavioScavio
ProductPricingDocs
Sign InGet Started
  1. Home
  2. Tutorials
  3. Add Live Web and Market Data to CrewAI (Custom Tool, 2026)
Tutorial

Add Live Web and Market Data to CrewAI (Custom Tool, 2026)

CrewAI agents answer from stale training data without a search tool. Add live web + market data to CrewAI 1.15 with a BaseTool subclass. Working code.

Get Free API KeyAPI Docs

A CrewAI agent only knows what its model was trained on until you hand it a tool, so any task touching current prices, news, or social data needs a live data tool wired in. CrewAI 1.15.1 (released June 27, 2026) gives you two ways to do it: subclass BaseTool for a reusable, typed tool, or use the @tool decorator for a quick one. This tutorial builds a reusable Scavio search tool with BaseTool so any agent in your crew can pull live Google results, and shows how to extend the same pattern to Amazon, TikTok, and Reddit data on the same API key. If you would rather connect over MCP, CrewAI's MCPServerAdapter works too, noted at the end.

Prerequisites

  • Python 3.10+
  • pip install crewai==1.15.1 crewai-tools requests
  • A Scavio API key (50 free credits)

Walkthrough

Step 1: Install CrewAI and set your key

CrewAI 1.15.1 is the current release as of late June 2026. The requests library is all you need for the HTTP call.

Bash
pip install crewai==1.15.1 crewai-tools requests
export SCAVIO_API_KEY=sk_your_key_here

Step 2: Define a reusable search tool with BaseTool

Subclassing BaseTool gives the tool a typed args_schema, so CrewAI passes the model a clean parameter contract and is less likely to call it with garbage. light_request: false returns the knowledge graph and People Also Ask too (2 credits).

Python
# pip install crewai==1.15.1 crewai-tools requests
import os, requests
from crewai.tools import BaseTool
from pydantic import BaseModel, Field

class SearchInput(BaseModel):
    query: str = Field(..., description="The web search query")

class ScavioSearchTool(BaseTool):
    name: str = "web_search"
    description: str = "Search Google for live results. Use for any fact that may have changed."
    args_schema: type[BaseModel] = SearchInput

    def _run(self, query: str) -> str:
        r = requests.post("https://api.scavio.dev/api/v1/google",
            headers={"Authorization": f"Bearer {os.environ['SCAVIO_API_KEY']}",
                     "Content-Type": "application/json"},
            json={"query": query, "light_request": False})  # 2 credits: + knowledge graph, PAA
        data = r.json().get("results", [])
        return "\n".join(f"{x['title']} - {x['link']}: {x.get('snippet','')}"
                          for x in data[:5])

# Hand the tool to any agent
from crewai import Agent
researcher = Agent(role="Market Researcher", goal="Find current facts",
                   backstory="Checks the live web before answering",
                   tools=[ScavioSearchTool()])

Step 3: Give the tool to an agent and run a task

The agent now calls web_search when it needs a fact it cannot be sure of, instead of guessing from training data. That is the whole point of grounding a crew.

Python
from crewai import Agent, Task, Crew

researcher = Agent(role="Market Researcher", goal="Answer with current facts",
    backstory="Always checks the live web first", tools=[ScavioSearchTool()],
    verbose=True)

task = Task(description="What is the current price of the Stanley Quencher 40oz and who sells it cheapest?",
    expected_output="A short answer citing live sources", agent=researcher)

print(Crew(agents=[researcher], tasks=[task]).kickoff())

Step 4: Extend the same key to other platforms

Because one Scavio key spans six platforms, you add an Amazon or TikTok tool without onboarding a new vendor, and the crew bills against one pool.

Python
# One Scavio key, many tools. Add more BaseTool subclasses that POST to:
#   /api/v1/amazon/product   (ASIN in "query")
#   /api/v1/tiktok/profile   ("username")
#   /api/v1/reddit/search    ("query")
# Each is the same auth header, just a different path and body.

Python Example

Python
# pip install crewai==1.15.1 crewai-tools requests
import os, requests
from crewai.tools import BaseTool
from pydantic import BaseModel, Field

class SearchInput(BaseModel):
    query: str = Field(..., description="The web search query")

class ScavioSearchTool(BaseTool):
    name: str = "web_search"
    description: str = "Search Google for live results. Use for any fact that may have changed."
    args_schema: type[BaseModel] = SearchInput

    def _run(self, query: str) -> str:
        r = requests.post("https://api.scavio.dev/api/v1/google",
            headers={"Authorization": f"Bearer {os.environ['SCAVIO_API_KEY']}",
                     "Content-Type": "application/json"},
            json={"query": query, "light_request": False})  # 2 credits: + knowledge graph, PAA
        data = r.json().get("results", [])
        return "\n".join(f"{x['title']} - {x['link']}: {x.get('snippet','')}"
                          for x in data[:5])

# Hand the tool to any agent
from crewai import Agent
researcher = Agent(role="Market Researcher", goal="Find current facts",
                   backstory="Checks the live web before answering",
                   tools=[ScavioSearchTool()])

JavaScript Example

JavaScript
// CrewAI is Python-first. To reach the same Scavio endpoint from a JS agent:
const H = { Authorization: `Bearer ${process.env.SCAVIO_API_KEY}`, "Content-Type": "application/json" };
const res = await fetch("https://api.scavio.dev/api/v1/google", {
  method: "POST", headers: H, body: JSON.stringify({ query: "stanley quencher price", light_request: false })
}).then(r => r.json());
console.log((res.results || []).slice(0, 5));

Expected Output

JSON
# Agent reasoning (abridged):
# Thought: I need the current price, I'll search.
# Using tool: web_search("Stanley Quencher 40oz price 2026")
# Observation: 5 live results with prices and retailers
# Final Answer: As of today it lists around $35 at Walmart and Target...

Related Tutorials

  • How to Add Real-Time Search to CrewAI Agents with Scavio
  • Build an Automated SEO Blog Agent Grounded on Live SERP Data

Frequently Asked Questions

Most developers complete this tutorial in 15 to 30 minutes. You will need a Scavio API key (free tier works) and a working Python or JavaScript environment.

Python 3.10+. pip install crewai==1.15.1 crewai-tools requests. A Scavio API key (50 free credits). A Scavio API key gives you 50 free credits on signup.

Yes. The free tier includes 50 credits on signup, which is more than enough to complete this tutorial and prototype a working solution.

Scavio has a native LangChain package (langchain-scavio), an MCP server, and a plain REST API that works with any HTTP client. This tutorial uses the raw REST API, but you can adapt to your framework of choice.

Related Resources

Best Of

Best Search API for CrewAI Agents in 2026

Read more
Use Case

CrewAI Search Tool

Read more
Use Case

Ground Cursor Agent with Live Web Search

Read more
Best Of

Best AI Agent Web Search Tools in 2026

Read more
Solution

Add Unified Search to Multi-Agent Systems with Scavio

Read more
Solution

One Search Tool for Any AI Agent Framework

Read more

Start Building

CrewAI agents answer from stale training data without a search tool. Add live web + market data to CrewAI 1.15 with a BaseTool subclass. Working code.

Get Free API KeyRead the Docs
ScavioScavio

Real-time search API for AI agents. Search every platform, not just Google.

Product

  • Features
  • Pricing
  • Dashboard
  • Affiliates

Developers

  • Documentation
  • API Reference
  • Quickstart
  • MCP Integration
  • Python SDK

Alternatives

  • Tavily Alternative
  • SerpAPI Alternative
  • Firecrawl Alternative
  • Exa Alternative

Tools

  • JSON Formatter
  • cURL to Code
  • Token Counter
  • All Tools

© 2026 Scavio. All rights reserved.

Featured on TAAFT
Terms of ServicePrivacy Policy