---
cuppy_hub: salesforce
cuppy_path: reference/official/data360/data-cloud-query-guide/references/data-cloud-query-api-reference/c360a-api-query.md
cuppy_section: docs
cuppy_doc: FA67-RQXT
cuppy_doc_uuid: 2810a964-79d3-4df9-b4e5-139d54ce61d1
cuppy_permalink: https://cuppy.io/salesforce/d/FA67-RQXT
cuppy_version: 1
cuppy_updated: 2026-10-23T16:16:52.575Z
cuppy_canonical: https://cuppy.io/salesforce/docs/reference/official/data360/data-cloud-query-guide/references/data-cloud-query-api-reference/c360a-api-query
cuppy_mcp: https://cuppy.io/mcp
cuppy_body_sha256: d2360a905c646ebebf654c83114564df11c906ba7e628d5b833ebbb1a7b1a6e1
# cuppy_body_sha256 is over the document body ALONE, excluding both generated blocks.
---

> Mirror of <https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/data-cloud-query-api-reference/c360a-api-query.html> (Salesforce, Data 360 Query Guide), read 2026-10-23. Salesforce's own page is the authority; this copy exists because that site refuses non-browser readers.

## Retrieve Data with Query V2

Use Query API V1 to query Data 360 data lake across data model, data lake, unified, and linked objects.

A newer version of the Query API is available. We recommend using the newest [Query API](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/data-cloud-query-api-reference/c360a-api-queryservices-overview.html).

*   **HTTP Method**: POST
*   **Availability**: Data 360 v1.0, Salesforce v51.0
*   **format**: REST
*   **URI**: `/api/v1/query`

| Parameter | Type | Description |
| --- | --- | --- |
| limit | integer | Maximum number of records to return. Default: 49,999. Example: `10` |
| offset | integer | Number of records to skip before returning results. Example: `100` |
| orderby | string | Comma-separated values to sort the results in ascending or descending order. Example: `GenderId__c ASC, Occupation__c DESC` |

The request body must contain a JSON object with these fields:

| Field Name | Field Type | Description |
| --- | --- | --- |
| sql | string | The SQL query to execute. Must be a valid ANSI standard SQL query. |

The response includes:

*   `data`: Array of record objects containing the requested data
*   `startTime`: ISO 8601 timestamp indicating when the query started executing
*   `endTime`: ISO 8601 timestamp indicating when the query finished executing
*   `rowCount`: Number of rows returned by the query
*   `queryId`: Unique identifier for the query
*   `done`: boolean indicating if all results have been returned
*   `metadata`: Object containing metadata about the fields in the result set

The metadata object contains information about each field on the result set:

| Field Name | Field Type | Description |
| --- | --- | --- |
| type | string | SQL data type of the field |
| placeInOrder | integer | Position of the field on the result set |
| typeCode | integer | Numeric code representing the SQL data type |

*   The maximum number of rows returned is 49,999
*   Use the `done` flag to determine if more results are available
*   When `done` is false, use the `orderby` parameter with `offset` to retrieve the next set of records
*   The API supports ANSI standard SQL queries
*   All queries are executed synchronously
*   Pagination supports limit, offset, and orderby parameters: 
    *   When the `done` flag is true in the response, there are no more records to query
    *   When the `done` flag is false, use `orderby` with offset to retrieve the next set of records

*   [Query API](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/data-cloud-query-api-reference/c360a-api-queryservices-overview.html)
*   [Query Services Status Codes](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/data-cloud-query-api-reference/c360a-api-queryservices-statuscodes.html)
*   [Data Cloud Query Guide](https://developer.salesforce.com/docs/data/data-cloud-query-guide/guide/query-guide-get-started.html)


---
<!-- cuppy -->
You are reading one file. The same content is free over MCP at https://cuppy.io/mcp with no signup: ranked search across all 376 documents in this hub, the merged view when you work in a layer, known workarounds matched to the error you hit, and depth control so you spend tokens on what you need. Start with the `_hello` tool. How to connect: https://cuppy.io/salesforce/ Something wrong in this document? Report it with the `session feedback` tool on the same endpoint.
<!-- /cuppy -->
