> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scrapengine.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Shopee Product Reviews

> Get product reviews from Shopee Indonesia by slug or item/shop IDs

## Overview

The `/shopee/product/reviews` endpoint retrieves product reviews from Shopee Indonesia (shopee.co.id) including reviewer information, ratings, comments, images, and seller replies.

<Warning>
  Currently only Indonesia (country=id) is supported. More Southeast Asian markets will be added in future updates.
</Warning>

## Credits

**25 credits** per successful request.

## Parameters

### Query Parameters

<ParamField query="slug" type="string">
  Product slug containing the shop and item IDs (e.g., `Product-Name-i.SHOPID.ITEMID`).

  If provided, `itemId` and `shopId` are extracted automatically.
</ParamField>

<ParamField query="itemId" type="string">
  The Shopee product item ID (e.g., "22133637031"). Required if `slug` is not provided.
</ParamField>

<ParamField query="shopId" type="string">
  The Shopee shop/seller ID (e.g., "12651109"). Required if `slug` is not provided.
</ParamField>

<ParamField query="country" type="string" required>
  Country code. Currently only `id` (Indonesia) is supported.
</ParamField>

<ParamField query="limit" type="number" default="20">
  Number of reviews to return (max 50).
</ParamField>

<ParamField query="offset" type="number" default="0">
  Offset for pagination. Use this to fetch additional reviews.
</ParamField>

<ParamField query="rating" type="number">
  Filter by star rating (1-5). Leave empty or 0 to get all ratings.
</ParamField>

<ParamField query="filter" type="number" default="0">
  Filter type:

  * `0` = All reviews
  * `1` = Reviews with comments only
  * `2` = Reviews with media (images/videos) only
</ParamField>

<Note>
  Either `slug` OR both `itemId` and `shopId` must be provided.
</Note>

## Example Requests

### Get Reviews by Slug (Recommended)

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://api.scrapengine.io/api/v1/shopee/product/reviews?slug=Gantungan-Handphone-Kristal-Ungu-i.12651109.22133637031&country=id&limit=10" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```javascript JavaScript theme={null}
  const params = new URLSearchParams({
    slug: "Gantungan-Handphone-Kristal-Ungu-i.12651109.22133637031",
    country: "id",
    limit: "10",
  });

  const response = await fetch(
    `https://api.scrapengine.io/api/v1/shopee/product/reviews?${params}`,
    {
      headers: {
        Authorization: "Bearer YOUR_API_KEY",
      },
    }
  );

  const data = await response.json();
  console.log(data);
  ```

  ```python Python theme={null}
  import requests

  url = "https://api.scrapengine.io/api/v1/shopee/product/reviews"
  headers = {"Authorization": "Bearer YOUR_API_KEY"}
  params = {
      "slug": "Gantungan-Handphone-Kristal-Ungu-i.12651109.22133637031",
      "country": "id",
      "limit": 10
  }

  response = requests.get(url, headers=headers, params=params)
  print(response.json())
  ```
</CodeGroup>

### Get Reviews by IDs with Filters

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://api.scrapengine.io/api/v1/shopee/product/reviews?shopId=12651109&itemId=22133637031&country=id&rating=5&filter=1" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```javascript JavaScript theme={null}
  const params = new URLSearchParams({
    shopId: "12651109",
    itemId: "22133637031",
    country: "id",
    rating: "5",
    filter: "1",
  });

  const response = await fetch(
    `https://api.scrapengine.io/api/v1/shopee/product/reviews?${params}`,
    {
      headers: {
        Authorization: "Bearer YOUR_API_KEY",
      },
    }
  );

  const data = await response.json();
  console.log(data);
  ```

  ```python Python theme={null}
  import requests

  url = "https://api.scrapengine.io/api/v1/shopee/product/reviews"
  headers = {"Authorization": "Bearer YOUR_API_KEY"}
  params = {
      "shopId": "12651109",
      "itemId": "22133637031",
      "country": "id",
      "rating": 5,
      "filter": 1
  }

  response = requests.get(url, headers=headers, params=params)
  print(response.json())
  ```
</CodeGroup>

### Paginated Reviews

<CodeGroup>
  ```bash cURL theme={null}
  # First page
  curl -X GET "https://api.scrapengine.io/api/v1/shopee/product/reviews?shopId=12651109&itemId=22133637031&country=id&limit=20&offset=0" \
    -H "Authorization: Bearer YOUR_API_KEY"

  # Second page
  curl -X GET "https://api.scrapengine.io/api/v1/shopee/product/reviews?shopId=12651109&itemId=22133637031&country=id&limit=20&offset=20" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```python Python theme={null}
  import requests

  url = "https://api.scrapengine.io/api/v1/shopee/product/reviews"
  headers = {"Authorization": "Bearer YOUR_API_KEY"}

  all_reviews = []
  offset = 0
  limit = 20

  while True:
      params = {
          "shopId": "12651109",
          "itemId": "22133637031",
          "country": "id",
          "limit": limit,
          "offset": offset
      }
      response = requests.get(url, headers=headers, params=params)
      data = response.json()

      all_reviews.extend(data["reviews"])

      if not data["hasMore"]:
          break

      offset += limit

  print(f"Total reviews fetched: {len(all_reviews)}")
  ```
</CodeGroup>

## Response

### Success Response (200)

Returns product reviews with metadata:

```json theme={null}
{
  "itemId": "22133637031",
  "shopId": "12651109",
  "reviews": [
    {
      "id": "1234567890",
      "author": {
        "userId": "98765432",
        "username": "buyer_123",
        "avatar": "https://down-id.img.susercontent.com/file/avatar.jpg"
      },
      "rating": 5,
      "comment": "Produk bagus, sesuai deskripsi. Pengiriman cepat!",
      "createdAt": 1706400000,
      "createdAtDisplay": "28 Januari 2024",
      "images": [
        "https://down-id.img.susercontent.com/file/review-image-1.jpg",
        "https://down-id.img.susercontent.com/file/review-image-2.jpg"
      ],
      "videos": [],
      "likeCount": 5,
      "productVariant": "Type-C",
      "isAnonymous": false,
      "sellerReply": "Terima kasih sudah berbelanja!"
    }
  ],
  "totalReviews": 116,
  "ratingAverage": 4.78,
  "ratingBreakdown": {
    "oneStar": 2,
    "twoStar": 0,
    "threeStar": 4,
    "fourStar": 9,
    "fiveStar": 101
  },
  "hasMore": true,
  "offset": 0,
  "limit": 20,
  "country": "id"
}
```

### Response Headers

| Header                | Description                       |
| --------------------- | --------------------------------- |
| `x-remaining-credits` | Number of API credits remaining   |
| `x-trace-id`          | Unique identifier for the request |

### Error Responses

| Status | Description                                                         |
| ------ | ------------------------------------------------------------------- |
| `400`  | Bad Request - Missing slug or itemId/shopId, or unsupported country |
| `401`  | Unauthorized - Invalid or missing API key                           |
| `404`  | Not Found - Product not found                                       |
| `500`  | Internal Server Error                                               |

## Use Cases

* **Sentiment analysis**: Analyze customer feedback and satisfaction
* **Product quality monitoring**: Track reviews to identify quality issues
* **Competitive analysis**: Compare review quality across similar products
* **Review aggregation**: Collect and display reviews in your own system
* **Customer insights**: Understand what buyers like or dislike about products

## Notes

* This endpoint uses renderless scraping (direct API call), making it very fast
* Reviews are returned in chronological order (newest first by default)
* Anonymous reviews will have limited author information
* The `hasMore` field indicates if pagination should continue
* Seller replies are included when available
