Brave Search API removed its free tier in February 2026 and now charges $5/1K queries with mandatory attribution. If your project depended on zero-cost Brave search, this tutorial walks through migrating to Scavio (500 free credits/month, no attribution required) with minimal code changes.
Prerequisites
- Existing Brave Search API integration
- A Scavio API key from scavio.dev (free signup)
Walkthrough
Step 1: Compare API shapes
Brave uses GET with query params and a subscription key header. Scavio uses POST with JSON body and x-api-key header. Map your existing query parameters to the new format.
# Brave (old)
curl -H 'X-Subscription-Token: BRAVE_KEY' \
'https://api.search.brave.com/res/v1/web/search?q=python+web+framework'
# Scavio (new)
curl -X POST https://api.scavio.dev/api/v1/search \
-H 'x-api-key: SCAVIO_KEY' \
-H 'Content-Type: application/json' \
-d '{"platform": "google", "query": "python web framework"}'Step 2: Update Python code
Replace the Brave HTTP call with Scavio's POST endpoint.
import requests, os
# Old Brave code:
# resp = requests.get('https://api.search.brave.com/res/v1/web/search',
# headers={'X-Subscription-Token': os.environ['BRAVE_KEY']},
# params={'q': query})
# results = resp.json()['web']['results']
# New Scavio code:
def search(query: str) -> list:
resp = requests.post('https://api.scavio.dev/api/v1/search',
headers={'x-api-key': os.environ['SCAVIO_API_KEY'], 'Content-Type': 'application/json'},
json={'platform': 'google', 'query': query}, timeout=10)
return resp.json().get('organic', [])Step 3: Update JavaScript code
Replace the Brave fetch call with Scavio's POST endpoint.
// Old Brave code:
// const resp = await fetch(`https://api.search.brave.com/res/v1/web/search?q=${q}`, {
// headers: {'X-Subscription-Token': process.env.BRAVE_KEY}
// });
// New Scavio code:
async function search(query) {
const resp = 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({platform: 'google', query})
});
return (await resp.json()).organic || [];
}Step 4: Map response fields
Map Brave response fields to Scavio equivalents.
# Brave response field -> Scavio equivalent:
# result.title -> result['title']
# result.url -> result['link']
# result.description -> result['snippet']
# result.age -> result['date'] (if available)
# result.extra_snippets -> (not available, use snippet)
# Normalize function:
def normalize_result(r: dict) -> dict:
return {
'title': r.get('title', ''),
'url': r.get('link', ''),
'description': r.get('snippet', ''),
}Step 5: Update MCP configuration (if applicable)
If you were using Brave MCP, replace with Scavio MCP.
// In claude_desktop_config.json or .cursor/mcp.json:
// Remove Brave MCP:
// "brave-search": { "command": "npx", "args": ["@anthropic/mcp-brave-search"] }
// Add Scavio MCP:
{
"mcpServers": {
"scavio": {
"url": "https://mcp.scavio.dev/mcp",
"headers": { "x-api-key": "your_scavio_api_key" }
}
}
}Step 6: Remove attribution requirement
Brave required attribution in your project for the free credit. Scavio does not require attribution.
# Remove from your README/about page:
# 'Powered by Brave Search API' (no longer needed)
# Scavio free tier (500 credits/month) has no attribution requirement.
# You may credit Scavio if you want, but it is not required.Python Example
import requests, os
def search_scavio(query: str, platform: str = 'google') -> list:
resp = requests.post('https://api.scavio.dev/api/v1/search',
headers={'x-api-key': os.environ['SCAVIO_API_KEY'], 'Content-Type': 'application/json'},
json={'platform': platform, 'query': query}, timeout=10)
return [{'title': r['title'], 'url': r.get('link',''), 'snippet': r.get('snippet','')}
for r in resp.json().get('organic', [])]JavaScript Example
async function searchScavio(query, platform = 'google') {
const resp = 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({platform, query})
});
const data = await resp.json();
return (data.organic || []).map(r => ({title: r.title, url: r.link, snippet: r.snippet}));
}Expected Output
A migrated search integration that works with Scavio instead of Brave, with 500 free credits/month and no attribution requirement.