# Setting Google Hotel Searches Tasks

**API:** Data API

**Endpoint:** `POST /v1/beta/dataforseo/business_data/google/hotel_searches/task_post`

**Tags:** DataForSEO

Queues a Google Hotels search, returning a task `id`. Wrapped in DataForSEO's envelope: data in `tasks[0].result`, outcome in `tasks[0].status_code` - a rejected request still returns HTTP 200. Retrieve with `get_dataforseo_business_google_hotel_searches_fetch`.

### Pricing reference

- Metering: Reported response cost.
- Reference request estimate: USD 0.2428.
- Reference customer multiplier: 1.0. Do not apply it again to a settled customer amount.

Reference metadata only, not an account quote, a guaranteed price or a spending cap. Resource credits are not Felo credits. Final charges follow Felo billing records.

## Base URL

- `https://openapi.felo.ai`

## Authentication

- `FeloBearerAuth` (http bearer, bearer format Felo API Key)
- `FeloApiKey` (apiKey in header `X-API-Key`)

## Request body

Required: **no**

### application/json

Schema:

```json
{
  "type": "array",
  "items": {
    "type": [
      "object",
      "null"
    ],
    "oneOf": [
      {
        "type": "object",
        "properties": {
          "keyword": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>keyword</em><br>optional field<br>the keyword you specify is used to search for the list of hotels;<br>if you don't use this field, we will return the list of hotels found in a specified location;<br>you can specify <strong>up to 700 characters</strong> in the <code>keyword</code> filed<br><strong>all %## will be decoded (plus character ‘+’ will be decoded to a space character)</strong><br>if you need to use the “%” character for your <code>keyword</code>, please specify it as “%25”; <br><strong>Note:</strong> in order to obtain accurate search results, the location name is appended to the keyword automatically<p>learn more about rules and limitations of <code>keyword</code> and <code>keywords</code> fields in DataForSEO APIs in this <a href=\"https://dataforseo.com/help-center/rules-and-limitations-of-keyword-and-keywords-fields-in-dataforseo-apis\" rel=\"noopener noreferrer\" target=\"_blank\">Help Center article</a>"
          },
          "priority": {
            "type": [
              "integer",
              "null"
            ],
            "description": "<em>task priority</em><br>optional field<br>can take the following values:<br>1 – normal execution priority (set by default)<br>2 – high execution priorityYou will be additionally charged for the tasks with high execution priority.<br>The cost can be calculated on the <a title=\"Pricing\" href=\"https://dataforseo.com/pricing/business-data/google-hotels-api\" target=\"_blank\" rel=\"noopener noreferrer\">Pricing</a> page."
          },
          "location_name": {
            "type": "string",
            "description": "<em>full name of search engine location</em><br><strong>required field if you don't specify <code>location_code</code> or <code>location_coordinate</code></strong><br><strong>if you use this field, you don't need to specify <code>location_code</code> or <code>location_coordinate</code></strong><br>you can receive the list of available locations with <code>location_name</code> by making a separate request to <code>https://api.dataforseo.com/v3/business_data/google/locations</code><br>example:<br><code class=\"long-string\">London,England,United Kingdom</code><br><strong>Note:</strong> in order to obtain accurate search results, the <code>location_name</code> you specify will be automatically appended to the keyword"
          },
          "location_code": {
            "type": "integer",
            "description": "<em>search engine location code</em><br><strong>required field if you don't specify <code>location_name</code>_or <code>location_coordinate</code></strong><br><strong>if you use this field, you don't need to specify <code>location_name</code> or <code>location_coordinate</code></strong><br>you can receive the list of available locations with <code>location_code</code> by making a separate request to the <code>https://api.dataforseo.com/v3/business_data/google/locations</code><br>example:<br><code class=\"long-string\">2840</code>n"
          },
          "location_coordinate": {
            "type": "string",
            "description": "<em>GPS coordinates of a location</em><br><strong>required field if you don't specify <code>location_name</code>_or <code>location_code</code></strong><br><strong>if you use this field, you don't need to specify <code>location_name</code> or <code>location_code</code></strong><br><code>location_coordinate</code> parameter should be specified in the <em>\"latitude,longitude\"</em> format<br>the maximum number of decimal digits for <em>\"latitude\"</em> and <em>\"longitude\"</em>: 7<br><strong>Note</strong>: if the coordinates are used to set a location, the search will occur in the nearest settlement;<br>example:<br><code class=\"long-string\">53.476225,-2.243572</code>"
          },
          "search_this_area": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>show hotels from the displayed area</em><br>optional field<br>can take the values: <code>true</code>, <code>false</code><br>default value: <code>true</code><br>if set to <code>false</code> the <code>search_this_area</code> mode will be turned off<br><strong>Note:</strong> if the <code>search_this_area</code> mode is turned off, the <code>location_name</code> won't be appended to the <code>keyword</code> during search<br>learn more about this parameter <a href=\"https://dataforseo.com/help-center/how-to-use-search_this_area-parameter-in-google-hotel-searches\" target=\"_blank\">on our Help Center</a>"
          },
          "language_name": {
            "type": "string",
            "description": "<em>full name of search engine language</em><br><strong>required field if you don't specify <code>language_code</code></strong><br><strong>if you use this field, you don't need to specify <code>language_code</code></strong><br>you can receive the list of available languages with <code>language_name</code> by making a separate request to <code>https://api.dataforseo.com/v3/business_data/google/languages</code><br>example:<br><code class=\"long-string\">English</code>"
          },
          "language_code": {
            "type": "string",
            "description": "<em>search engine language code</em><br><strong>required field if you don't specify <code>language_name</code></strong><br><strong>if you use this field, you don't need to specify <code>language_name</code></strong><br>you can receive the list of available languages with their <code>language_code</code>_by making a separate request to <code>https://api.dataforseo.com/v3/business_data/google/languages</code><em><br></em>example:<em><br></em><code class=\"long-string\">en</code>"
          },
          "depth": {
            "type": [
              "integer",
              "null"
            ],
            "description": "<em>parsing depth</em><br>optional field<br>number of results in Google Hotels<br>default value: <code>18</code> organic results<br>max value: <code>140</code><br><strong>Note:</strong> your account will be billed per each 18 organic results regardless of paid listings in the response;<br>thus, setting a depth above <code>18</code> may result in additional charges if Google Hotels return more than 18 results;<br>if the specified depth is higher than the number of results in the response, the difference will be refunded automatically to your account balance"
          },
          "check_in": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>check-in date</em><br>optional field<br>if you don't specify this field, tomorrow's date will be used by default;<br>date format: <code>\"yyyy-mm-dd\"</code><br>example:<br><code>\"2019-01-15\"</code><br><strong>Note:</strong> the value cannot precede the today's date"
          },
          "check_out": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>check-out date</em><br>optional field<br>if you don't specify this field, our system will apply the date of two days from now by default;<br>date format: <code>\"yyyy-mm-dd\"</code><br>example:<br><code>\"2019-01-15\"</code><br><strong>Note:</strong> the value cannot be less than or equal to <code>check_in</code>;<br>the range between <code>check_in</code> and <code>check_out</code> values cannot exceed 30 days"
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>currency</em><br>optional field<br>example:<br><code>\"USD\"</code>"
          },
          "adults": {
            "type": [
              "integer",
              "null"
            ],
            "description": "<em>number of adults</em><br>optional field<br>if you don't specify this field, the default value of <code>2</code> will be applied;<br><strong>note</strong> that you can specify up to 6 persons including both adults and children<br>example:<br><code>1</code>"
          },
          "children": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "<em>number and age of children</em><br>optional field<br>if you don't specify this field, no children will be included in the search;<br>age of child can be from <code>0</code> to <code>17</code>;<br><strong>note</strong> that you can specify up to 6 persons including both adults and children<br>set the following value if you want to include one 14-year-old child:<br><code>[14]</code><br>set the following value if you want to include one 13-year-old child and one 8-year-old child:<br><code>[13,8]</code>"
          },
          "stars": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "<em>hotel stars</em><br>optional field<br>set this field to <code>[5]</code> if you want to get the list of 5-star hotels only<br>example:<br><code>[3,4,5]</code>"
          },
          "min_rating": {
            "type": [
              "number",
              "null"
            ],
            "description": "<em>minimum rating</em><br>optional field<br>you can use this field to specify guest rating higher than a certain value<br>example:<br><code>2.5</code>"
          },
          "sort_by": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>results sorting parameters</em><br>optional field<br>you can use this field to sort the results<br>possible types of sorting:<br><code>relevance</code> – sort by most relevant<br><code>lowest_price</code> – sort by the lowest price<br><code>highest_rating</code> – sort by highest rating<br><code>most_reviewed</code> – sort by most reviewed<br>default value: <code>relevance</code>"
          },
          "min_price": {
            "type": [
              "integer",
              "null"
            ],
            "description": "<em>minimum price per night</em><br>optional field<br>the currency of this value depends on the <code>currency</code> field<br>example:<br><code>100</code>"
          },
          "max_price": {
            "type": [
              "integer",
              "null"
            ],
            "description": "<em>maximum price per night</em><br>optional field<br>the currency of this value depends on the <code>currency</code> field<br>example:<br><code>600</code>"
          },
          "free_cancellation": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>hotels with a free cancellation</em><br>optional field<br>set this field to <code>true</code> if you want to get the list of hotels with free cancellation of reservations<br>default value: <code>false</code>"
          },
          "is_vacation_rentals": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>search for vacation rentals</em><br>optional field<br>set this field to <code>true</code> if you want to get the list of vacation rentals instead of hotels<br>default value: <code>false</code>"
          },
          "amenities": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "<em>hotel amenities</em><br>optional field<br>you can use this field to specify different hotel amenities<br>example:<br><code>  [<br>            \"free_parking\",<br>            \"pets_allowed\"<br>        ]<br></code><br>possible values:<br><code>\"air_conditioning\",<br>\"all_inclusive_available\",<br>\"bar\",<br>\"free_breakfast\",<br>\"fitness_center\",<br>\"kid_friendly\",<br>\"free_parking\",<br>\"pets_allowed\",<br>\"pool\",<br>\"restaurant\",<br>\"room_service\",<br>\"spa\",<br>\"free_wifi\",<br>\"parking\",<br>\"indoor_pool\",<br>\"outdoor_pool\",<br>\"wheelchair_accessible\",<br>\"beach_access\"</code>"
          },
          "tag": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>user-defined task identifier</em><br>optional field<br><em>the character limit is 255</em><br>you can use this parameter to identify the task and match it with the result<br>you will find the specified <code>tag</code> value in the <code>data</code> object of the response"
          },
          "postback_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>URL for sending task results</em><br>optional field<br>once the task is completed, we will send a POST request with its results compressed in the <code>gzip</code> format to the <code>postback_url</code> you specified<br>you can use the ‘$id’ string as a <code>$id</code> variable and ‘$tag’ as urlencoded <code>$tag</code> variable. We will set the necessary values before sending the request.<br>example:<br><code>http://your-server.com/postbackscript?id=$id</code><br><code>http://your-server.com/postbackscript?id=$id&amp;tag=$tag</code><br><strong>Note:</strong> special characters in <code>postback_url</code> will be urlencoded; <br>i.a., the <code>#</code> character will be encoded into <code>%23</code><p>learn more on our <a href=\"https://dataforseo.com/help-center/pingbacks-postbacks-with-dataforseo-api\" target=\"_blank\" rel=\"noopener noreferrer\">Help Center</a>"
          },
          "pingback_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>notification URL of a completed task</em><br>optional field<br>when a task is completed we will notify you by GET request sent to the URL you have specified<br>you can use the ‘$id’ string as a <code>$id</code> variable and ‘$tag’ as urlencoded <code>$tag</code> variable. We will set the necessary values before sending the request.<br>example:<br><code>http://your-server.com/pingscript?id=$id</code><br><code>http://your-server.com/pingscript?id=$id&amp;tag=$tag</code><br><strong>Note:</strong> special characters in <code>pingback_url</code> will be urlencoded; <br>i.a., the <code>#</code> character will be encoded into <code>%23</code><p>learn more on our <a href=\"https://dataforseo.com/help-center/pingbacks-postbacks-with-dataforseo-api\" target=\"_blank\" rel=\"noopener noreferrer\">Help Center</a>"
          }
        },
        "example": [
          {
            "language_code": "en",
            "location_name": "New York,New York,United States",
            "keyword": "cheap hotel",
            "check_in": "2023-06-01",
            "check_out": "2023-06-30",
            "currency": "USD",
            "adults": 2,
            "children": [
              "14"
            ],
            "sort_by": "highest_rating",
            "priority": 2,
            "tag": "example"
          }
        ]
      }
    ]
  },
  "example": [
    {
      "language_code": "en",
      "location_name": "New York,New York,United States",
      "keyword": "cheap hotel",
      "check_in": "2023-06-01",
      "check_out": "2023-06-30",
      "currency": "USD",
      "adults": 2,
      "children": [
        "14"
      ],
      "sort_by": "highest_rating",
      "priority": 2,
      "tag": "example"
    }
  ]
}
```

