> For the complete documentation index, see [llms.txt](https://developers.oxylabs.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.oxylabs.io/products/es/web-scraper-api/destinos/motores-de-busqueda/google/viajes-hoteles/detalles-del-hotel.md). Agents can also search and read this documentation through its [MCP server](https://developers.oxylabs.io/~gitbook/mcp).

# Detalles del hotel

Haz scraping de detalles analizados y precios de sitios de reserva para un solo hotel en Google Travel desde el enlace de su página de hotel.

La URL de almacenamiento `google` fuente con `"parse": true` puede devolver datos analizados para una sola página de hotel de Google Travel. Pasa el enlace de la página del hotel como el `URL` para obtener sus detalles, valoraciones de huéspedes y los sitios de reservas que lo ofrecen.

{% hint style="info" %}
Para encontrar hoteles primero, usa el [**Viajes: Hoteles**](https://developers.oxylabs.io/products/es/web-scraper-api/destinos/motores-de-busqueda/google/viajes-hoteles.md) scraper, que devuelve resultados de búsqueda de hoteles.
{% endhint %}

## Obteniendo la URL del hotel

Puedes obtener el enlace de la página del hotel de dos maneras:

* `details_url` resultado de un [Viajes: Hoteles](https://developers.oxylabs.io/products/es/web-scraper-api/destinos/motores-de-busqueda/google/viajes-hoteles.md) resultado de búsqueda.
* Usando [Viajes: Hoteles](https://developers.oxylabs.io/products/es/web-scraper-api/destinos/motores-de-busqueda/google/viajes-hoteles.md) devuelto `property_token` (p. ej. `https://www.google.com/travel/hotels/entity/<property_token>`)

## Ejemplos de solicitud

En este ejemplo, hacemos una solicitud para recuperar detalles analizados de un solo hotel mediante su enlace de página de Google Travel.

{% tabs %}
{% tab title="cURL" %}

```shell
curl 'https://data.oxylabs.io/v1/queries' \
--user 'USERNAME:PASSWORD' \
-H 'Content-Type: application/json' \
-d '{
        "source": "google",
        "url": "https://www.google.com/travel/hotels/entity/ChkInMKgie3-lY1lGg0vZy8xMXJ0X3M0dno0EAE",
        "parse": true
    }'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
from pprint import pprint

# Structure payload.
payload = {
    'source': 'google',
    'url': 'https://www.google.com/travel/hotels/entity/ChkInMKgie3-lY1lGg0vZy8xMXJ0X3M0dno0EAE',
    'parse': True
}

# Get response.
response = requests.request(
    'POST',
    'https://data.oxylabs.io/v1/queries',
    auth=('USERNAME', 'PASSWORD'),
    json=payload,
)

# Print prettified response to stdout.
pprint(response.json())
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
const https = require("https");

const username = "USERNAME";
const password = "PASSWORD";
const body = {
    source: "google",
    url: "https://www.google.com/travel/hotels/entity/ChkInMKgie3-lY1lGg0vZy8xMXJ0X3M0dno0EAE",
    parse: true,
};

const options = {
    hostname: "data.oxylabs.io",
    path: "/v1/queries",
    method: "POST",
    headers: {
        "Content-Type": "application/json",
        Authorization:
            "Basic " + Buffer.from(`${username}:${password}`).toString("base64"),
    },
};

const request = https.request(options, (response) => {
    let data = "";

    response.on("data", (chunk) => {
        data += chunk;
    });

    response.on("end", () => {
        const responseData = JSON.parse(data);
        console.log(JSON.stringify(responseData, null, 2));
    });
});

request.on("error", (error) => {
    console.error("Error:", error);
});

request.write(JSON.stringify(body));
request.end();
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php

$params = array(
    'source' => 'google',
    'url' => 'https://www.google.com/travel/hotels/entity/ChkInMKgie3-lY1lGg0vZy8xMXJ0X3M0dno0EAE',
    'parse' => true
);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://data.oxylabs.io/v1/queries");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_USERPWD, "USERNAME" . ":" . "PASSWORD");


$headers = array();
$headers[] = "Content-Type: application/json";
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
echo $result;

if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close($ch);
```

{% endtab %}

{% tab title="Golang" %}

```go
package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "io/ioutil"
    "net/http"
)

func main() {
    const Username = "USERNAME"
    const Password = "PASSWORD"

    payload := map[string]interface{}{
        "source": "google",
        "url":    "https://www.google.com/travel/hotels/entity/ChkInMKgie3-lY1lGg0vZy8xMXJ0X3M0dno0EAE",
        "parse":  true,
    }

    jsonValue, _ := json.Marshal(payload)

    client := &http.Client{}
    request, _ := http.NewRequest("POST",
        "https://data.oxylabs.io/v1/queries",
        bytes.NewBuffer(jsonValue),
    )

    request.SetBasicAuth(Username, Password)
    response, _ := client.Do(request)

    responseText, _ := ioutil.ReadAll(response.Body)
    fmt.Println(string(responseText))
}
```

{% endtab %}

{% tab title="C#" %}

```csharp
using System;
using System.Net.Http;
using System.Net.Http.Json;
using System.Threading.Tasks;

namespace OxyApi
{
    class Program
    {
        static async Task Main()
        {
            const string Username = "USERNAME";
            const string Password = "PASSWORD";

            var parameters = new {
                source = "google",
                url = "https://www.google.com/travel/hotels/entity/ChkInMKgie3-lY1lGg0vZy8xMXJ0X3M0dno0EAE",
                parse = true
            };

            var client = new HttpClient();

            Uri baseUri = new Uri("https://data.oxylabs.io");
            client.BaseAddress = baseUri;

            var requestMessage = new HttpRequestMessage(HttpMethod.Post, "/v1/queries");
            requestMessage.Content = JsonContent.Create(parameters);

            var authenticationString = $"{Username}:{Password}";
            var base64EncodedAuthenticationString = Convert.ToBase64String(System.Text.ASCIIEncoding.UTF8.GetBytes(authenticationString));
            requestMessage.Headers.Add("Authorization", "Basic " + base64EncodedAuthenticationString);

            var response = await client.SendAsync(requestMessage);
            var contents = await response.Content.ReadAsStringAsync();

            Console.WriteLine(contents);
        }
    }
}
```

{% endtab %}

{% tab title="Java" %}

```java
package org.example;

import okhttp3.*;
import org.json.JSONObject;
import java.util.concurrent.TimeUnit;

public class Main implements Runnable {
    private static final String AUTHORIZATION_HEADER = "Authorization";
    public static final String USERNAME = "USERNAME";
    public static final String PASSWORD = "PASSWORD";

    public void run() {
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("source", "google");
        jsonObject.put("url", "https://www.google.com/travel/hotels/entity/ChkInMKgie3-lY1lGg0vZy8xMXJ0X3M0dno0EAE");
        jsonObject.put("parse", true);

        Authenticator authenticator = (route, response) -> {
            String credential = Credentials.basic(USERNAME, PASSWORD);
            return response
                    .request()
                    .newBuilder()
                    .header(AUTHORIZATION_HEADER, credential)
                    .build();
        };

        var client = new OkHttpClient.Builder()
                .authenticator(authenticator)
                .build();

        var mediaType = MediaType.parse("application/json; charset=utf-8");
        var body = RequestBody.create(jsonObject.toString(), mediaType);
        var request = new Request.Builder()
                .url("https://data.oxylabs.io/v1/queries")
                .post(body)
                .build();

        try (var response = client.newCall(request).execute()) {
            if (response.body() != null) {
                try (var responseBody = response.body()) {
                    System.out.println(responseBody.string());
                }
            }
        } catch (Exception exception) {
            System.out.println("Error: " + exception.getMessage());
        }

        System.exit(0);
    }

    public static void main(String[] args) {
        new Thread(new Main()).start();
    }
}
```

{% endtab %}

{% tab title="JSON" %}

```json
{
    "source": "google",
    "url": "https://www.google.com/travel/hotels/entity/ChkInMKgie3-lY1lGg0vZy8xMXJ0X3M0dno0EAE",
    "parse": true
}
```

{% endtab %}
{% endtabs %}

Usamos el [**Push-Pull**](https://developers.oxylabs.io/products/es/web-scraper-api/integration-methods/push-pull.md) método de integración en nuestros ejemplos. Enviar un trabajo devuelve inmediatamente el ID del trabajo, no el resultado. Una vez que el estado del trabajo es `completado`, recupera los resultados con `GET https://data.oxylabs.io/v1/queries/{job_id}/results`. Consulta [**Push-Pull**](https://developers.oxylabs.io/products/es/web-scraper-api/integration-methods/push-pull.md) para comprobar el estado del trabajo, los callbacks y las consultas por lotes.

## Parámetros de la solicitud

<table><thead><tr><th width="164">Parámetro</th><th width="471.3333333333333">Descripción</th><th width="116">Valor predeterminado</th></tr></thead><tbody><tr><td><mark style="background-color:green;"><strong><code>source</code></strong></mark></td><td>Configura el scraper. Usa <code>google</code>.</td><td>–</td></tr><tr><td><mark style="background-color:green;"><strong><code>URL</code></strong></mark></td><td>Enlace de la página del hotel de Google Travel, p. ej. <code>https://www.google.com/travel/hotels/entity/&#x3C;property_token></code>. Consulta <strong>Obteniendo la URL del hotel</strong>.</td><td>–</td></tr><tr><td><mark style="background-color:green;"><strong><code>parse</code></strong></mark></td><td>Devuelve datos analizados cuando se establece en <code>true</code>. Requerido para recibir la salida estructurada descrita en el <strong>diccionario de salida</strong>.</td><td><code>false</code></td></tr><tr><td><code>render</code></td><td>Habilita el renderizado de JavaScript cuando se establece en <code>html</code>. <strong>Más información.</strong></td><td>–</td></tr><tr><td><code>callback_url</code></td><td>URL a tu endpoint de callback. <strong>Más información.</strong></td><td>–</td></tr><tr><td><code>user_agent_type</code></td><td>Tipo de dispositivo y navegador. La lista completa se puede encontrar <strong>aquí</strong>.</td><td><code>escritorio</code></td></tr></tbody></table>

&#x20;   \- parámetro obligatorio

## Datos estructurados

Web Scraper API puede extraer resultados HTML o una respuesta JSON que contiene datos estructurados sobre varios elementos de la página del hotel.

<details>

<summary>Salida estructurada (JSON)</summary>

```json
{
    "results": [
        {
            "content": {
                "parse_status_code": 12000,
                "results": {
                    "address": "17 Bd Morland, 75004 Paris, France",
                    "coordinates": [
                        48.8501611,
                        2.3628378999999997
                    ],
                    "fid": "0x47e671f93cda1a8d:0x651a57f6d128211c",
                    "name": "The People",
                    "overview": {
                        "address": "17 Bd Morland, 75004 Paris, France",
                        "available": true,
                        "coordinates": {
                            "latitude": 48.8501611,
                            "longitude": 2.3628378999999997
                        },
                        "currency": "USD",
                        "fid": "0x47e671f93cda1a8d:0x651a57f6d128211c",
                        "phone": "+33 1 81 22 40 88",
                        "requested": {
                            "end_date": "2026-11-06",
                            "start_date": "2026-11-05"
                        },
                        "reviews_ratings": {
                            "rating": 4,
                            "reviews_by_stars": {
                                "1": "11%",
                                "2": "6%",
                                "3": "9%",
                                "4": "18%",
                                "5": "56%"
                            },
                            "reviews_cnt": 1953
                        },
                        "title": "The People"
                    },
                    "phone": "+33 1 81 22 40 88",
                    "prices": [
                        {
                            "cost": {
                                "currency": "USD",
                                "value": 85
                            },
                            "link": "https://www.google.com/travel/lodging/clk?pc=AJ0xEygFmf7LObgt...&pcurl=https://secure-hotel-tracker.com/gha/landing.php?...",
                            "logo": "https://www.gstatic.com/travel-hotels/branding/icon_default.png",
                            "price": {
                                "currency": "USD",
                                "value": 85
                            },
                            "title": "The People"
                        },
                        {
                            "cost": {
                                "currency": "USD",
                                "value": 94
                            },
                            "link": "https://www.google.com/travel/lodging/clk?pc=AJ0xEyixW2JiNEf2...&pcurl=https://www.booking.com/searchresults.en.html?...",
                            "logo": "https://www.gstatic.com/travel-hotels/branding/icon_184.png",
                            "price": {
                                "currency": "USD",
                                "value": 94
                            },
                            "title": "Booking.com"
                        },
                        {
                            "cost": {
                                "currency": "USD",
                                "value": 247
                            },
                            "link": "https://www.google.com/travel/lodging/clk?pc=AJ0xEyjXiM8NBzfe...&pcurl=https://www.expedia.com/Hotel-Search?...",
                            "logo": "https://www.gstatic.com/travel-hotels/branding/ac238c97-1652-4830-8da8-bb8d8883af88.png",
                            "price": {
                                "currency": "USD",
                                "value": 247
                            },
                            "title": "Expedia.com"
                        }
                    ]
                },
                "url": "https://www.google.com/travel/hotels/entity/ChkInMKgie3-lY1lGg0vZy8xMXJ0X3M0dno0EAE"
            },
            "created_at": "2026-11-04 11:10:11",
            "is_render_forced": false,
            "job_id": "7523703137538935809",
            "page": 1,
            "parser_preset": null,
            "parser_type": "google_travel_hotel_entity",
            "status_code": 200,
            "type": "parsed",
            "updated_at": "2026-11-04 11:10:18",
            "url": "https://www.google.com/travel/hotels/entity/ChkInMKgie3-lY1lGg0vZy8xMXJ0X3M0dno0EAE"
        }
    ]
}
```

</details>

### Diccionario de salida

La tabla siguiente presenta una lista detallada de cada elemento de nivel superior que analizamos, junto con su descripción y tipo de dato.

{% hint style="info" %}
Algunos campos pueden variar según el hotel y los datos disponibles para él.
{% endhint %}

<table data-full-width="false"><thead><tr><th width="275">Clave</th><th width="385">Descripción</th><th width="106">Tipo</th></tr></thead><tbody><tr><td><code>URL</code></td><td>URL de la página de detalles del hotel de Google Travel.</td><td>cadena</td></tr><tr><td><code>parse_status_code</code></td><td>El código de estado del trabajo de análisis. Más información <strong>aquí</strong>.</td><td>entero</td></tr><tr><td><code>results.name</code></td><td>Nombre del hotel.</td><td>cadena</td></tr><tr><td><code>results.address</code></td><td>Dirección completa del hotel.</td><td>cadena</td></tr><tr><td><code>results.phone</code></td><td>Número de teléfono del hotel.</td><td>cadena</td></tr><tr><td><code>results.coordinates</code></td><td>Ubicación del hotel como <code>[latitude, longitude]</code>.</td><td>arreglo</td></tr><tr><td><code>results.fid</code></td><td>El identificador único de lugar de Google para el hotel.</td><td>cadena</td></tr><tr><td><code>results.overview</code></td><td>Detalles generales sobre el hotel y la estancia solicitada. Incluye <code>available</code>, <code>currency</code>, <code>requested</code>, <code>reviews_ratings</code>.</td><td>objeto</td></tr><tr><td><code>results.overview.available</code></td><td>Si el hotel tiene disponibilidad para las fechas solicitadas.</td><td>booleano</td></tr><tr><td><code>results.overview.currency</code></td><td>Moneda de todos los precios en la respuesta.</td><td>cadena</td></tr><tr><td><code>results.overview.requested</code></td><td>Fechas de la estancia a las que se aplican los precios. Incluye <code>start_date</code>, <code>end_date</code>.</td><td>objeto</td></tr><tr><td><code>results.overview.reviews_ratings</code></td><td>Resumen de valoraciones de huéspedes. Incluye <code>rating</code> (puntuación general, p. ej. <code>4.5</code>), <code>reviews_cnt</code> (número total de reseñas), <code>reviews_by_stars</code> (proporción de reseñas por valor de estrellas 1–5).</td><td>objeto</td></tr><tr><td><code>results.prices</code></td><td>Lista de sitios de reserva que ofrecen el hotel. Incluye <code>title</code> (nombre del sitio de reserva), <code>price</code> (precio por noche: <code>value</code>, <code>currency</code>), <code>cost</code> (precio total de la estancia: <code>value</code>, <code>currency</code>), <code>link</code> (redirige a la oferta del sitio de reserva).</td><td>arreglo</td></tr><tr><td><code>results.additional_results</code></td><td>Lista de sitios de reserva que ofrecen el hotel sin mostrar un precio. Incluye <code>title</code> (nombre del sitio de reserva), <code>link</code> (redirige al sitio de reserva).</td><td>arreglo</td></tr><tr><td><code>created_at</code></td><td>Marca de tiempo en que se creó el trabajo de scraping.</td><td>marca de tiempo</td></tr><tr><td><code>updated_at</code></td><td>Marca de tiempo en que se terminó el trabajo de scraping.</td><td>marca de tiempo</td></tr><tr><td><code>job_id</code></td><td>ID del trabajo asociado con el trabajo de scraping.</td><td>cadena</td></tr><tr><td><code>status_code</code></td><td>Código de estado del trabajo de scraping. Más información <strong>aquí</strong>.</td><td>entero</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developers.oxylabs.io/products/es/web-scraper-api/destinos/motores-de-busqueda/google/viajes-hoteles/detalles-del-hotel.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
