Method: accounts.reports.search

Retrieves a report defined by a search query. The response might contain fewer rows than specified by pageSize. Rely on nextPageToken to determine if there are more rows to be requested.

HTTP request

POST https://merchantapi.googleapis.com/reports/v1beta/{parent=accounts/*}/reports:search

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. Id of the account making the call. Must be a standalone account or an MCA subaccount. Format: accounts/{account}

Request body

The request body contains data with the following structure:

JSON representation
{
  "query": string,
  "pageSize": integer,
  "pageToken": string
}
Fields
query

string

Required. Query that defines a report to be retrieved.

For details on how to construct your query, see the Query Language guide. For the full list of available tables and fields, see the Available fields.

pageSize

integer

Optional. Number of ReportRows to retrieve in a single page. Defaults to 1000. Values above 5000 are coerced to 5000.

pageToken

string

Optional. Token of the page to retrieve. If not specified, the first page of results is returned. In order to request the next page of results, the value obtained from nextPageToken in the previous response should be used.

Response body

Response message for the ReportService.Search method.

If successful, the response body contains data with the following structure:

JSON representation
{
  "results": [
    {
      object (ReportRow)
    }
  ],
  "nextPageToken": string
}
Fields
results[]

object (ReportRow)

Rows that matched the search query.

nextPageToken

string

Token which can be sent as pageToken to retrieve the next page. If omitted, there are no subsequent pages.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/content

For more information, see the OAuth 2.0 Overview.