---
schema_version: "1"
id: c13f7cf40a391de1ef504aa5e5e448c82121488a73c9d5a60abf47867d18b2f0
title: QueryRequest
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/guides/mc-apis/queryrequest.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/queryrequest.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 91e639ea6b16525b1c54068aaa50afd7f7fe8bf6dfc316fd8bb96a0a14c283d7
products:
  - Marketing Cloud Engagement APIs and Programmatic Languages
  - Marketing Cloud
---
# QueryRequest

An object that contains the request body for a query.

## Properties

| Name                        | Data Type                                          | Description                                                                                                                                                             |
| --------------------------- | -------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ClientIDs`                 | Array of [ClientID](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/clientid.md) objects           | Specifies accounts and sub-accounts, including Enterprise 2.0, On-Your-Behalf, and Lock &amp; Publish accounts, from which to retrieve data.                            |
| `ContinueRequest`           | String                                             | Represents the RequestID that identifies a previous Retrieve requestto continue processing (returns the next available batch of data for that request).                 |
| `PartnerProperties`         | Array of [APIProperty](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/apiproperty.md) objects     | A collection of metadata supplied by the client and stored by the system. These properties are accessible only via API.                                                 |
| `Query`                     | [Query](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/query.md) object                           | Specifies an SQL query to be stored in a Query definition. You can find nore information about writing SQL queries for a query activity in the Query Activity document. |
| `QueryAllAccounts`          | Boolean                                            | Queries all accounts, including parent and all children, regarding an event (ignores specified ClientIDs).                                                              |
| `RespondTo`                 | Array of [AsyncResponse](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/asyncresponse.md) objects | Not used.                                                                                                                                                               |
| `RetrieveAllSinceLastBatch` | Boolean                                            | Retrieve all data since last retrieve context. Works with added and modified data. You must include the same properties and filters as the previous request.            |
