You can use Merchant Reports API to learn about your products, their performance
, and their competitive environment on Google through the data view that it
offers.

You can use the Merchant Reports API to do the following:

- [Measure the performance of your products](https://developers.google.com/merchant/api/guides/reports/evaluate-products#measure_performance): In Merchant API, `MerchantPerformanceView` is now `product_performance_view`.
- [Filter your products by specific fields](https://developers.google.com/merchant/api/guides/reports/evaluate-products#filter_products): With Merchant API, you can filter based on all the available fields, except `item_issues`.
- [Improve product pricing](https://developers.google.com/merchant/api/guides/reports/evaluate-products#improve_pricing): With Merchant API, amount micros and currency fields are merged into one field with [`Price`](https://developers.google.com/merchant/api/reference/rest/Shared.Types/Price) type.
- [Understand the market](https://developers.google.com/merchant/api/guides/reports/understand-the-market): With Merchant API, you can get the data about best-selling products and brands, competitive price points, sale price suggestions, and information about the competitive landscape for your industry.
- [Explore your competitive landscape](https://developers.google.com/merchant/api/guides/reports/explore-competitive-landscape): You can get report to understand your competitive landscape on a product category level and take action to improve your visibility.

Here's how you can integrate the [Merchant Reports API](https://developers.google.com/merchant/api/guides/reports/overview)
with your existing [Content API for Shopping](https://developers.google.com/shopping-content) implementation.

## Requests

Use the following request URL format for the Merchant Reports API:

    POST https://merchantapi.googleapis.com/reports/v1/{PARENT}/reports:search

Here's a sample comparison of the Content API for Shopping to the Merchant
Reports API for `search` requests:

|---|---|---|
|   | Content API | Merchant API |
| URL | https://shoppingcontent.googleapis.com/content/v2.1/<var class="edit" translate="no">{MERCHANT_ID}</var>/reports/search | https://merchantapi.googleapis.com/reports/v1/<var class="edit" translate="no">{PARENT}</var>/reports:search |
| Identifiers | `{MERCHANT_ID}` | `{PARENT}` |

## Methods

You can query the Merchant Reports API by calling the
[`ReportService.Search`](https://developers.google.com/merchant/api/reference/rest/reports_v1/accounts.reports/search)
method.

## Views

In the Merchant API, table names are changed from `CamelCase` to `snake_case`.

`MerchantPerformanceView` is now `product_performance_view`.

> [!NOTE]
> **Note:** Field names are in `snake_case` when used in API requests. Responses will always return field names in `CamelCase`.

Here's a mapping between table names in the Content API for Shopping and the
Merchant API:

|---|---|
| Content API | Merchant API |
| `MerchantPerformanceView` | `product_performance_view` |
| `ProductView` | `product_view` |
| `PriceCompetitivenesProductView` | `price_competitiveness_product_view` |
| `PriceInsightsProductView` | `price_insights_product_view` |
| `BestSellersBrandView` | `best_sellers_brand_view` |
| `BestSellersProductClusterView` | `best_sellers_product_cluster_view` |
| `CompetitiveVisibilityCompetitorView` | `competitive_visibility_competitor_view` |
| `CompetitiveVisibilityTopMerchantView` | `competitive_visibility_top_merchant_view` |
| `CompetitiveVisibilityBenchmarkView` | `competitive_visibility_benchmark_view` |

In the Merchant API, specifying a field prefix, for example, `segments.offer_id`
is no longer required. Instead, just use the field name, `offer_id`.

Here's a sample comparison of queries in the Content API for Shopping and the
Merchant API:

|---|---|
| Content API | Merchant API |
| ``` SELECT segments.offer_id, metrics.clicks FROM MerchantPerformanceView WHERE segments.date DURING LAST_7_DAYS ``` | ``` SELECT offer_id, clicks FROM product_performance_view WHERE date DURING LAST_7_DAYS ``` |

Here's a sample response:

|---|---|
| Content API | Merchant API |
| ``` { "segments":{ "offerId":"abc" }, "metrics":{ "clicks":"123" } } ``` | ``` { "productPerformanceView" : { "offerId": "abc", "clicks": "123" } } ``` |

The table name can be used as a field prefix. For example, both `offer_id` and
`product_performance_view.offer_id` are accepted in the Merchant API query.

### Performance

Here's what's changed for the performance view in the Merchant Reports API:

|---|---|---|
| Content API | Merchant API | Description |
| `segments.program`: string | `marketing_method`: string | `program` segment is replaced by a new `marketing_method` field. See the [New `marketing method` values](https://developers.google.com/merchant/api/guides/compatibility/reports#new_marketing_method_values) for details. |
| `metrics.ctr`: double | `clickThroughRate`: double | `ctr` metric is renamed to `clickThroughRate` |
| `metrics.conversionValueMicros`: integer `segments.currencyCode`: string | `conversionValue: { https://developers.google.com/merchant/api/guides/compatibility/overview#price }` | Amount micros and currency fields are merged into one field with `Price` type |
| `metrics.orders, metrics.orderedItems, ...` | Not supported | Buy On Google metrics are not supported in the Merchant Reports API |

#### New marketing method values

Here's the mapping between `segments.program` and `marketing_method` values:

|---|---|
| Content API | Merchant API |
| `SHOPPING_ADS` | `ADS` |
| `FREE_PRODUCT_LISTING` | `ORGANIC` |
| `FREE_LOCAL_PRODUCT_LISTING` | `ORGANIC` |
| `BUY_ON_GOOGLE_LISTING` | Not supported |

### Product

Here's what's changed for the product view in the Merchant Reports API:

|---|---|---|
| Content API | Merchant API | Description |
| `productView.id`: string | `id`: string | The field format changes from `channel:language:targetCountry:offerId` to `channel~language~feedLabel~offerId` |
| `productView.priceMicros`: integer `productView.currencyCode`: string | `price: { https://developers.google.com/merchant/api/guides/compatibility/overview#price }` | Amount micros and currency fields are merged into one field with `Price` type |
| `productView.aggregated_destination_status`: string | `aggregated_reporting_context_status`: string | `aggregated_destination_status` field is renamed to `aggregated_reporting_context_status`, the values have not changed |
| `productView.item_issues: [ { object (ItemIssue) } ]` | `item_issues: [ { object (ItemIssue) } ]` | `ItemIssue` definition has changed |
| Not supported | `feedLabel`: string | `feedLabel` field is introduced |

### Price Insights

Here's what's changed for the price insights view in the Merchant Reports API:

|---|---|---|
| Content API | Merchant API | Description |
| `productView.id`: string | `id`: string | The field format changes from `channel:language:targetCountry:offerId` to `channel~language~feedLabel~offerId` |
| `productView.priceMicros`: integer ` productView.currencyCode`: string | `price: { https://developers.google.com/merchant/api/guides/compatibility/overview#price }` | Amount micros and currency fields are merged into one field with `Price` type |
| `priceInsights.suggestedPriceMicros`: integer `priceInsights.suggestedPriceCurrencyCode`: string | `suggestedPrice: { https://developers.google.com/merchant/api/guides/compatibility/overview#price }` | Amount micros and currency fields are merged into one field with `Price` type |
| `priceInsights.predictedGrossProfitChangeFraction`: double `priceInsights.predictedMonthlyGrossProfitChangeMicros`: integer `priceInsights.predictedMonthlyGrossProfitChangeCurrencyCode`: string | Not supported | Fields related to gross profit change are not supported in the Merchant Reports API |

### Price Competitiveness

Here's what's changed for the price competitiveness view in the Merchant Reports
API:

|---|---|---|
| Content API | Merchant API | Description |
| `productView.id`: string | `id`: string | The field format changes from `channel:language:targetCountry:offerId` to `channel~language~feedLabel~offerId` |
| `productView.priceMicros`: integer `productView.currencyCode`: string | `price: { https://developers.google.com/merchant/api/guides/compatibility/overview#price }` | Amount micros and currency fields are merged into one field with `Price` type |
| `priceCompetitiveness.countryCode`: string | `reportCountryCode`: string | `countryCode` field is renamed to `reportCountryCode` |
| `priceCompetitiveness.benchmarkPriceMicros`: integer `priceCompetitiveness.benchmarkPriceCurrencyCode`: string | `benchmarkPrice: { https://developers.google.com/merchant/api/guides/compatibility/overview#price }` | Amount micros and currency fields are merged into one field with `Price` type |

### Best sellers

Here's what's changed for the best sellers views in the Merchant Reports API:

|---|---|---|
| Content API | Merchant API | Description |
| `bestSellers.countryCode`: string | `reportCountryCode`: string | `countryCode` field is renamed to `reportCountryCode` |
| `bestSellers.categoryId`: int | `reportCategoryId`: int | `categoryId` field is renamed to `reportCategoryId` |

### Competitive visibility

Here's what's changed for the competitive visibility views in the Merchant Reports API:

<br />

|---|---|---|
| Content API | Merchant API | Description |
| `competitiveVisibility.countryCode`: string | `reportCountryCode`: string | `countryCode` field is renamed to `reportCountryCode` |
| `competitiveVisibility.categoryId`: integer | `reportCategoryId`: integer | `categoryId` field is renamed to `reportCategoryId` |

<br />