Aller au contenu

Product Reviews

Ce contenu n’est pas encore disponible dans votre langue.

The Product Reviews resource provides fake product review data with ratings, titles, comments, and relationships to products and users.

MethodEndpointDescription
GET/v1/product-reviewsList all product reviews
GET/v1/product-reviews/:idGet a specific product review
{
"id": 1,
"productId": 1,
"userId": 1,
"rating": 5,
"title": "Great product!",
"comment": "Really love this keyboard. Highly recommended.",
"createdAt": "2026-01-15T10:30:00.000Z",
"updatedAt": "2026-01-15T10:30:00.000Z"
}
Field Type Description
id number Unique identifier
productId number ID of the product reviewed
userId number ID of the reviewing user
rating number Rating (1–5)
title string Review title
comment string Review body text
createdAt string ISO 8601 timestamp
updatedAt string ISO 8601 timestamp
Terminal window
curl https://api.phantomjson.app/v1/product-reviews
Parameter Type Default Description
page number 1 Page number
limit number 20 Items per page (max: 100)
sort string Sort field and direction
q string Search query
fields string Fields to return
productId number Filter by product ID
userId number Filter by user ID
rating number Filter by rating
{
"data": [
{
"id": 1,
"productId": 1,
"userId": 1,
"rating": 5,
"title": "Great product!",
"comment": "Really love this keyboard."
}
],
"meta": {
"total": 200,
"page": 1,
"limit": 20,
"totalPages": 10
}
}
Terminal window
curl https://api.phantomjson.app/v1/product-reviews/1
{
"data": {
"id": 1,
"productId": 1,
"userId": 1,
"rating": 5,
"title": "Great product!",
"comment": "Really love this keyboard. Highly recommended.",
"createdAt": "2026-01-15T10:30:00.000Z",
"updatedAt": "2026-01-15T10:30:00.000Z"
}
}
Terminal window
curl "https://api.phantomjson.app/v1/product-reviews?productId=1"
Terminal window
curl "https://api.phantomjson.app/v1/product-reviews?userId=1"
Terminal window
curl "https://api.phantomjson.app/v1/product-reviews?rating=5"
Terminal window
curl "https://api.phantomjson.app/v1/product-reviews?sort=createdAt:desc"
Terminal window
curl "https://api.phantomjson.app/v1/product-reviews?fields=id,productId,rating,title"
  • Product — Each review belongs to a product (productId)
  • User — Each review belongs to a user (userId)