# ProviderQuery

**Kind**: interface | **Module**: [Search](https://docs.interop.io/desktop/reference/javascript/search/index.md)

**Source**: https://docs.interop.io/desktop/reference/javascript/search/providerquery/index.html

Describes the search query received by the search provider and provides methods for responding to it.

## Properties

- **`id`** (`string`, required)
  ID for the search query (assigned by the framework).
- **`providerLimits`** (`ProviderLimits`, optional)
  Specifies the maximum total results and/or the maximum results per search type to return.
- **`providers`** (`ProviderData[]`, optional)
  List of search providers to query.
- **`search`** (`string`, required)
  String for which to query the search providers.
- **`types`** (`SearchType[]`, optional)
  List of search types in which the search client app is interested.

## Methods

### done

Signals the framework that the search operation has been completed.

```ts
() => void
```

**Returns**: `void`

### error

Sends errors back to search clients.

```ts
(error: string) => void
```

**Parameters**

- **`error`** (`string`, required)
  Error message to send back to search clients.

**Returns**: `void`

### sendResult

Sends individual results back to search clients.

```ts
(result: QueryResult) => void
```

**Parameters**

- **`result`** (`QueryResult`, required)
  Individual search result to send back to search clients.

**Returns**: `void`

## Related types

- [ProviderData](https://docs.interop.io/desktop/reference/javascript/search/providerdata/index.md)
- [ProviderLimits](https://docs.interop.io/desktop/reference/javascript/search/providerlimits/index.md)
- [QueryResult](https://docs.interop.io/desktop/reference/javascript/search/queryresult/index.md)
- [SearchType](https://docs.interop.io/desktop/reference/javascript/search/searchtype/index.md)