## Responses

### 200 — Successful operation

Headers:
- `X-Request-Id` (string) — Request identifier to include when contacting Felo support.

**application/json**

Schema: object | null

```json
{
  "type": [
    "object",
    "null"
  ],
  "oneOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_BusinessDataGoogleHotelSearchesTaskPostResponseInfo"
    }
  ]
}
```

### 400 — The request could not be processed. Check the request parameters.

### 401 — A valid Felo API key is required.

### 402 — The request cannot proceed because a billing requirement is not met.

### 403 — The account is not permitted to perform this operation.

### 429 — A request or spending limit has been reached.

### 502 — The service could not complete the request.

### 503 — The API or billing service is temporarily unavailable.

### 504 — The service timed out while processing the request.

### default — Error response; upstream passthrough responses may use provider formats

**application/json**

Schema:

```json
{}
```

## Schema definitions

### Response36Afe1097B20_BaseResponseInfo

`#/components/schemas/Response36Afe1097B20_BaseResponseInfo`

```json
{
  "properties": {
    "version": {
      "type": [
        "string",
        "null"
      ],
      "description": "the current version of the API"
    },
    "status_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "general status code\nyou can find the full list of the response codes here"
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "general informational message\nyou can find the full list of general informational messages here"
    },
    "time": {
      "type": [
        "string",
        "null"
      ],
      "description": "total execution time, seconds"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "total tasks cost, USD",
      "format": "double"
    },
    "tasks_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "the number of tasks in the tasks array",
      "format": "int64"
    },
    "tasks_error": {
      "type": [
        "integer",
        "null"
      ],
      "description": "the number of tasks in the tasks array returned with an error",
      "format": "int64"
    }
  }
}
```

