Skip to content

Hotel Reviews

The Hotel Reviews resource provides fake hotel review data with ratings, titles, comments, and user associations.

MethodEndpointDescription
GET/v1/hotel-reviewsList all hotel reviews
GET/v1/hotel-reviews/:idGet a specific hotel review
{
"id": 1,
"hotelId": 1,
"userId": 1,
"rating": 5,
"title": "Amazing stay!",
"comment": "The service was exceptional and the room was pristine.",
"createdAt": "2026-01-15T10:30:00.000Z",
"updatedAt": "2026-01-15T10:30:00.000Z"
}
Field Type Description
id number Unique identifier
hotelId number ID of the hotel
userId number ID of the user
rating number Rating (1–5)
title string Review title
comment string Review comment
createdAt string ISO 8601 timestamp
updatedAt string ISO 8601 timestamp
Terminal window
curl https://api.phantomjson.app/v1/hotel-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
{
"data": [
{
"id": 1,
"hotelId": 1,
"userId": 1,
"rating": 5,
"title": "Amazing stay!",
"comment": "The service was exceptional."
}
],
"meta": {
"total": 150,
"page": 1,
"limit": 20,
"totalPages": 8
}
}
Terminal window
curl https://api.phantomjson.app/v1/hotel-reviews/1
{
"data": {
"id": 1,
"hotelId": 1,
"userId": 1,
"rating": 5,
"title": "Amazing stay!",
"comment": "The service was exceptional and the room was pristine."
}
}
Terminal window
curl "https://api.phantomjson.app/v1/hotel-reviews?q=exceptional"
Terminal window
# Lowest first
curl "https://api.phantomjson.app/v1/hotel-reviews?sort=rating:asc"
# Highest first
curl "https://api.phantomjson.app/v1/hotel-reviews?sort=rating:desc"
Terminal window
# Oldest first
curl "https://api.phantomjson.app/v1/hotel-reviews?sort=createdAt:asc"
# Newest first
curl "https://api.phantomjson.app/v1/hotel-reviews?sort=createdAt:desc"
Terminal window
curl "https://api.phantomjson.app/v1/hotel-reviews?fields=id,hotelId,rating,title"
  • Hotel — Each review belongs to a hotel (hotelId)
  • User — Each review belongs to a user (userId)