BingWebSearchService

Wisej.AI.Services.BingWebSearchService

Namespace: Wisej.AI.Services

Assembly: Wisej.AI (3.5.0.0)

Represents a web search service using Bing's API.

public class BingWebSearchService : WebSearchServiceBase

This class extends WebSearchServiceBase to provide specific implementation details for interacting with the Bing Web Search API.

Constructors

BingWebSearchService(url)

Initializes a new instance of the BingWebSearchService class with the specified URL.

Name
Type
Description

url

The base URL for the Bing Web Search API. Default is "https://api.bing.microsoft.com/v7.0/search".

Properties

Authentication

String: Gets the authentication header name specific to Bing's API. (Default: "api-key")

The authentication header for Bing's API is "Ocp-Apim-Subscription-Key".

Methods

SearchAsync(query)

Performs an asynchronous search using Bing's Web Search API with the specified query.

Parameter
Type
Description

query

The search query string.

Returns: Task<String>. A task representing the asynchronous operation, with a result of the search response as a formatted string.

This method formats the query string, sends a GET request to the Bing API, and processes the response to extract and format the search results.

Implements

Name
Description

Represents a service for performing web searches.

Last updated