Microsoft descontinuó la API de búsqueda de Bing en 2025. Los agentes de Azure AI que dependían de ella necesitan un reemplazo. Este tutorial recorre la migración a Scavio.
Requisitos previos
- Función de Azure o aplicación de contenedor con código Bing antiguo
- Clave API de Scavio
Guia paso a paso
Paso 1: Identificar llamadas de Bing en código
La mayoría son GET /v7.0/search.
// Before:
// const r = await fetch(`https://api.bing.microsoft.com/v7.0/search?q=${q}`, { headers: { 'Ocp-Apim-Subscription-Key': BING_KEY } });Paso 2: Reemplazar con Scavio
PUBLICAR con x-api-key.
// 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());Paso 3: Forma de respuesta del mapa
webPages.value[] de Bing se convierte en organic_results[].
// Bing: r.webPages.value[i].url + .name + .snippet
// Scavio: r.organic_results[i].link + .title + .snippetPaso 4: Actualizar la configuración de Azure Functions
Cambie la var env.
# In Azure Portal: replace BING_KEY with SCAVIO_API_KEY.Paso 5: Agregue Reddit + YouTube como superficies adicionales
Bing nunca los tuvo limpiamente.
// Optional new tools:
// fetch('https://api.scavio.dev/api/v1/reddit/search', ...)Ejemplo en Python
# Same in Python — the migration is a 5-line diff per call site.Ejemplo en JavaScript
// Bing migration in Azure Functions: typically 10-30 minutes per function.Salida esperada
Azure agents continue functioning post-Bing-shutdown. Multi-surface (Reddit/YouTube) added as bonus.