---
updatedAt: 2026-10-29T11:54:48.000Z
agentTools:
  projectIndex: https://docs.yotpo.com/llms.txt
---

# Product Star Rating

Retrieve the average star-rating and review count for a specific product by `external_product_id`.

## Product Star Rating - Response Attributes

<Table align={["left","left"]}>
  <thead>
    <tr>
      <th style={{ textAlign: "left" }}>
        Attribute
      </th>

      <th style={{ textAlign: "left" }}>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td style={{ textAlign: "left" }}>
        `external_product_id`
      </td>

      <td style={{ textAlign: "left" }}>
        The external product ID
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        `average_score`
      </td>

      <td style={{ textAlign: "left" }}>
        The average star-rating of the product
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        `total_reviews`
      </td>

      <td style={{ textAlign: "left" }}>
        The total number of reviews about the product
      </td>
    </tr>
  </tbody>
</Table>

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "App partners API",
    "description": "Endpoints for apps that Yotpo merchants install. The app-level webhook is defined separately, in webhooks.json.",
    "version": "2"
  },
  "servers": [
    {
      "url": "https://developers.yotpo.com"
    }
  ],
  "security": [
    {
      "X-Yotpo-Token": []
    }
  ],
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "paths": {
    "/v2/{account_id}/star_rating/products/{external_product_id}": {
      "get": {
        "summary": "Product Star Rating",
        "description": "Retrieve the average star-rating and review count for a specific product by `external_product_id`.",
        "operationId": "bottomline",
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "description": "Your account's API app key",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "external_product_id",
            "in": "path",
            "description": "The `external_product_id` value. Can be retrieved using [All Reviews](ref:all-reviews)",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"status\": {\n        \"code\": 200,\n        \"message\": \"OK\"\n    },\n    \"pagination\": null,\n    \"product_star_rating\": {\n        \"external_product_id\": \"376700306\",\n        \"average_score\": 4.5,\n        \"total_reviews\": 15527\n    }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "integer",
                          "example": 200,
                          "default": 0
                        },
                        "message": {
                          "type": "string",
                          "example": "OK"
                        }
                      }
                    },
                    "pagination": {},
                    "product_star_rating": {
                      "type": "object",
                      "properties": {
                        "external_product_id": {
                          "type": "string",
                          "example": "376700306"
                        },
                        "average_score": {
                          "type": "number",
                          "example": 4.5,
                          "default": 0
                        },
                        "total_reviews": {
                          "type": "integer",
                          "example": 15527,
                          "default": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid access token. Send a valid token in the `X-Yotpo-Token` header.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing token": {
                    "summary": "No token sent (or sent as Authorization: Bearer)",
                    "value": {
                      "error": "invalid_request",
                      "error_description": "The access token is missing"
                    }
                  },
                  "Invalid token": {
                    "summary": "Token unknown, revoked or for another app",
                    "value": {
                      "error": "invalid_token",
                      "error_description": "The access token is invalid or has expired"
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "OAuth error code: `invalid_request` when no token was sent, `invalid_token` when the token is unknown, revoked or expired.",
                      "enum": [
                        "invalid_request",
                        "invalid_token"
                      ]
                    },
                    "error_description": {
                      "type": "string",
                      "description": "Human-readable reason for the error."
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "components": {
    "securitySchemes": {
      "X-Yotpo-Token": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Yotpo-Token",
        "description": "Send your app's access token for the merchant's store in the `X-Yotpo-Token` header of every request. To get a token, see [Generate Access Token](ref:generate-a-token). The API also reads the token from an `access_token` query parameter, but that isn't recommended: URLs end up in server and proxy logs. `Authorization: Bearer` is not supported."
      }
    }
  }
}
```

# Sibling pages

* [Introduction to Reviews](https://docs.yotpo.com/reference/introduction-to-reviews.md)
* [All Reviews](https://docs.yotpo.com/reference/all-reviews.md)
* [Product Reviews](https://docs.yotpo.com/reference/product-review.md)
* [Review by Review ID](https://docs.yotpo.com/reference/reviews-id.md)
* [Top Reviews](https://docs.yotpo.com/reference/top-reviews.md)
* [Best Reviews](https://docs.yotpo.com/reference/best-reviews.md)
* [Best Sentences](https://docs.yotpo.com/reference/best-sentences.md)
* [Publish/Unpublish Reviews](https://docs.yotpo.com/reference/publishunpublish-reviews.md)