# Получение результатов поиска отелей Google по id

**API:** Data API

**Endpoint:** `GET /v1/beta/dataforseo/business_data/google/hotel_searches/task_get/{id}`

**Tags:** DataForSEO

По `id` получает поисковый запрос Google Hotels из очереди. Ответ обёрнут в конверт DataForSEO: данные в `tasks[0].result`, результат в `tasks[0].status_code` — отклонённый запрос всё равно возвращает HTTP 200. ⚠️ Размер ответа зафиксирован параметром `depth` или лимитом, заданным при отправке, и здесь его нельзя уменьшить; если он слишком велик, отправьте запрос заново с меньшим значением, а не листайте страницы.

### Справочные цены

- Тарификация: стоимость ответа по данным провайдера.
- Справочная оценка запроса: USD 0.012.
- Справочный множитель для клиента: 1.0. Не применяйте его повторно к уже рассчитанной сумме клиента.

Только справочные метаданные, а не коммерческое предложение для аккаунта, гарантированная цена или лимит расходов. Кредиты ресурсов — не кредиты Felo. Итоговые списания определяются записями биллинга Felo.

## Base URL

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

## Authentication

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

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `id` | path | yes | string | <em>идентификатор задачи</em><br><strong>уникальный идентификатор задачи в нашей системе в формате <a href="https://en.wikipedia.org/wiki/Universally_unique_identifier">UUID</a></strong><br>в течение <strong>30 дней</strong> вы сможете в любое время запросить по нему результаты задачи |

## Responses

### 200 — Успешная операция

Headers:
- `X-Request-Id` (string) — Идентификатор запроса, который нужно указать при обращении в поддержку Felo.

**application/json**

Schema: object | null

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

### 400 — Запрос не удалось обработать. Проверьте параметры запроса.

### 401 — Требуется действительный API-ключ Felo.

### 402 — Запрос не может быть выполнен: не выполнено требование биллинга.

### 403 — Аккаунту не разрешено выполнять эту операцию.

### 429 — Достигнут лимит запросов или расходов.

### 502 — Сервис не смог выполнить запрос.

### 503 — API или сервис биллинга временно недоступны.

### 504 — Истекло время ожидания обработки запроса.

### default — Ответ с ошибкой; сквозные ответы upstream могут использовать форматы провайдера

**application/json**

Schema:

```json
{}
```

## Schema definitions

### Response36Afe1097B20_BaseResponseInfo

`#/components/schemas/Response36Afe1097B20_BaseResponseInfo`

```json
{
  "properties": {
    "version": {
      "type": [
        "string",
        "null"
      ],
      "description": "текущая версия API"
    },
    "status_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "общий код состояния.\nПолный список кодов ответа можно найти здесь."
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "общее информационное сообщение.\nПолный список общих информационных сообщений можно найти здесь."
    },
    "time": {
      "type": [
        "string",
        "null"
      ],
      "description": "общее время выполнения, секунды"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "общая стоимость задач, USD",
      "format": "double"
    },
    "tasks_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "число задач в массиве tasks",
      "format": "int64"
    },
    "tasks_error": {
      "type": [
        "integer",
        "null"
      ],
      "description": "число задач в массиве tasks, возвращённых с ошибкой",
      "format": "int64"
    }
  }
}
```

### Response36Afe1097B20_BaseResponseTaskInfo

`#/components/schemas/Response36Afe1097B20_BaseResponseTaskInfo`

```json
{
  "properties": {
    "id": {
      "type": [
        "string",
        "null"
      ],
      "description": "идентификатор задачи\nуникальный идентификатор задачи в нашей системе в формате UUID"
    },
    "status_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "код состояния задачи\nформируется DataForSEO, может находиться в диапазоне 10000-60000\nПолный список кодов ответа можно найти здесь."
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "информационное сообщение задачи\nПолный список общих информационных сообщений можно найти здесь."
    },
    "time": {
      "type": [
        "string",
        "null"
      ],
      "description": "время выполнения, секунды"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "общая стоимость задач, USD",
      "format": "double"
    },
    "result_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "число элементов в массиве result",
      "format": "int64"
    },
    "path": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "string",
          "null"
        ]
      },
      "description": "путь URL"
    },
    "data": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "object",
          "null"
        ]
      },
      "description": "содержит те же параметры, что вы указали в POST-запросе"
    }
  }
}
```

### Response36Afe1097B20_BusinessDataGoogleHotelSearchesItem

`#/components/schemas/Response36Afe1097B20_BusinessDataGoogleHotelSearchesItem`

