# IWebSearchService

Namespace: **Wisej.AI.Services**

Assembly: **Wisej.AI** (3.5.0.0)

Represents a service for performing web searches.

{% tabs %}
{% tab title="C#" %}

```csharp
public interface IWebSearchService
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Interface IWebSearchService
```

{% endtab %}
{% endtabs %}

## Properties

### ![](/files/ptrKjmmRoQB76pvrIqh0) MaxSites

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Gets or sets the maximum number of sites to search.

## Methods

### ![](/files/ptrKjmmRoQB76pvrIqh0) SearchAsync(query)

Asynchronously performs a web search with the specified query.

| Parameter | Type                                                          | Description              |
| --------- | ------------------------------------------------------------- | ------------------------ |
| **query** | [String](https://docs.microsoft.com/dotnet/api/system.string) | The search query string. |

**Returns:** [Task\<String>](https://docs.microsoft.com/dotnet/api/system.threading.tasks.task-1). A task that represents the asynchronous operation. The task result contains the search results as a string.

## Implemented By

| Name                                                                                                                           | Description                                                                                       |
| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------- |
| [BingWebSearchService](/ai/components/api/services/iwebsearchservice/wisej.ai.services.bingwebsearchservice.md)                | Represents a web search service using Bing's API.                                                 |
| [BraveWebSearchService](/ai/components/api/services/iwebsearchservice/wisej.ai.services.bravewebsearchservice.md)              | Represents a service for performing web searches using the Brave search engine.                   |
| [GoogleWebSearchService](/ai/components/api/services/iwebsearchservice/wisej.ai.services.googlewebsearchservice.md)            | Represents a web search service using Google's Custom Search API.                                 |
| [WebSearchServiceBase](https://github.com/iceteagroup/wisej-docs-ai/blob/master/components/api/websearchservicebase/README.md) | Represents the base class for web search services, providing common functionality and properties. |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wisej.com/ai/components/api/services/iwebsearchservice.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
