---
title: "Get product rating"
method: GET
path: "/reviews-and-ratings/api/rating/{productId}"
tags: ["Rating"]
---

# Get product rating

`GET /reviews-and-ratings/api/rating/{productId}`

## Request

- Base URL: `https://storecomponents.myvtex.com`
- URL: `https://storecomponents.myvtex.com/reviews-and-ratings/api/rating/{productId}`
- Auth: one of:
  - API key in header `X-VTEX-API-AppKey` and API key in header `X-VTEX-API-AppToken`
  - API key in header `VtexIdclientAutCookie`

Retrieves the rating of a product.
 ## Permissions

This endpoint does not require [permissions](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3).

## Path parameters

- `productId` string, required

## Headers

- `Content-Type` string, required
- `Accept` string, required

## Response `200`

OK

- object: Response body object.
  - `average` number: Average rating of the product.
  - `totalCount` number: Total amount of ranting of the product.
  - `starsFive` number: Total five-star ratings received by the product.
  - `starsFour` number: Total four-star ratings received by the product.
  - `starsThree` number: Total three-star ratings received by the product.
  - `starsTwo` number: Total two-star ratings received by the product.
  - `starsOne` number: Total one-star ratings received by the product.

## Other responses

- `404`: Not Found

## Changes

- **2025-02-17** `9fe1eca86e36`: 5 info
  - added the optional property `starsFive` to the response with the `200` status
  - added the optional property `starsFour` to the response with the `200` status
  - added the optional property `starsOne` to the response with the `200` status
  - added the optional property `starsThree` to the response with the `200` status
  - …1 more
- **2023-12-21** `7a18272398d1`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/vtex/apis/reviews-and-ratings-api/changes/reviews-and-ratings/api/rating/:productId/get.md)

---

[API](https://skmtc.dev/vtex/apis/reviews-and-ratings-api.md) - [All operations](https://skmtc.dev/vtex/apis/reviews-and-ratings-api/llms.txt) - [OpenAPI document](https://skmtc.dev/vtex/apis/reviews-and-ratings-api/revisions/b3004f2e6a88?raw)
