ScavioScavio
ProductPricingDocs
Sign InGet Started
  1. Home
  2. Tutorials
  3. How to Replace Serper with Scavio in a CrewAI SDR Agent
Tutorial

How to Replace Serper with Scavio in a CrewAI SDR Agent

Migrate a CrewAI SDR agent from Serper to Scavio. Same Google Dorks pattern, plus Reddit signal and extract endpoint at one credit pool.

Get Free API KeyAPI Docs

An r/crewai post documented an SDR agent using Google Dorks on Serper plus pdfplumber plus Llama-3 plus an MCP cache. This tutorial swaps Serper for Scavio and shows the same pattern with a typed JSON cache.

Prerequisites

  • Python 3.10+
  • CrewAI
  • Scavio API key

Walkthrough

Step 1: Define the Scavio CrewAI Tool

Subclass CrewAI's BaseTool.

Python
from crewai.tools import BaseTool
import requests, os

class ScavioSearch(BaseTool):
    name = 'scavio_search'
    description = 'Multi-platform web search returning typed JSON. Use search_type="dorks" for Google Dorks.'

    def _run(self, query: str):
        return requests.post('https://api.scavio.dev/api/v1/search',
            headers={'x-api-key': os.environ['SCAVIO_API_KEY']},
            json={'query': query}).json()

Step 2: Define the Google Dorks query pattern

Same dork strings as the original.

Python
DORK_PATTERNS = [
    'site:gov.br filetype:pdf 2026 contratos',
    'site:gob.mx filetype:pdf 2026 licitaciones'
]

Step 3: Crontab driver

Same cron, swap the API.

Bash
# crontab -e
# 0 6 * * * /usr/bin/python /path/to/dorks.py

Step 4: Cache layer in SQLite (typed JSON now)

Cache key = (query, surface). Value = JSON string.

Python
import sqlite3, json
conn = sqlite3.connect('cache.db')
conn.execute('CREATE TABLE IF NOT EXISTS cache(key TEXT PRIMARY KEY, payload TEXT, ts REAL)')

def cached_search(q):
    row = conn.execute('SELECT payload FROM cache WHERE key=?', (q,)).fetchone()
    if row: return json.loads(row[0])
    data = ScavioSearch()._run(q)
    conn.execute('INSERT OR REPLACE INTO cache VALUES (?, ?, ?)', (q, json.dumps(data), 0))
    conn.commit()
    return data

Step 5: Plug into CrewAI agent

Same agent shape, Scavio tool replaces Serper tool.

Python
from crewai import Agent
researcher = Agent(role='Government Bid Researcher', tools=[ScavioSearch()])

Python Example

Python
# See steps above for full pattern.

JavaScript Example

JavaScript
// CrewAI is Python-first; equivalent Mastra/JS pattern uses Scavio HTTP directly.

Expected Output

JSON
SDR agent fetches government bid PDFs the same as before, now with Reddit thread surfacing as a second source layer at no additional vendor.

Related Tutorials

  • How to Build a Google Dorks + LLM Extraction Pipeline
  • How to Cache Search Results in SQLite for AI Agents

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+. CrewAI. Scavio API key. 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

Use Case

CrewAI Search Tool

Read more
Best Of

Best Search API for CrewAI Agents in 2026

Read more
Solution

Add Unified Search to Multi-Agent Systems with Scavio

Read more
Use Case

Pi Coding Agent Web Search Integration

Read more
Best Of

Best Search API for CrewAI in 2026

Read more
Solution

One Search Tool for Any AI Agent Framework

Read more

Start Building

Migrate a CrewAI SDR agent from Serper to Scavio. Same Google Dorks pattern, plus Reddit signal and extract endpoint at one credit pool.

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