Tavily's extract endpoint pre-summarizes content; Scavio's /extract returns full markdown. The migration is a JSON shape map and a prompt update. This tutorial walks the swap.
Prerequisites
- Existing Tavily extract code
- Scavio API key
Walkthrough
Step 1: Identify Tavily extract calls
Usually a single endpoint call.
# Before:
# r = requests.post('https://api.tavily.com/extract', json={'urls': [url]}, headers=...)Step 2: Replace with Scavio extract
POST with x-api-key.
import os, requests
resp = requests.post('https://api.scavio.dev/api/v1/extract',
headers={'x-api-key': os.environ['SCAVIO_API_KEY']},
json={'url': url, 'format': 'markdown'}).json()
markdown = resp.get('markdown', '')Step 3: Decide on format
Tavily auto-summarizes; Scavio returns raw markdown.
# If your downstream LLM step expects clean markdown, Scavio is closer to that.
# If you want pre-summarized, add an LLM step after Scavio (cost similar).Step 4: Update downstream prompts
Different shape may need prompt tweaks.
# Tavily extract returns: { 'results': [{'url', 'raw_content', 'title'}] }
# Scavio extract returns: { 'url', 'markdown', 'title' }Step 5: Compare cost
Tavily $0.008/credit; Scavio $0.0043/credit.
# 1,000 extracts/mo: Tavily ~$8 vs Scavio ~$4.30.Python Example
# Migration time: 10-30 min per call site, mostly shape-map.JavaScript Example
// Same in TS using fetch().Expected Output
Extract calls return raw markdown ready for LLM context. Cost drops ~46% versus Tavily's per-credit price.