```json
{
  "type": "object",
  "properties": {
    "type": {
      "type": [
        "string",
        "null"
      ],
      "description": "тип элемента"
    },
    "hotel_identifier": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>уникальный идентификатор гостиничной сущности в поиске Google</em><br>пример:<br><code>CgoI-KWyzenM_MV3EAE</code>"
    },
    "title": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>название отеля</em>"
    },
    "stars": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>классовый рейтинг отеля</em><br>рейтинг класса в диапазоне от 1 до 5 звёзд"
    },
    "is_paid": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "<em>указывает на платный листинг отеля</strong></em><br>если <code>true</code>, связанный <code>hotel_search_item</code> — платная реклама<br>если <code>false</code>, связанный <code>hotel_search_item</code> — органический листинг отеля"
    },
    "location": {
      "type": [
        "object",
        "null"
      ],
      "oneOf": [
        {
          "$ref": "#/components/schemas/Response36Afe1097B20_GpsCoordinatesLocationInfo"
        }
      ],
      "description": "<em>GPS-координаты местоположения отеля</em>"
    },
    "reviews": {
      "type": [
        "object",
        "null"
      ],
      "oneOf": [
        {
          "$ref": "#/components/schemas/Response36Afe1097B20_HotelReviewInfo"
        }
      ],
      "description": "<em>отзывы об отеле и информация о рейтинге</em>"
    },
    "overview_images": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "string",
          "null"
        ]
      },
      "description": "<em>избранные изображения для отеля</em>"
    },
    "prices": {
      "type": [
        "object",
        "null"
      ],
      "oneOf": [
        {
          "$ref": "#/components/schemas/Response36Afe1097B20_HotelPriceInfo"
        }
      ],
      "description": "<em>цена отеля</em>"
    }
  }
}
```

### Response36Afe1097B20_BusinessDataGoogleHotelSearchesTaskGetResponseInfo

`#/components/schemas/Response36Afe1097B20_BusinessDataGoogleHotelSearchesTaskGetResponseInfo`

```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_BusinessDataGoogleHotelSearchesTaskGetTaskInfo"
              }
            ]
          },
          "description": "<em>массив задач</em>"
        }
      }
    }
  ]
}
```

### Response36Afe1097B20_BusinessDataGoogleHotelSearchesTaskGetResultInfo

`#/components/schemas/Response36Afe1097B20_BusinessDataGoogleHotelSearchesTaskGetResultInfo`

```json
{
  "type": "object",
  "properties": {
    "keyword": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>ключевое слово, полученное в массиве POST</em><br>ключевое слово возвращается с декодированными %## (символ '+' будет декодирован в пробел);<br>для получения точных результатов поиска название местоположения автоматически добавляется к ключевому слову"
    },
    "location_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>код местоположения в массиве POST</em>"
    },
    "language_code": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>код языка в массиве POST</em>"
    },
    "check_url": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>прямой URL к результатам поисковой системы</em><br>с его помощью можно убедиться, что мы предоставили точные результаты"
    },
    "datetime": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>дата и время получения результата</em><br>в формате UTC: “yyyy-mm-dd hh-mm-ss +00:00”<br>пример:<br><code class=\"long-string\">2019-11-15 12:57:46 +00:00</code>"
    },
    "items_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>типы элементов</em><br>количество элементов в массиве <code>items</code>",
      "format": "int64"
    },
    "items": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "object",
          "null"
        ],
        "oneOf": [
          {
            "$ref": "#/components/schemas/Response36Afe1097B20_BusinessDataGoogleHotelSearchesItem"
          }
        ]
      },
      "description": "<em>массив элементов</em><br><strong>примечание:</strong> это поле всегда равно <code>null</code>; используйте его для упрощения интеграции и обеспечения совместимости с эндпоинтом <a href=\"/v3/business_data/google/hotel_info/live/advanced/\">Hotel Info</a>"
    }
  }
}
```

### Response36Afe1097B20_BusinessDataGoogleHotelSearchesTaskGetTaskInfo

`#/components/schemas/Response36Afe1097B20_BusinessDataGoogleHotelSearchesTaskGetTaskInfo`

```json
{
  "type": "object",
  "allOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_BaseResponseTaskInfo"
    },
    {
      "type": "object",
      "properties": {
        "result": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "object",
              "null"
            ],
            "oneOf": [
              {
                "$ref": "#/components/schemas/Response36Afe1097B20_BusinessDataGoogleHotelSearchesTaskGetResultInfo"
              }
            ]
          },
          "description": "<em>массив результатов</em>"
        }
      }
    }
  ]
}
```

### Response36Afe1097B20_GpsCoordinatesLocationInfo

`#/components/schemas/Response36Afe1097B20_GpsCoordinatesLocationInfo`

```json
{
  "type": "object",
  "properties": {
    "latitude": {
      "type": [
        "number",
        "null"
      ],
      "description": "<i>координата широты отеля в Google Maps</i><br>пример:<br><code>\"latitude\": 51.584091</code>"
    },
    "longitude": {
      "type": [
        "number",
        "null"
      ],
      "description": "<i>координата долготы отеля в Google Maps</i><br>пример:<br><code>\"longitude\": -0.31365919999999997</code>"
    }
  }
}
```

