Tutorial

How to Migrate from Tavily to Scavio in LangChain

Tavily PAYG at $0.008/credit; Scavio at $0.0043. Walk-through to swap Tavily for Scavio in a LangChain agent without breaking the chain.

An r/Agent_AI thread asked for Tavily alternatives. For LangChain agents, the migration is typically 10 minutes. This walks the swap, the pricing math, and where to keep Tavily anyway.

Prerequisites

  • Existing LangChain agent using Tavily
  • Scavio API key
  • langchain-scavio installed (pip install langchain-scavio)

Walkthrough

Step 1: Replace the Tavily import with Scavio

One-line swap.

Python
# Before
from langchain_tavily import TavilySearchResults
tool = TavilySearchResults(max_results=5)

# After
from langchain_scavio import ScavioSearchTool
tool = ScavioSearchTool(max_results=5)

Step 2: Set the env var

x-api-key header lives in SCAVIO_API_KEY.

Bash
export SCAVIO_API_KEY=sk_live_xxx
# Tavily was TAVILY_API_KEY

Step 3: Wire the tool into your agent

Same shape as the Tavily wiring.

Python
from langchain.agents import create_react_agent
agent = create_react_agent(llm, [tool], prompt)

Step 4: Confirm response shape

Scavio returns organic_results[i].link/.snippet/.title.

Python
results = tool.invoke({'query': 'best ai agent frameworks 2026'})
for r in results:
    print(r['title'], r['link'])

Step 5: Cost-check the migration

PAYG: Tavily $0.008/credit; Scavio $0.0043 on $30 tier or $0.005 PAYG.

Text
# 5,000 calls/mo:
# Tavily PAYG: $40
# Scavio Project tier: $30 flat (7K credits, 2K headroom)

Python Example

Python
from langchain_scavio import ScavioSearchTool
tool = ScavioSearchTool(max_results=5, include_ai_overview=True)
result = tool.invoke({'query': 'tavily alternatives 2026'})

JavaScript Example

JavaScript
// JS-side: use fetch directly to https://api.scavio.dev/api/v1/search
const res = await fetch('https://api.scavio.dev/api/v1/search', {
  method: 'POST',
  headers: { 'x-api-key': process.env.SCAVIO_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({ query: 'tavily alternatives 2026' })
}).then(r => r.json());

Expected Output

JSON
Same agent loop, lower per-call cost, plus access to reddit_search/youtube_search from the same key. Keep Tavily if the agent specifically needs Tavily's pre-summarized output shape.

Related Tutorials

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.

Existing LangChain agent using Tavily. Scavio API key. langchain-scavio installed (pip install langchain-scavio). A Scavio API key gives you 500 free credits per month.

Yes. The free tier includes 500 credits per month, 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 LangChain, but you can adapt to your framework of choice.

Start Building

Tavily PAYG at $0.008/credit; Scavio at $0.0043. Walk-through to swap Tavily for Scavio in a LangChain agent without breaking the chain.