ScavioScavio
ProductPricingDocs
Sign InGet Started
  1. Home
  2. Workflows
  3. Search API Vendor Evaluation Pipeline
Workflow

Search API Vendor Evaluation Pipeline

Workflow to systematically test and compare search API vendors on result quality, latency, cost, and feature coverage before committing to a provider.

Start FreeAPI Docs

Overview

Choosing a search API vendor without systematic testing leads to regret six months in. This workflow runs identical queries against multiple search API providers, measures result quality, latency, and cost per query, and generates a comparison report. It tests edge cases like non-English queries, product searches, and knowledge graph coverage so you pick the right vendor the first time.

Trigger

One-time evaluation, triggered manually during vendor selection.

Schedule

One-time

Workflow Steps

1

Define Test Query Set

Create 50+ test queries across categories: informational, product, local, trending, and non-English.

2

Run Queries Against Each Vendor

Execute the same queries against Scavio, Tavily, and Exa. Record results, latency, and cost.

3

Score Result Quality

For each query, score relevance of top 5 results on a 1-5 scale. Track which vendors return Knowledge Graph and AI Overview data.

4

Calculate Cost Per Query

Compute actual cost per query for each vendor based on their pricing tier.

5

Generate Comparison Report

Output a markdown table with quality scores, latency p50/p95, cost per query, and feature coverage per vendor.

Python Implementation

Python
import requests, os, json, time

SCAVIO_KEY = os.environ["SCAVIO_API_KEY"]
SH = {"x-api-key": SCAVIO_KEY, "Content-Type": "application/json"}

TEST_QUERIES = [
    {"query": "best crm for startups 2026", "category": "informational"},
    {"query": "sony wh-1000xm6 price", "category": "product"},
    {"query": "python asyncio tutorial", "category": "technical"},
    {"query": "restaurants near times square", "category": "local"},
    {"query": "latest ai agent frameworks", "category": "trending"},
]

def test_scavio(query: str) -> dict:
    start = time.time()
    resp = requests.post(
        "https://api.scavio.dev/api/v1/search",
        headers=SH,
        json={"query": query, "country_code": "us"},
        timeout=15,
    )
    latency = time.time() - start
    data = resp.json()
    return {
        "provider": "scavio",
        "latency_ms": round(latency * 1000),
        "result_count": len(data.get("organic_results", [])),
        "has_knowledge_graph": "knowledge_graph" in data,
        "has_ai_overview": "ai_overview" in data,
        "has_related_questions": "related_questions" in data,
        "cost_per_query": 0.005,
    }

def run_evaluation():
    results = []
    for tq in TEST_QUERIES:
        scavio_result = test_scavio(tq["query"])
        scavio_result["category"] = tq["category"]
        scavio_result["query"] = tq["query"]
        results.append(scavio_result)

    avg_latency = sum(r["latency_ms"] for r in results) / len(results)
    avg_results = sum(r["result_count"] for r in results) / len(results)
    kg_rate = sum(1 for r in results if r["has_knowledge_graph"]) / len(results)

    print(f"Scavio Evaluation ({len(results)} queries):")
    print(f"  Avg latency: {avg_latency:.0f}ms")
    print(f"  Avg results: {avg_results:.1f}")
    print(f"  Knowledge Graph rate: {kg_rate:.0%}")
    print(f"  Cost: {len(results) * 0.005:.3f} USD")
    return results

evaluation = run_evaluation()

JavaScript Implementation

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

const TEST_QUERIES = [
  {query:'best crm for startups 2026', category:'informational'},
  {query:'sony wh-1000xm6 price', category:'product'},
  {query:'python asyncio tutorial', category:'technical'},
  {query:'restaurants near times square', category:'local'},
  {query:'latest ai agent frameworks', category:'trending'},
];

async function testScavio(query) {
  const start = Date.now();
  const r = await fetch('https://api.scavio.dev/api/v1/search', {method:'POST', headers:SH, body:JSON.stringify({query, country_code:'us'})});
  const latency = Date.now() - start;
  const data = await r.json();
  return {provider:'scavio', latencyMs:latency, resultCount:(data.organic_results||[]).length, hasKg:'knowledge_graph' in data, hasAio:'ai_overview' in data, hasRelated:'related_questions' in data, costPerQuery:0.005};
}

async function runEvaluation() {
  const results = [];
  for (const tq of TEST_QUERIES) {
    const result = await testScavio(tq.query);
    result.category = tq.category;
    result.query = tq.query;
    results.push(result);
  }
  const avgLatency = results.reduce((s,r)=>s+r.latencyMs,0)/results.length;
  const avgResults = results.reduce((s,r)=>s+r.resultCount,0)/results.length;
  const kgRate = results.filter(r=>r.hasKg).length/results.length;
  console.log('Scavio Evaluation ('+results.length+' queries):');
  console.log('  Avg latency: '+avgLatency.toFixed(0)+'ms');
  console.log('  Avg results: '+avgResults.toFixed(1));
  console.log('  KG rate: '+(kgRate*100).toFixed(0)+'%');
  console.log('  Cost: $'+(results.length*0.005).toFixed(3));
  return results;
}

const evaluation = await runEvaluation();

Platforms Used

Google

Web search with knowledge graph, PAA, and AI overviews

Frequently Asked Questions

Choosing a search API vendor without systematic testing leads to regret six months in. This workflow runs identical queries against multiple search API providers, measures result quality, latency, and cost per query, and generates a comparison report. It tests edge cases like non-English queries, product searches, and knowledge graph coverage so you pick the right vendor the first time.

This workflow uses a one-time evaluation, triggered manually during vendor selection.. One-time.

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

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

Search API Vendor Evaluation Pipeline

Workflow to systematically test and compare search API vendors on result quality, latency, cost, and feature coverage before committing to a provider.

Get Your 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