### Response36Afe1097B20_HotelInfoPriceOffer

`#/components/schemas/Response36Afe1097B20_HotelInfoPriceOffer`

```json
{
  "type": "object",
  "properties": {
    "type": {
      "type": [
        "string",
        "null"
      ],
      "description": "тип элемента"
    },
    "title": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>название отеля</em>"
    },
    "price": {
      "type": [
        "number",
        "null"
      ],
      "description": "<em>цена за ночь</em>"
    },
    "currency": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>валюта цены</em><br>по умолчанию применяется <code>USD</code>, если иное не указано в массиве POST"
    },
    "url": {
      "type": [
        "string",
        "null"
      ],
      "description": "url ценового предложения\nURL страницы сайта, на которой отображается ценовое предложение"
    },
    "max_visitors": {
      "type": [
        "integer",
        "null"
      ],
      "description": "максимальное число посетителей\nмаксимальное число посетителей, для которого действует ценовое предложение"
    },
    "offer_images": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "string",
          "null"
        ]
      },
      "description": "изображения ценового предложения\nURL изображений, представленных в ценовом предложении"
    },
    "free_cancellation_until": {
      "type": [
        "string",
        "null"
      ],
      "description": "дата, до которой доступна бесплатная отмена\nв формате UTC: “yyyy-mm-dd hh-mm-ss +00:00”\nравно null, если бесплатная отмена недоступна для выбранных дат"
    }
  },
  "description": "избранные ценовые предложения"
}
```

### Response36Afe1097B20_HotelPriceInfo

`#/components/schemas/Response36Afe1097B20_HotelPriceInfo`

```json
{
  "type": "object",
  "properties": {
    "price": {
      "type": [
        "number",
        "null"
      ],
      "description": "<em>цена за ночь</em>"
    },
    "price_without_discount": {
      "type": [
        "number",
        "null"
      ],
      "description": "<em>полная цена за ночь без применения скидки</em>",
      "format": "int64"
    },
    "currency": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>валюта цены</em><br>по умолчанию применяется <code>USD</code>, если иное не указано в массиве POST"
    },
    "discount_text": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>текст о применённой скидке</em>"
    },
    "check_in": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>дата и время заезда</em><br>в формате UTC: “yyyy-mm-dd hh-mm-ss +00:00”<br>пример:<br><code>2019-11-15 12:57:46 +00:00</code>"
    },
    "check_out": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>дата и время выезда</em><br>в формате UTC: “yyyy-mm-dd hh-mm-ss +00:00”<br>пример:<br><code>2019-11-15 12:57:46 +00:00</code>"
    },
    "visitors": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>число посетителей отеля для этой цены</em>"
    },
    "items": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "object",
          "null"
        ],
        "oneOf": [
          {
            "$ref": "#/components/schemas/Response36Afe1097B20_HotelPriceItemInfo"
          }
        ]
      },
      "description": "<em>встреченные типы элементов</em><br>типы результатов поисковой системы, встреченных в массиве <code>items</code>;<br>возможные типы элементов: <code>hotel_search_item</code>"
    },
    "prices_by_dates": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "object",
          "null"
        ],
        "oneOf": [
          {
            "$ref": "#/components/schemas/Response36Afe1097B20_PricesByDates"
          }
        ]
      }
    }
  }
}
```

### Response36Afe1097B20_HotelPriceItemInfo

`#/components/schemas/Response36Afe1097B20_HotelPriceItemInfo`

```json
{
  "type": "object",
  "properties": {
    "type": {
      "type": [
        "string",
        "null"
      ],
      "description": "тип элемента"
    },
    "title": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>название отеля</em>"
    },
    "price": {
      "type": [
        "number",
        "null"
      ],
      "description": "<em>цена за ночь</em>"
    },
    "currency": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>валюта цены</em><br>по умолчанию применяется <code>USD</code>, если иное не указано в массиве POST"
    },
    "url": {
      "type": [
        "string",
        "null"
      ],
      "description": "url сторонней страницы\nURL страницы стороннего сайта со сведениями о ценах"
    },
    "domain": {
      "type": [
        "string",
        "null"
      ],
      "description": "сторонний домен\nдомен страницы стороннего сайта со сведениями о ценах"
    },
    "is_paid": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "<em>указывает на платный листинг отеля</strong></em><br>если <code>true</code>, связанный <code>hotel_search_item</code> — платная реклама<br>если <code>false</code>, связанный <code>hotel_search_item</code> — органический листинг отеля"
    },
    "official_site": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "free_cancellation_until": {
      "type": [
        "string",
        "null"
      ],
      "description": "дата, до которой доступна бесплатная отмена\nв формате UTC: “yyyy-mm-dd hh-mm-ss +00:00”\nравно null, если бесплатная отмена недоступна для выбранных дат"
    },
    "offers": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "object",
          "null"
        ],
        "oneOf": [
          {
            "$ref": "#/components/schemas/Response36Afe1097B20_HotelInfoPriceOffer"
          }
        ]
      }
    }
  }
}
```

