> ## Documentation Index
> Fetch the complete documentation index at: https://help.decodo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Travel Hotels

> Web Scraping API Google Travel Hotels Template

The `google_travel_hotels` template is built to obtain Google Travel service's hotel search results.

<Note>
  ### Useful Links

  * [**Real-time**](https://help.decodo.com/docs/web-scraping-api-real-time-requests) and [**Asynchronous**](https://help.decodo.com/docs/web-scraping-api-asynchronous-requests) integration methods are available for this template.
  * [**Batch**](https://help.decodo.com/docs/web-scraping-api-asynchronous-requests#queue-multiple-tasks) requests are also supported.
</Note>

## Input Parameters

Request parameters available for the Google Travel Hotels template:

| Parameter     | Type        | Required | Description                                                                                                                                                           |
| ------------- | ----------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `target`      | string      | ✅        | Target type must be set to `google_travel_hotels`.                                                                                                                    |
| `query`       | string      | ✅        | Search query.                                                                                                                                                         |
| `geo`         | string      |          | Set the country to use when submitting the query.  [**Read more.**](https://help.decodo.com/docs/web-scraping-api-google-geolocation.mdx)                             |
| `locale`      | string      |          | Set the value to change your Google search page web interface language. [**Read more.**](https://help.decodo.com/docs/web-scraping-api-google-interface-localization) |
| `device_type` | string      |          | Specify device type and browser. [**Read more.**](https://help.decodo.com/docs/web-scraping-api-device-types)                                                         |
| `page_from`   | string      |          | Customize the starting page number within the range of `1` to `10`. <br />Default value is `1`.                                                                       |
| `date_range`  | string      |          | Dates from and to. Example: `"2022-11-10,2022-11-20"`.                                                                                                                |
| `stars`       | array\<int> |          | Filter for hotels that have the provided star rating. Example: `[4,5]`. Values must be between `2` and `5`.                                                           |
| `adults`      | integer     |          | Number of adults staying. <br />Default value is `2`.                                                                                                                 |
| `children`    | integer     |          | Number of children staying.                                                                                                                                           |
| `markdown`    | boolean     |          | Set to `true` to receive a Markdown response. [**Read more.**](https://help.decodo.com/docs/web-scraping-api-markdown-response)<br />Default value is `false`.        |

<Warning>
  When using the `geo` parameter, you must use the Google's location name format [**described here**](https://developers.google.com/google-ads/api/data/geotargets). Single country strings (eg. `United States`) may perform poorly, while more specific locations (e.g., `San Francisco,California,United States`) will work better.
</Warning>

### Request Examples

<CodeGroup>
  ```shellscript cURL theme={null}
  # update 'TOKEN VALUE' with your authorization token
  curl --request 'POST' \
          --url 'https://scraper-api.decodo.com/v2/scrape' \
          --header 'Accept: application/json' \
          --header 'Authorization: Basic TOKEN VALUE' \
          --header 'Content-Type: application/json' \
          --data '
      {
        "target": "google_travel_hotels",
        "query": "trivago",
        "page_from": "1",
        "stars": [4,5],
        "adults": 2
      }
  '
  ```

  ```javascript Node theme={null}

  const scrape = async() => {
    const response = await fetch("https://scraper-api.decodo.com/v2/scrape", {
      method: "POST",
      body: JSON.stringify({
        "target": "google_travel_hotels",
        "query": "trivago",
        "page_from": "1",
        "stars": [4,5],
        "adults": 2
      }),
      headers: {
        "Content-Type": "application/json",
        "Authorization": "Basic TOKEN VALUE" // update with your authorization token
      },
    }).catch(error => console.log(error));

    console.log(await response.json())
  }

  scrape()
  ```

  ```python Python theme={null}
  import requests
    
  url = "https://scraper-api.decodo.com/v2/scrape"
    
  payload = {
        "target": "google_travel_hotels",
        "query": "trivago",
        "page_from": "1",
        "stars": [4,5],
        "adults": 2
  }
    
  headers = {
      "accept": "application/json",
      "content-type": "application/json",
      "authorization": "Basic TOKEN VALUE" # update with your authorization token
  }
    
  response = requests.post(url, json=payload, headers=headers)
    
  print(response.text)
  ```
</CodeGroup>

***

<Columns cols={2}>
  <Card title="Support" href="https://direct.lc.chat/12092754" cta="Let's chat!">
    Need help or just want to say hello? Our support is available 24/7. \
    You can also reach us anytime via email at [support@decodo.com](mailto:support@decodo.com).
  </Card>

  <Card title="Feedback" href="mailto:feedback@decodo.com" cta="Share feedback">
    Can't find what you're looking for? Request an article! \
    Have feedback? Share your thoughts on how we can improve.
  </Card>
</Columns>
