Product Reviews
Overview
Section titled “Overview”The Product Reviews resource provides fake product review data with ratings, titles, comments, and relationships to products and users.
Endpoints
Section titled “Endpoints”| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/product-reviews | List all product reviews |
| GET | /v1/product-reviews/:id | Get a specific product review |
Product Review Object
Section titled “Product Review Object”{ "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 |
List Product Reviews
Section titled “List Product Reviews”curl https://api.phantomjson.app/v1/product-reviewsQuery Parameters
Section titled “Query Parameters”| 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 |
Response
Section titled “Response”{ "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 }}Get Product Review by ID
Section titled “Get Product Review by ID”curl https://api.phantomjson.app/v1/product-reviews/1Response
Section titled “Response”{ "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" }}Examples
Section titled “Examples”Filter by Product
Section titled “Filter by Product”curl "https://api.phantomjson.app/v1/product-reviews?productId=1"Filter by User
Section titled “Filter by User”curl "https://api.phantomjson.app/v1/product-reviews?userId=1"Filter by Rating
Section titled “Filter by Rating”curl "https://api.phantomjson.app/v1/product-reviews?rating=5"Sort by Date
Section titled “Sort by Date”curl "https://api.phantomjson.app/v1/product-reviews?sort=createdAt:desc"Field Selection
Section titled “Field Selection”curl "https://api.phantomjson.app/v1/product-reviews?fields=id,productId,rating,title"Relations
Section titled “Relations”- Product — Each review belongs to a product (
productId) - User — Each review belongs to a user (
userId)