### Response36Afe1097B20_HotelReviewInfo

`#/components/schemas/Response36Afe1097B20_HotelReviewInfo`

```json
{
  "type": "object",
  "properties": {
    "value": {
      "type": [
        "number",
        "null"
      ],
      "description": "<em>общий рейтинг отеля на основе голосов клиентов</em>"
    },
    "votes_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>число голосов клиентов</em><br>число голосов клиентов, учтённых при расчёте рейтинга отеля",
      "format": "int64"
    },
    "mentions": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "object",
          "null"
        ],
        "oneOf": [
          {
            "$ref": "#/components/schemas/Response36Afe1097B20_ReviewMentionInfo"
          }
        ]
      },
      "description": "<em>упоминания отеля</em><br>информация об отзывах об отеле по критериям"
    },
    "rating_distribution": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "integer",
          "null"
        ],
        "format": "Int64"
      },
      "description": "<em>распределение оценок по голосам</em><br>распределение голосов по рейтингу в диапазоне от 1 до 5"
    },
    "other_sites_reviews": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "object",
          "null"
        ],
        "oneOf": [
          {
            "$ref": "#/components/schemas/Response36Afe1097B20_OtherSitesReviewsInfo"
          }
        ]
      },
      "description": "<em>отзывы на сторонних сайтах</em><br>отзывы со сторонних сайтов"
    }
  }
}
```

### Response36Afe1097B20_OtherSitesReviewsInfo

`#/components/schemas/Response36Afe1097B20_OtherSitesReviewsInfo`

```json
{
  "type": "object",
  "properties": {
    "title": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>заголовок отзыва</em><br>содержит название стороннего сайта, где отзыв был впервые опубликован"
    },
    "url": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>URL отзыва</em><br>URL стороннего сайта, где отзыв был впервые опубликован"
    },
    "review_text": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>текст отзыва</em><br>текст отзыва"
    },
    "rating": {
      "type": [
        "object",
        "null"
      ],
      "oneOf": [
        {
          "$ref": "#/components/schemas/Response36Afe1097B20_RatingInfo"
        }
      ],
      "description": "<em>рейтинг в отзыве</em><br>информация о рейтинге, содержащемся в отзыве на стороннем сайте"
    }
  }
}
```

### Response36Afe1097B20_PricesByDates

`#/components/schemas/Response36Afe1097B20_PricesByDates`

```json
{
  "type": "object",
  "properties": {
    "price": {
      "type": [
        "number",
        "null"
      ],
      "description": "<em>цена за ночь</em>"
    },
    "currency": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>валюта цены</em><br>по умолчанию применяется <code>USD</code>, если иное не указано в массиве POST"
    },
    "check_in_date": {
      "type": [
        "string",
        "null"
      ]
    },
    "check_out_date": {
      "type": [
        "string",
        "null"
      ]
    }
  }
}
```

### Response36Afe1097B20_RatingInfo

`#/components/schemas/Response36Afe1097B20_RatingInfo`

```json
{
  "properties": {
    "rating_type": {
      "type": [
        "string",
        "null"
      ],
      "description": "тип рейтинга\nздесь можно найти следующие элементы: Max5, Percents, CustomMax"
    },
    "value": {
      "type": [
        "number",
        "null"
      ],
      "description": "значение рейтинга",
      "format": "double"
    },
    "votes_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "количество отзывов",
      "format": "int64"
    },
    "rating_max": {
      "type": [
        "integer",
        "null"
      ],
      "description": "максимальное значение для rating_type"
    }
  }
}
```

### Response36Afe1097B20_ReviewMentionInfo

`#/components/schemas/Response36Afe1097B20_ReviewMentionInfo`

```json
{
  "type": "object",
  "properties": {
    "title": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>заголовок оцениваемого критерия</em>"
    },
    "positive_score": {
      "type": [
        "number",
        "null"
      ],
      "description": "<em>позитивная оценка по критерию</em>"
    },
    "positive_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>количество позитивных отзывов по критерию</em>",
      "format": "int64"
    },
    "negative_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>количество негативных отзывов по критерию</em>",
      "format": "int64"
    },
    "total_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>количество всех отзывов по критерию</em>",
      "format": "int64"
    },
    "visible_by_default": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "<em>элемент виден по умолчанию</em><br>указывает, виден ли элемент отзыва по умолчанию"
    }
  }
}
```
