Interface language English
SDK engine

Google Hotel Reviews

Reviews of a specific hotel by property_token with category, source, sorting and pagination filters.

engine: google_hotels_reviews TS: XylopSearchEngines.GoogleHotelsReviews JS: XylopSearchEngines.GoogleHotelsReviews C#: XylopSearchEngines.GoogleHotelsReviews Python: XylopSearchEngines.GOOGLE_HOTELS_REVIEWS PHP: XylopSearchEngines::GOOGLE_HOTELS_REVIEWS Ruby: XylopApiClient::Engines::GOOGLE_HOTELS_REVIEWS Java: XylopSearchEngines.GOOGLE_HOTELS_REVIEWS Kotlin: XylopSearchEngines.GOOGLE_HOTELS_REVIEWS Swift: XylopSearchEngines.googleHotelsReviews Dart: XylopSearchEngines.googleHotelsReviews C++: xylop::api::engines::google_hotels_reviews Go: xylop.EngineGoogleHotelsReviews GET /search
TypeScript example

Call via @xylop/api-client-typescript

import { XylopSearchClient, XylopSearchEngines } from "@xylop/api-client-typescript";

interface SearchResponse {
  [key: string]: unknown;
}

const client = new XylopSearchClient({
  apiKey: "YOUR_API_KEY"
});

const response = await client.search<SearchResponse>(
  XylopSearchEngines.GoogleHotelsReviews,
  {
    property_token: "hotel property_token",
    hl: "en",
    sort_by: "1",
    source_number: "0",
  });

The TypeScript SDK is written in TypeScript, generates `.d.ts`, supports generic response type and works via `fetch`.

JavaScript example

Call via @xylop/api-client

import { XylopSearchClient, XylopSearchEngines } from "@xylop/api-client";

const client = new XylopSearchClient({
  apiKey: "YOUR_API_KEY"
});

const response = await client.search(
  XylopSearchEngines.GoogleHotelsReviews,
  {
    property_token: "hotel property_token",
    hl: "en",
    sort_by: "1",
    source_number: "0",
  });

JavaScript SDK works in Node.js 18+ and modern browsers via `fetch`; TypeScript declarations are included in the npm package.

C# example

Call via XylopSearchClient

using Xylop.Api.Client;

var client = new XylopSearchClient(new HttpClient(), "YOUR_API_KEY");

using var response = await client.SearchJsonAsync(
    XylopSearchEngines.GoogleHotelsReviews,
    new Dictionary<string, string?>
    {
        ["property_token"] = "hotel property_token",
        ["hl"] = "en",
        ["sort_by"] = "1",
        ["source_number"] = "0",
    });

For typed mode, use `SearchAsync<TResponse>` and the response model from `Xylop.Logic.SerpApiResponses.*`, which is included in the C# SDK.

Python example

Call via xylop-api-client

from xylop_api_client import XylopSearchClient, XylopSearchEngines

client = XylopSearchClient("YOUR_API_KEY")

response = client.search(
    XylopSearchEngines.GOOGLE_HOTELS_REVIEWS,
    {
        "property_token": "hotel property_token",
        "hl": "en",
        "sort_by": "1",
        "source_number": "0",
    },
)

The Python SDK returns JSON as normal `dict`/`list` and does not require runtime dependencies.

PHP example

Call via xylop/api-client

<?php

use Xylop\Api\Client\XylopSearchClient;
use Xylop\Api\Client\XylopSearchEngines;

$client = new XylopSearchClient('YOUR_API_KEY');

$response = $client->search(
    XylopSearchEngines::GOOGLE_HOTELS_REVIEWS,
    [
        'property_token' => 'hotel property_token',
        'hl' => 'en',
        'sort_by' => '1',
        'source_number' => '0',
    ]
);

PHP SDK uses standard stream wrappers, returns a decoded JSON array and does not require runtime dependencies.

Ruby example

Call via xylop-api-client

require "xylop_api_client"

client = XylopApiClient::Client.new(api_key: "YOUR_API_KEY")

response = client.search(
  XylopApiClient::Engines::GOOGLE_HOTELS_REVIEWS,
  {
    "property_token" => "hotel property_token",
    "hl" => "en",
    "sort_by" => "1",
    "source_number" => "0",
  }
)

Ruby SDK uses standard `net/http`, `json` and returns JSON as normal Hash/Array values.

Java example

Call via xylop-api-client

import java.util.Map;
import ru.xylop.api.client.XylopSearchClient;
import ru.xylop.api.client.XylopSearchEngines;

var client = new XylopSearchClient("YOUR_API_KEY");

String responseJson = client.searchJson(
    XylopSearchEngines.GOOGLE_HOTELS_REVIEWS,
    Map.of(
        "property_token", "hotel property_token",
        "hl", "en",
        "sort_by", "1",
        "source_number", "0"
    ));

The Java SDK uses `java.net.http.HttpClient`, returns a JSON string and does not require runtime dependencies.

Kotlin example

Call via xylop-api-kotlin-client

import ru.xylop.api.kotlin.XylopSearchClient
import ru.xylop.api.kotlin.XylopSearchEngines

