scraper
Back to API docs

Overview

  • Overview

SERP

  • POSTSERP

Core

  • POSTGeocode
  • POSTTranslate
  • POSTSearch
  • POSTVision
  • POSTPlaces Search
  • POSTPlace Details
  • POSTPlaces Nearby
  • POSTAutocomplete

Maps

  • POSTSearch
  • POSTPlace Details
  • POSTReviews

Hotels

  • POSTSearch
  • POSTDetail
  • POSTReviews
  • POSTPhotos

Play

  • POSTReviews

Flights

  • POSTOne-way Search
  • POSTCalendar
  • POSTExplore

Jobs

  • POSTJobs Search

Finance

  • POSTQuote
  • POSTFundamentals
  • POSTChart
  • POSTNews
  • POSTSearch
  • POSTEstimates
  • POSTEarnings

Hotel Reviews

2 credits

Get guest reviews for a hotel with sorting and search filters.

POST/api/v1/tools/google/hotels/reviews

Parameters

hotelUrlstring

An HTTPS Google Hotels entity URL with the path /travel/hotels/entity/{bookingToken}. The maximum length is 4,096 characters. Provide exactly one target: hotelUrl, bookingToken, propertyId, or hotelUrls. The request body is strict. Unknown fields are rejected.

bookingTokenstring

The bookingToken from a Search result. This is the preferred target. It can contain letters, numbers, underscores, and hyphens. The maximum length is 2,048 characters. Provide exactly one target.

propertyIdstring

Deprecated input alias for bookingToken. The value must be a booking token even though this input is named propertyId. Provide exactly one target.

hotelUrlsstring[]

From 1 to 20 Google Hotels entity URLs in one call. Each URL follows the rules of hotelUrl. Use it instead of the other targets, not with them. Every other parameter applies to each property. The response has data.hotels: one group for each URL, in the same order, with hotelUrl and the fields of a single result. A URL that fails has an empty result and a note, and the other URLs still run. A value that is not an entity URL is skipped: its group has a note, it is not read, and it is not charged. If every entity URL fails, you get the first error and the credits are refunded. If only some URLs fail, the credits are not refunded. The URLs are read 8 at a time inside one 55-second time limit. The call costs 2 credits for each entity URL. A 400 response comes only when no value is an entity URL.

sortstring

The order: "most_helpful", "most_recent", "highest_score", or "lowest_score". The default is "most_helpful".

searchstring

Text to find in reviews. The API removes space at the start and end. The maximum length is 200 characters. An empty value is ignored.

maxReviewsinteger

The maximum number of reviews to return, from 1 to 1,000. The default is 40. The value cannot be more than your plan limit. With hotelUrls, this value times the number of entity URLs cannot be more than your plan limit.

fieldsstring[]

Select result fields. Values must be unique. Use ["*"] alone for all supported fields. If you omit this parameter, the API returns these default fields: "source", "author", "rating", "maxRating", "text", "date", "reviewId", "subRatings", "highlights". Supported fields: "source", "author", "authorUrl", "avatarUrl", "rating", "maxRating", "text", "date", "reviewId", "reviewUrl", "subRatings", "photos", "highlights", "replyText".

Response Schema

dataobject

The Google Hotels reviews result.

hotelsobject[]

Only when the request has hotelUrls. One group for each URL, in the same order. Each group has hotelUrl, reviews, returnedCount, collectedCount, truncated, and note. Then the top-level reviews is not present, and the counts and truncated cover all groups.

notestring

Only in a group of hotels. It says why the URL did not run or did not finish, or that the value is not an entity URL and was skipped. A group with a note has no reviews.

reviewsobject[]

The selected fields for each unique review. Some optional values can be absent.

returnedCountnumber

The number of reviews in this response.

collectedCountnumber

The number of unique reviews collected before maxReviews is applied.

truncatedboolean

True when maxReviews limits the output or when later pagination stops after a non-timeout failure, an invalid page, a repeated token, or no progress. A request deadline returns HTTP 503.

metaobject

Request metadata.

toolstring

The tool name.

creditsUsednumber

The request cost. The value is 2. A request with searches costs 2 for each valid entry. A request with hotelUrls costs 2 for each entity URL.

requestIdstring

The unique request ID.

Request

curl -X POST https://scraper.run/api/v1/tools/google/hotels/reviews \
-H "Authorization: Bearer sc_live_..." \
-H "Content-Type: application/json" \
-d '{
"bookingToken": "ChkIq_atzbv20-8ZGg0vZy8xMXFoMzRoa3pfEAE",
"sort": "most_recent",
"maxReviews": 2,
"fields": ["reviewId", "author", "rating", "text", "date"]
}'

Response Example

{
"data": {
"reviews": [
{
"reviewId": "review_123",
"author": "A. Guest",
"rating": 5,
"text": "A clean room and helpful staff.",
"date": "2 weeks ago"
}
],
"returnedCount": 1,
"collectedCount": 1,
"truncated": false
},
"meta": {
"tool": "google-hotels-reviews",
"creditsUsed": 2,
"requestId": "req_abc123"
}
}