Retrieve Data with Query V2

Data 360 Query Guide, mirrored from developer.salesforce.com: Use Query API V1 to query Data 360 data lake across data model, data lake, unified, and linked objects.

markdownreferencev1FA67-RQXTguide: data-cloud-query-guidestage: referencetrust: officialsource: developer.salesforce.comservice: data360interface: restRetrieve Data with Query V2Data 360Data CloudData 360 Query Guide/api/v1/query

Created 23 Oct 2026 · Modified 23 Oct 2026 · 1 version

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.

  • HTTP Method: POST
  • Availability: Data 360 v1.0, Salesforce v51.0
  • format: REST
  • URI: /api/v1/query
ParameterTypeDescription
limitintegerMaximum number of records to return. Default: 49,999. Example: 10
offsetintegerNumber of records to skip before returning results. Example: 100
orderbystringComma-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 NameField TypeDescription
sqlstringThe 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 NameField TypeDescription
typestringSQL data type of the field
placeInOrderintegerPosition of the field on the result set
typeCodeintegerNumeric 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

Read this document as markdown — the same bytes an agent receives.