Tutorial

How to Replace the Discontinued Bing Search API on Azure

Bing Search API was discontinued in 2025. Migrate Azure AI agents to Scavio with a simple HTTP swap.

Microsoft discontinued the Bing Search API in 2025. Azure AI agents that depended on it need a replacement. This tutorial walks the migration to Scavio.

Prerequisites

  • Azure Function or Container App with old Bing code
  • Scavio API key

Walkthrough

Step 1: Identify Bing calls in code

Most are GET /v7.0/search.

JavaScript
// Before:
// const r = await fetch(`https://api.bing.microsoft.com/v7.0/search?q=${q}`, { headers: { 'Ocp-Apim-Subscription-Key': BING_KEY } });

Step 2: Replace with Scavio

POST with x-api-key.

JavaScript
// After:
const r = 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({ query: q })
}).then(r => r.json());

Step 3: Map response shape

Bing's webPages.value[] becomes organic_results[].

JavaScript
// Bing: r.webPages.value[i].url + .name + .snippet
// Scavio: r.organic_results[i].link + .title + .snippet

Step 4: Update Azure Functions config

Swap the env var.

Text
# In Azure Portal: replace BING_KEY with SCAVIO_API_KEY.

Step 5: Add Reddit + YouTube as bonus surfaces

Bing never had these cleanly.

JavaScript
// Optional new tools:
// fetch('https://api.scavio.dev/api/v1/reddit/search', ...)

Python Example

Python
# Same in Python — the migration is a 5-line diff per call site.

JavaScript Example

JavaScript
// Bing migration in Azure Functions: typically 10-30 minutes per function.

Expected Output

JSON
Azure agents continue functioning post-Bing-shutdown. Multi-surface (Reddit/YouTube) added as bonus.

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.

Azure Function or Container App with old Bing code. 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 Search API was discontinued in 2025. Migrate Azure AI agents to Scavio with a simple HTTP swap.