Tutorial

How to Replace the Bing Web Search API for a Deep Research Agent

Bing Web Search API was retired in August 2025. This tutorial wires Scavio in as a drop-in replacement for deep research agents.

An r/AI_Agents thread asked what to use after the Bing Web Search API retired in August 2025. This tutorial wires Scavio as a multi-surface replacement and shows the agent loop that uses SERP, Reddit, and YouTube together.

Prerequisites

  • Python 3.10+
  • Anthropic API key
  • Scavio API key

Walkthrough

Step 1: Replace the Bing call

Same query, new endpoint.

Python
import requests, os
API_KEY = os.environ['SCAVIO_API_KEY']

def serp(q):
    return requests.post('https://api.scavio.dev/api/v1/search',
        headers={'x-api-key': API_KEY}, json={'query': q}).json()

Step 2: Add Reddit surface

Reddit threads catch context Bing missed.

Python
def reddit(q):
    return requests.post('https://api.scavio.dev/api/v1/reddit/search',
        headers={'x-api-key': API_KEY}, json={'query': q}).json()

Step 3: Add YouTube surface

Videos surface primary-source quotes.

Python
def yt(q):
    return requests.post('https://api.scavio.dev/api/v1/youtube/search',
        headers={'x-api-key': API_KEY}, json={'query': q}).json()

Step 4: Compose the deep research loop

Three surfaces fan out per question.

Python
def deep_research(q):
    return {
        'serp': serp(q).get('organic_results', [])[:5],
        'reddit': reddit(q).get('posts', [])[:5],
        'youtube': yt(q).get('videos', [])[:3],
    }

Step 5: Have the LLM compose the answer

Claude sees three surfaces in one prompt.

Python
import anthropic
client = anthropic.Anthropic()

def answer(q):
    data = deep_research(q)
    msg = client.messages.create(model='claude-sonnet-4-6', max_tokens=600,
        messages=[{'role':'user','content':f'Q: {q}\nDATA: {data}\nWrite a sourced answer.'}])
    return msg.content[0].text

Python Example

Python
import os, requests
API_KEY = os.environ['SCAVIO_API_KEY']
H = {'x-api-key': API_KEY}

def research(q):
    s = requests.post('https://api.scavio.dev/api/v1/search', headers=H, json={'query': q}).json()
    r = requests.post('https://api.scavio.dev/api/v1/reddit/search', headers=H, json={'query': q}).json()
    return {'serp': s.get('organic_results', [])[:5], 'reddit': r.get('posts', [])[:5]}

print(research('agentic search api 2026'))

JavaScript Example

JavaScript
const H = { 'x-api-key': process.env.SCAVIO_API_KEY, 'Content-Type': 'application/json' };
export async function research(q) {
  const [s, r] = await Promise.all([
    fetch('https://api.scavio.dev/api/v1/search', { method: 'POST', headers: H, body: JSON.stringify({ query: q }) }).then(r => r.json()),
    fetch('https://api.scavio.dev/api/v1/reddit/search', { method: 'POST', headers: H, body: JSON.stringify({ query: q }) }).then(r => r.json())
  ]);
  return { s, r };
}

Expected Output

JSON
Per question, three structured surfaces returned in one round trip. Total cost ~3 credits per question = $0.013 at the $30 tier.

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.

Python 3.10+. Anthropic API key. Scavio API key. 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 the raw REST API, but you can adapt to your framework of choice.

Start Building

Bing Web Search API was retired in August 2025. This tutorial wires Scavio in as a drop-in replacement for deep research agents.