---
title: "WidgetRequestData"
slug: "cloud-sdk-search-widgetrequestdata-1539373"
abstract: "The WidgetRequestData class represents data about the widget or widgets to retrieve."
---
# WidgetRequestData

|     |     |
| --- | --- |
| Type | Class |
| Import path | `@sitecore-cloudsdk/search/server` |

Data about the widget or widgets to retrieve.

## Constructor

```typescript
WidgetRequestData(widgetItems: WidgetItem[])
```

### Parameters { .notintoc }

| Name | Type | Description |
| --- | --- | --- |
| `widgetItems` | `WidgetItem[]` | Required.<br><br>Array of `WidgetItem` objects that describe each widget to retrieve.<br><br>Minimum length: 1. |

## Properties

| Name | Type | Description |
| --- | --- | --- |
| `_widgetItems` | `WidgetItem[]` | Required.<br><br>Array of `WidgetItem` objects that describe each widget to retrieve.<br><br>Minimum length: 1. |

## Methods

### _validateWidgetItems

Validates widget items.

#### Signature { .notintoc }

```typescript
private _validateWidgetItems(widgetItems: WidgetItem[]): void
```

#### Parameters { .notintoc }

| Name | Type | Description |
| --- | --- | --- |
| `widgetItems` | `WidgetItem[]` | Required.<br><br>Array of `WidgetItem` objects that describe each widget to retrieve.<br><br>Minimum length: 1. |

#### Return value { .notintoc }

Returns void.

#### Errors { .notintoc }

- [`MV-0012`](https://doc.sitecore.com/sdk/en/developers/005/cloud-sdk/cloud-sdk-reference/cloud-sdk-search/cloud-sdk-search-server/classes/troubleshooting-the-cloud-sdk.html#UUID-e753bca7-34cd-82c3-cb33-6c1996ac600f_section-idm1903395083329300 "MV errors")

### toDTO

Maps the widget items to their DTO (data transfer object) format.

#### Signature { .notintoc }

```typescript
toDTO(): WidgetDTO
```

#### Return value { .notintoc }

Returns the widget items in a standardized DTO format.