Review products using Merchant API

Product reviews are an important part of Shopping experience for customers. These ratings and reviews help customers with product research and purchase decisions. Positive product reviews can drive more qualified customers to a seller's product pages. Sources include sellers, review aggregators, review sites, and Google users.

This page explains how you can manage product reviews using Merchant API.

Prerequisites

Google needs you to provide specific information. You must have the following:

  • An active product review feed in the Google Merchant Center.
  • Your account must be enrolled into the Product ratings program. If you are unsure whether you are already enrolled, check the Merchant Center. If you are not enrolled, learn more about enrolling into the product ratings program.
  • To review products using Merchant API, submit a request using this form.

Create a data source

Use the datasource.create API to create a product review feed. If an existing product review feed is available, use accounts.dataSources.get to fetch the accounts.dataSources.name. The form of the request is as follows:

POST https://merchantapi.googleapis.com/datasources/v1beta/accounts/{account}/dataSources/{datasource}

Example

The example shows a typical request and response.

Request

POST https://merchantapi.googleapis.com/datasources/v1beta/accounts/123/dataSources {"displayName": "test api feed", "productReviewDataSource":{} }

Response

{
  "name": "accounts/123/dataSources/1000000573361824",
  "dataSourceId": "1000000573361824",
  "displayName": "test api feed",
  "productReviewDataSource": {},
  "input": "API"
}

Create product review

You can use the accounts.productreviews.insert method to create or update a product review. The accounts.productreviews.insert method takes a productreview resource and a data source name as input. It returns the new or updated productreview, if successful. To create a product review, you must have a datasource.name.

The form of the request:

POST https://merchantapi.googleapis.com/reviews/v1beta/{parent=accounts/{ACCOUNT_ID}/}productReviews:insert

The following sample request illustrates how you can create a product review.

POST https://merchantapi.googleapis.com/reviews/v1beta/accounts/{ACCOUNT_ID}/productReviews:insert?dataSource=accounts/{ACCOUNT_ID}/dataSources/{DATASOURCE_ID}

  productReviewId = 'my_product_review'
  attributes {
    aggregatorName = 'aggregator_name'
    subclientName = 'subclient_name'
    publisherName = 'publisher_name'
    publisherFavicon = 'https://www.google.com/favicon.ico'
    reviewerId = 'reviewer_id'
    reviewerIsAnonymous = false
    reviewerUsername = 'reviewer_username'
    reviewLanguage = 'en'
    reviewCountry = 'US'
    reviewTime = '2024-04-01T00:00:00Z'
    title = 'Incredible product'
    content = 'This is an incredible product.'
    pros = ['pro1', 'pro2']
    cons = ['con1', 'con2']
    reviewLink = {
      type = 'SINGLETON'
      link = 'https://www.google.com'
    }
    reviewerImageLink = 'https://www.google.com/reviewer.png'
    minRating = 1
    maxRating = 10
    rating = 8.5
    productName = 'product_name'
    productLink = 'https://www.google.com/product'
    asins = ['asin1', 'asin2']
    gtins = ['gtin1', 'gtin2']
    mpns = ['mpn1', 'mpn2']
    skus = ['sku1', 'sku2']
    brands = ['brand1', 'brand2']
    isSpam = false
    collectionMethod = 'POST_FULFILLMENT'
    transactionId = 'transaction_id'
  }

After product review creation, it can take a few minutes for the review to propagate.

View product reviews

To view a product review, use accounts.productreviews.get. This is read-only. It requires your accountId and the ID of the product review as part of the name field. The GET method returns the corresponding product review resource.

GET https://merchantapi.googleapis.com/reviews/v1beta/{name=accounts/{ACCOUNT_ID}/productReviews/*}

List product reviews

You can use the productreviews.list method to view all created product reviews.

GET https://merchantapi.googleapis.com/reviews/v1beta/{parent=accounts/{ACCOUNT_ID}}/productReviews

Delete product reviews

To delete a product review, use accounts.productreviews.delete. Similar to the GET method, this method requires the name field of the product review returned during creation.

DELETE https://merchantapi.googleapis.com/reviews/v1beta/{name=accounts/{ACCOUNT_ID}/productReviews/*}

Product review status

The product review resource contains the status similar to other APIs, which is an integral part of the resource and follows the same issue & destination structure.