Skip to the page

Semantic Kernel

For Semantic Kernel apps that search the web with Bing: the Bing text search runs on the Search API once you change its endpoint and key.

Microsoft retired the Bing Web Search API in August 2025, so a Bing search in Semantic Kernel gets no results today. The Search API answers the same request in Bing's shape.

.NET

  1. 1. Add the web plugins package

    Terminal
    dotnet add package Microsoft.SemanticKernel.Plugins.Web --prerelease
  2. 2. Set the endpoint and the key

    Pass the address as Endpoint in BingTextSearchOptions, and your key as apiKey, in place of YOUR_SPECSTREAM_KEY:

    C#
    using Microsoft.SemanticKernel.Plugins.Web.Bing;
    var textSearch = new BingTextSearch(
    apiKey: "YOUR_SPECSTREAM_KEY",
    options: new BingTextSearchOptions { Endpoint = new Uri("https://api.specstream.ai/v7.0/search") });

    Everything else stays as it is, including a plugin made with textSearch.CreateWithSearch.

Java

The BingConnector of the Semantic Kernel for Java samples reads its address from the bing.search.url system property or the BING_SEARCH_URL environment variable. Set one of them. The sample Example07_BingAndGooglePlugins reads your key from BING_API_KEY:

Environment
BING_SEARCH_URL=https://api.specstream.ai/v7.0/search
BING_API_KEY=YOUR_SPECSTREAM_KEY

Or as a JVM option:

JVM option
-Dbing.search.url=https://api.specstream.ai/v7.0/search

Check it works

In .NET, run one search and print what comes back. Each line is the snippet of a page found:

C#
var results = await textSearch.SearchAsync("What is Semantic Kernel?", new() { Top = 4 });
await foreach (string result in results.Results)
{
Console.WriteLine(result);
}

In Java, run Example07_BingAndGooglePlugins. The Bing answer lists the pages it found. A wrong or missing key gets status 401.

Cost

Each search is one Search API call at $5 per 1,000 searches of up to 10 results. It comes out of your balance, with no quote and no approval. Search API has the details.

Top or count above 10 costs more per call. Keep it at 10 or less to pay the base price.

Your key

Get your key on the Search API screen of your SpecStream workspace. New accounts start with $10 of credit, no card.

Other products that call Bing or Google move the same way: Bing and Google search API.