Here's a sample query to the `MerchantPerformanceView` that returns the
performance of your account over the last 30 days, segmented by `program` and
`offer_id`. You can try this quick example to get familiar with the `Reports` service.

You need the [Reporting manager
role](https://support.google.com/merchants/answer/11935402) to retrieve this report.

To make the request, pass the following Merchant Center Query
Language statement to the
[`reports.search`](https://developers.google.com/shopping-content/reference/rest/v2.1/reports/search)
method:

    SELECT
      segments.program,
      segments.offer_id,
      metrics.impressions,
      metrics.clicks,
      metrics.ctr
    FROM MerchantPerformanceView
    WHERE segments.date BETWEEN '2020-11-01' AND '2020-11-30'

[Run](https://developers.google.com/shopping-content/reference/rest/v2.1/reports/search?apix=true&apix_params=%7B%22merchantId%22:0,%22resource%22:%7B%22query%22:%22SELECT++segments.program,++segments.offer_id,++metrics.impressions,++metrics.clicks,++metrics.ctr+FROM+MerchantPerformanceView+WHERE+segments.date+BETWEEN+'2020-11-01'+AND+'2020-11-30'%22%7D%7D)

Click **Run** to try the sample in the **API Explorer** . After you click
**Run** , update the merchant ID placeholder to your own merchant ID in the
request URL. You can modify the query. The full query must remain on one line to
work with the **API explorer**.

> [!NOTE]
> **Note:** This guide shows the underlying HTTP request as a teaching tool, but we recommend that you use one of the [client libraries](https://developers.google.com/shopping-content/guides/libraries) to submit your requests.

## HTTP request URL

The request consists of an HTTP POST to the Content API for Shopping server at
the following URL:

```
https://shoppingcontent.googleapis.com/content/v2.1/merchantId/reports/search
```

## Complete HTTP request sample

Here is a complete example showing the report definition above enclosed within
an HTTP POST request:

```
POST /v2.1/merchantId/reports/search HTTP/1.1
Host: shoppingcontent.googleapis.com
User-Agent: curl
Content-Type: application/json
Accept: application/json
Authorization: Bearer access token

Parameters:
{
  "query" : "SELECT segments.program, segments.offer_id, metrics.impressions,
                    metrics.clicks, metrics.ctr
            FROM MerchantPerformanceView
            WHERE segments.date BETWEEN '2020-11-01' AND '2020-11-30'"
}
```