Workflow

Brave Search API to Scavio Migration Pipeline

Automate migration from Brave Search API to Scavio. Validate results, update endpoints, and verify parity across all queries.

Overview

Teams migrating from Brave Search API to Scavio need to validate that result quality is equivalent before cutting over. This workflow runs your existing query set through both APIs in parallel, compares result overlap, and generates a parity report. Once parity is confirmed, it provides the endpoint and header changes needed to complete the migration. No attribution requirement with Scavio versus Brave's mandatory attribution.

Trigger

Manual trigger or one-time cron

Schedule

One-time migration run

Workflow Steps

1

Export current Brave queries

Pull the list of queries your application sends to Brave Search API from logs or config.

2

Run queries through both APIs

For each query, call both Brave and Scavio. Record results from each.

3

Compare result quality

Calculate overlap: how many of Brave's top 5 URLs also appear in Scavio's top 10. Flag queries with low overlap.

4

Generate parity report

Summarize overall parity percentage, list low-overlap queries, and note any Scavio-exclusive features (AI Overviews, multi-platform).

5

Output migration diff

Generate the exact code changes needed: URL swap, header change, response field mapping.

Python Implementation

Python
import requests, os, json

H = {"x-api-key": os.environ["SCAVIO_API_KEY"]}

def compare_apis(query):
    """Run a query through Scavio and compare structure."""
    scavio = requests.post("https://api.scavio.dev/api/v1/search", headers=H,
        json={"platform": "google", "query": query}, timeout=10).json()
    scavio_urls = [o.get("link", "") for o in scavio.get("organic", [])[:10]]
    scavio_titles = [o.get("title", "") for o in scavio.get("organic", [])[:5]]
    return {
        "query": query,
        "scavio_result_count": len(scavio.get("organic", [])),
        "scavio_top_urls": scavio_urls[:5],
        "scavio_has_ai_overview": bool(scavio.get("ai_overview")),
        "migration_notes": "Scavio returns ai_overview field (Brave does not). "
                          "No attribution requirement. Multi-platform support included."
    }

# Migration code diff:
# BEFORE (Brave):
#   requests.get("https://api.search.brave.com/res/v1/web/search",
#       headers={"X-Subscription-Token": BRAVE_KEY}, params={"q": query})
#
# AFTER (Scavio):
#   requests.post("https://api.scavio.dev/api/v1/search",
#       headers={"x-api-key": SCAVIO_KEY},
#       json={"platform": "google", "query": query})

QUERIES = ["best search api 2026", "serp api pricing", "web search api for agents"]
for q in QUERIES:
    print(json.dumps(compare_apis(q), indent=2))

JavaScript Implementation

JavaScript
const H = {"x-api-key": process.env.SCAVIO_API_KEY, "Content-Type": "application/json"};

async function compareApis(query) {
  const scavio = await fetch("https://api.scavio.dev/api/v1/search", {
    method: "POST", headers: H,
    body: JSON.stringify({platform: "google", query})
  }).then(r => r.json());
  return {
    query,
    scavioResultCount: (scavio.organic || []).length,
    scavioTopUrls: (scavio.organic || []).slice(0, 5).map(o => o.link),
    scavioHasAiOverview: !!scavio.ai_overview,
    migrationNotes: "Change POST URL and header. No attribution required. ai_overview field is a bonus."
  };
}

// Migration: change fetch URL from api.search.brave.com to api.scavio.dev
// Change header from X-Subscription-Token to x-api-key
// Change GET with params to POST with JSON body

Platforms Used

Google

Web search with knowledge graph, PAA, and AI overviews

Frequently Asked Questions

Teams migrating from Brave Search API to Scavio need to validate that result quality is equivalent before cutting over. This workflow runs your existing query set through both APIs in parallel, compares result overlap, and generates a parity report. Once parity is confirmed, it provides the endpoint and header changes needed to complete the migration. No attribution requirement with Scavio versus Brave's mandatory attribution.

This workflow uses a manual trigger or one-time cron. One-time migration run.

This workflow uses the following Scavio platforms: google. Each platform is called via the same unified API endpoint.

Yes. Scavio's free tier includes 500 credits per month with no credit card required. That is enough to test and validate this workflow before scaling it.

Brave Search API to Scavio Migration Pipeline

Automate migration from Brave Search API to Scavio. Validate results, update endpoints, and verify parity across all queries.