- [HTTP request](https://developers.google.com/merchant/api/reference/rest/reports_v1/accounts.reports/search.md.txt#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/merchant/api/reference/rest/reports_v1/accounts.reports/search.md.txt#body.PATH_PARAMETERS)
- [Request body](https://developers.google.com/merchant/api/reference/rest/reports_v1/accounts.reports/search.md.txt#body.request_body)
  - [JSON representation](https://developers.google.com/merchant/api/reference/rest/reports_v1/accounts.reports/search.md.txt#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://developers.google.com/merchant/api/reference/rest/reports_v1/accounts.reports/search.md.txt#body.response_body)
  - [JSON representation](https://developers.google.com/merchant/api/reference/rest/reports_v1/accounts.reports/search.md.txt#body.SearchResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://developers.google.com/merchant/api/reference/rest/reports_v1/accounts.reports/search.md.txt#body.aspect)
- [Try it!](https://developers.google.com/merchant/api/reference/rest/reports_v1/accounts.reports/search.md.txt#try-it)

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.

For more information, see [Get started](https://developers.google.com/merchant/api/guides/reports/get-started.md.txt), [Use Merchant Center Query Language](https://developers.google.com/merchant/api/guides/reports/query-language.md.txt), and [Paginate query results](https://developers.google.com/merchant/api/guides/reports/paging.md.txt).

### HTTP request

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

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. Id of the account making the call. Must be a standalone account or a subaccount of an advanced account. 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](https://developers.google.com/merchant/api/guides/reports/query-language.md.txt). 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 100,000 are coerced to 100,000. |
| `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](https://developers.google.com/identity/protocols/OAuth2).