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

Flights

  • POSTOne-way Search
  • POSTCalendar
  • POSTExplore

Finance

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

Hotel Photos

2 credits

Get photos for a hotel property.

POST/api/v1/tools/google/hotels/photos

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, or propertyId. 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.

maxPhotosinteger

The maximum number of photos to return, from 1 to 1,000. The default is 40. The value 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: "url", "label", "categoryIds". Supported fields: "url", "label", "categoryIds".

Response Schema

dataobject

The Google Hotels photos result.

photosobject[]

The selected fields for each unique photo.

categoriesobject[]

The available photo categories. This array is not changed by fields.

returnedCountnumber

The number of photos in this response.

collectedCountnumber

The number of unique photos collected before maxPhotos is applied.

truncatedboolean

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

metaobject

Request metadata.

toolstring

The tool name.

creditsUsednumber

The request cost. The value is 2.

requestIdstring

The unique request ID.

Request

curl -X POST https://scraper.run/api/v1/tools/google/hotels/photos \
-H "Authorization: Bearer sc_live_..." \
-H "Content-Type: application/json" \
-d '{
"bookingToken": "ChkIq_atzbv20-8ZGg0vZy8xMXFoMzRoa3pfEAE",
"maxPhotos": 2,
"fields": ["url", "label", "categoryIds"]
}'

Response Example

{
"data": {
"photos": [
{
"url": "https://lh3.googleusercontent.com/p/example",
"label": "Guest room",
"categoryIds": [
6,
14
]
}
],
"categories": [
{
"categoryId": 6,
"name": "Bedroom",
"streetView": false,
"count": 12,
"thumbnailUrl": "https://lh3.googleusercontent.com/p/example-thumb"
}
],
"returnedCount": 1,
"collectedCount": 1,
"truncated": false
},
"meta": {
"tool": "google-hotels-photos",
"creditsUsed": 2,
"requestId": "req_abc123"
}
}