### Response36Afe1097B20_BaseResponseTaskInfo

`#/components/schemas/Response36Afe1097B20_BaseResponseTaskInfo`

```json
{
  "properties": {
    "id": {
      "type": [
        "string",
        "null"
      ],
      "description": "task identifier\nunique task identifier in our system in the UUID format"
    },
    "status_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "status code of the task\ngenerated by DataForSEO, can be within the following range: 10000-60000\nyou can find the full list of the response codes here"
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "informational message of the task\nyou can find the full list of general informational messages here"
    },
    "time": {
      "type": [
        "string",
        "null"
      ],
      "description": "execution time, seconds"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "total tasks cost, USD",
      "format": "double"
    },
    "result_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "number of elements in the result array",
      "format": "int64"
    },
    "path": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "string",
          "null"
        ]
      },
      "description": "URL path"
    },
    "data": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "object",
          "null"
        ]
      },
      "description": "contains the same parameters that you specified in the POST request"
    }
  }
}
```

### Response36Afe1097B20_BusinessDataGoogleHotelSearchesTaskPostResponseInfo

`#/components/schemas/Response36Afe1097B20_BusinessDataGoogleHotelSearchesTaskPostResponseInfo`

```json
{
  "type": "object",
  "allOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_BaseResponseInfo"
    },
    {
      "type": "object",
      "properties": {
        "tasks": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "object",
              "null"
            ],
            "oneOf": [
              {
                "$ref": "#/components/schemas/Response36Afe1097B20_BusinessDataGoogleHotelSearchesTaskPostTaskInfo"
              }
            ]
          },
          "description": "<em>array of tasks</em>"
        }
      }
    }
  ]
}
```

### Response36Afe1097B20_BusinessDataGoogleHotelSearchesTaskPostTaskInfo

`#/components/schemas/Response36Afe1097B20_BusinessDataGoogleHotelSearchesTaskPostTaskInfo`

```json
{
  "type": "object",
  "allOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_BaseResponseTaskInfo"
    },
    {
      "type": "object",
      "properties": {
        "result": {
          "type": [
            "object",
            "null"
          ],
          "description": "<em>array of results</em><br>in this case, the value will be <code>null</code>"
        }
      }
    }
  ]
}
```