val client = XylopSearchClient("YOUR_API_KEY")

val responseJson = client.searchJson(
    XylopSearchEngines.GOOGLE_HOTELS_REVIEWS,
    mapOf(
        "property_token" to "hotel property_token",
        "hl" to "en",
        "sort_by" to "1",
        "source_number" to "0",
    ),
)

Kotlin SDK uses the JVM `HttpClient`, returns a JSON string and leaves the JSON mapping to the application.

Swift example

Call via XylopApiClient

import XylopApiClient

let client = XylopSearchClient(apiKey: "YOUR_API_KEY")

let response = try await client.searchJSON(
    engine: XylopSearchEngines.googleHotelsReviews,
    parameters: [
        "property_token": "hotel property_token",
        "hl": "en",
        "sort_by": "1",
        "source_number": "0",
    ]
)

Swift SDK uses Foundation `URLSession`, supports async/await and returns Data, JSONSerialization values or caller-owned Decodable models.

Dart example

Call via xylop_api_client

import 'package:xylop_api_client/xylop_api_client.dart';

Future<void> main() async {
  final client = XylopSearchClient('YOUR_API_KEY');

  final response = await client.search(
    XylopSearchEngines.googleHotelsReviews,
    <String, Object?>{
      'property_token': 'hotel property_token',
      'hl': 'en',
      'sort_by': '1',
      'source_number': '0',
    },
  );

  print(response);
}

The Dart SDK uses `dart:io`, returns decoded JSON or raw response text, and does not require runtime dependencies.

C++ example

Call via Xylop.Api.Cpp

#include <xylop/api/client.hpp>
#include <xylop/api/curl_transport.hpp>

int main()
{
    xylop::api::search_client client(
        "YOUR_API_KEY",
        xylop::api::curl_transport);

    auto response_json = client.search_text(
        xylop::api::engines::google_hotels_reviews,
        {
            {"property_token", "hotel property_token"},
            {"hl", "en"},
            {"sort_by", "1"},
            {"source_number", "0"},
        });

    return 0;
}

The C++ SDK has a header-only C++17 core, accepts a transport callback and can use the optional libcurl adapter `xylop::api::curl_transport`.

Go example

Call via Xylop.Api.Go

package main

import (
    "context"
    "log"

    xylop "github.com/Leonid-Vizel/Xylop.AdminPanel/src/Xylop.Api.Go"
)

func main() {
    client, err := xylop.NewClient("YOUR_API_KEY")
    if err != nil {
        log.Fatal(err)
    }

    var response map[string]any
    err = client.SearchJSON(
        context.Background(),
        xylop.EngineGoogleHotelsReviews,
        xylop.Params(map[string]string{
            "property_token": "hotel property_token",
            "hl": "en",
            "sort_by": "1",
            "source_number": "0",
        }),
        &response)
    if err != nil {
        log.Fatal(err)
    }
}

The Go SDK returns raw JSON bytes or decodes the response into a custom structure, `map[string]any` or another target.

Endpoint

HTTP contract

URL
https://api.xylop.ru/search
Engine
google_hotels_reviews
API key
The SDK is transferred automatically from the client settings.
Input parameters

Request parameters

Parameter Type Required Meaning Description
api_key SDK string Yes — Xylop API key. In the SDK it is set once in the settings or client designer.
engine SDK string Yes google_hotels_reviews Google Hotels Reviews engine.
property_token string Yes hotel property_token A specific hotel token from the Google Hotels Properties API.
hl string No en Language of reviews and interface.
category_token string No reviews_breakdown category_token Filter by review category.
sort_by number No 1 1 helpful, 2 recent, 3 highest, 4 lowest.
source_number number No 0 0 all reviews, -1 Google, or hotel source number.
next_page_token string No pagination.next_page_token Token for the next page of reviews.
Output parameters

Response fields

Field Type Source Description
search_metadata object Sample answer Request metadata: status, identifier, execution time and service information of the provider.
search_parameters object Sample answer The normalized parameters with which the upstream search performed the request.
reviews array Sample answer Reviews, ratings, authors, dates and text fragments.
pagination object Sample answer Pagination data or tokens to move to the next page.
JSON

Sample answer

{
  "search_metadata": {
    "status": "Success",
    "google_hotels_reviews_url": "https://www.google.com/_/TravelFrontendUi/data/batchexecute?..."
  },
  "search_parameters": {
    "engine": "google_hotels_reviews",
    "property_token": "..."
  },
  "reviews": [
    {
      "user": {
        "name": "Sydney Granat",
        "link": "https://www.google.com/maps/contrib/113253605843578019764",
        "thumbnail": "https://example.com/avatar.jpg"
      },
      "source": "Google",
      "rating": 5,
      "best_rating": 5,
      "date": "2 months ago",
      "snippet": "I had an incredible experience at this hotel.",
      "subratings": {
        "rooms": 5,
        "service": 5,
        "location": 5
      },
      "hotel_highlights": [
        "Luxury",
        "Great value"
      ]
    }
  ],
  "pagination": {
    "next_page_token": "..."
  }
}