# 依 id 取得 Google 飯店搜尋任務結果

**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` 或上限固定，此處無法縮小；如果回應過大，請縮小範圍重新提交，不要改用分頁。

### 計費參考

- 計量方式：依回報的回應成本計量。
- 參考請求估算：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 — 需要有效的 Felo API 金鑰。

### 402 — 由於未符合計費要求，要求無法繼續。

### 403 — 該帳戶無權執行此操作。

### 429 — 已達到要求或支出上限。

### 502 — 服務無法完成該要求。

### 503 — API 或計費服務暫時無法使用。

### 504 — 服務在處理要求時逾時。

### default — 錯誤回應；上游透傳回應可能採用供應商格式

**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": "任務總費用，美元",
      "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": "任務總費用，美元",
      "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 地圖中的緯度座標</i><br>範例：<br><code>\"latitude\": 51.584091</code>"
    },
    "longitude": {
      "type": [
        "number",
        "null"
      ],
      "description": "<i>飯店在 Google 地圖中的經度座標</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\n價格優惠所在網站頁面的 URL"
    },
    "max_visitors": {
      "type": [
        "integer",
        "null"
      ],
      "description": "訪客人數上限\n此價格優惠適用的最大訪客人數"
    },
    "offer_images": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "string",
          "null"
        ]
      },
      "description": "價格優惠圖片\n價格優惠中所展示圖片的 URL"
    },
    "free_cancellation_until": {
      "type": [
        "string",
        "null"
      ],
      "description": "可免費取消的截止日期\nUTC 格式：“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\n帶有價格資訊的第三方網站頁面 URL"
    },
    "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": "可免費取消的截止日期\nUTC 格式：“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>表示評論元素是否預設可見"
    }
  }
}
```
