Felo API PlatformFelo API Platform
全部 DataForSEO 端点
v0.2.0-beta
OpenAPI 3.1.0

实时 Google 酒店搜索任务

服务器:https://openapi.felo.ai
客户端库

DataForSEO

​

SEO, search-engine results, keyword research, backlinks and AI visibility data.

实时 Google 酒店搜索任务

​

在 Google Hotels 中搜索符合查询条件的酒店,可指定日期和入住人数。采用 DataForSEO 的信封结构:数据位于 tasks[0].result,结果状态位于 tasks[0].status_code——被拒绝的请求仍会返回 HTTP 200。可通过它找到信息类端点所需的酒店 id;post_dataforseo_business_google_hotel_info_live 是详情视图。

计费参考

  • 计量方式:按上报的响应成本计量。
  • 参考请求估算:0.2428 美元。
  • 参考客户倍率:1.0。不得对已结算的客户金额再次应用。

仅供参考的元数据,不是账户报价、保证价格或消费上限。资源额度不同于 Felo 额度。最终扣费以 Felo 计费记录为准。

请求体
application/json
  • 类型: array (object | null)[]
    • adults
      类型: integer | null

      成人数
      可选字段
      如果未指定此字段,将使用默认值 2;
      注意,成人与儿童合计最多可指定 6 人
      示例:
      1

    • amenities
      类型: array string[] | null

      酒店设施
      可选字段
      可使用此字段指定不同的酒店设施
      示例:
      [
      "free_parking",
      "pets_allowed"
      ]

      可能的值:
      "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"

    • check_in
      类型: string | null

      入住日期
      可选字段
      如果未指定此字段,默认使用明天的日期;
      日期格式:"yyyy-mm-dd"
      示例:
      "2019-01-15"
      注意:该值不能早于今天的日期

    • check_out
      类型: string | null

      退房日期
      可选字段
      如果未指定此字段,我们的系统默认采用两天后的日期;
      日期格式:"yyyy-mm-dd"
      示例:
      "2019-01-15"
      注意:该值不能小于或等于 check_in;
      check_in 与 check_out 之间的范围不能超过 30 天

    • children
      类型: array string[] | null

      儿童人数与年龄
      可选字段
      如果未指定此字段,搜索将不包含儿童;
      儿童年龄可为 0 至 17;
      注意,成人与儿童合计最多可指定 6 人
      如需包含一名 14 岁儿童,请设置以下值:
      [14]
      如需包含一名 13 岁儿童和一名 8 岁儿童,请设置以下值:
      [13,8]

    • currency
      类型: string | null

      货币
      可选字段
      示例:
      "USD"

    • depth
      类型: integer | null

      解析深度
      可选字段
      Google Hotels 中的结果数量
      默认值:18 条自然结果
      最大值:140
      注意:无论响应中是否包含付费列表,你的账户都将按每 18 条自然结果计费;
      因此,如果 Google Hotels 返回超过 18 条结果,将解析深度设为高于 18 可能产生额外费用;
      如果指定深度高于响应中的结果数量,差额将自动退还至你的账户余额

    • free_cancellation
      类型: boolean | null

      可免费取消的酒店
      可选字段
      如需获取可免费取消预订的酒店列表,请将此字段设为 true
      默认值:false

    • is_vacation_rentals
      类型: boolean | null

      搜索度假租赁房源
      可选字段
      如需获取度假租赁房源列表而非酒店,请将此字段设为 true
      默认值:false

    • keyword
      类型: string | null

      关键词
      可选字段
      你指定的关键词用于搜索酒店列表;
      如果不使用此字段,我们将返回在指定地点找到的酒店列表;
      在 keyword 字段中最多可指定 700 个字符
      所有 %## 都将被解码(另外,字符 ‘+’ 会被解码为空格)
      如果需要在 keyword 中使用 “%” 字符,请将其指定为 “%25”;
      注意:为获得准确的搜索结果,地点名称会自动附加到关键词后

      有关 DataForSEO API 中 keyword 和 keywords 字段的规则与限制,请参阅这篇 帮助中心文章

    • language_code
      类型: string

      搜索引擎语言代码
      未指定 language_name 时为必填字段
      如果使用此字段,则无需指定 language_name
      可单独向 https://api.dataforseo.com/v3/business_data/google/languages 发起请求,获取可用语言及其 language_code 列表
      示例:
      en

    • language_name
      类型: string

      搜索引擎语言全名
      未指定 language_code 时为必填字段
      如果使用此字段,则无需指定 language_code
      可单独向 https://api.dataforseo.com/v3/business_data/google/languages 发起请求,获取带 language_name 的可用语言列表
      示例:
      English

    • location_code
      类型: integer

      搜索引擎地点代码
      未指定 location_name 或 location_coordinate 时为必填字段
      如果使用此字段,则无需指定 location_name 或 location_coordinate
      可单独向 https://api.dataforseo.com/v3/business_data/google/locations 发起请求,获取带 location_code 的可用地点列表
      示例:
      2840

    • location_coordinate
      类型: string

      地点的 GPS 坐标
      未指定 location_name 或 location_code 时为必填字段
      如果使用此字段,则无需指定 location_name 或 location_code
      location_coordinate 参数应按 "latitude,longitude" 格式指定
      "latitude" 和 "longitude" 的最大小数位数为 7
      注意:如果使用坐标设置地点,搜索将在最近的居民点进行
      示例:
      53.476225,-2.243572

    • location_name
      类型: string

      搜索引擎地点全名
      未指定 location_code 或 location_coordinate 时为必填字段
      如果使用此字段,则无需指定 location_code 或 location_coordinate
      可单独向 https://api.dataforseo.com/v3/business_data/google/locations 发起请求,获取带 location_name 的可用地点列表
      示例:
      London,England,United Kingdom
      注意:为获得准确的搜索结果,你指定的 location_name 将自动附加到关键词后

    • max_price
      类型: integer | null

      每晚最高价格
      可选字段
      此值的货币取决于 currency 字段
      示例:
      600

    • min_price
      类型: integer | null

      每晚最低价格
      可选字段
      此值的货币取决于 currency 字段
      示例:
      100

    • min_rating
      类型: number | null

      最低评分
      可选字段
      可使用此字段指定高于某一值的住客评分
      示例:
      2.5

    • search_this_area
      类型: boolean | null

      显示当前显示区域内的酒店
      可选字段
      可取以下值:true、false
      默认值:true
      如果设为 false,将关闭 search_this_area 模式
      注意:如果关闭 search_this_area 模式,搜索期间 location_name 将不会附加到 keyword 后
      可在我们的帮助中心进一步了解此参数

    • sort_by
      类型: string | null

      结果排序参数
      可选字段
      可使用此字段对结果排序
      可能的排序类型:
      relevance – 按最相关排序
      lowest_price – 按最低价格排序
      highest_rating – 按最高评分排序
      most_reviewed – 按评论最多排序
      默认值:relevance

    • stars
      类型: array string[] | null

      酒店星级
      可选字段
      如需仅获取 5 星级酒店列表,请将此字段设为 [5]
      示例:
      [3,4,5]

    • tag
      类型: string | null

      用户自定义任务标识符
      可选字段
      字符数上限为 255
      可使用此参数标识任务,并将其与结果对应
      可在响应的 data 对象中找到指定的 tag 值

响应
  • 200
    类型: object | null · Response36Afe1097B20_BusinessDataGoogleHotelSearchesLiveResponseInfo
    • cost
      类型: number | null 格式: double

      任务总费用,美元

    • status_code
      类型: integer | null

      通用状态码 完整响应码列表见此处

    • status_message
      类型: string | null

      通用信息性消息 完整的一般信息性消息列表见此处

    • tasks
      类型: array (object | null)[] | null

      任务数组

      • 类型: object | null · Response36Afe1097B20_BusinessDataGoogleHotelSearchesLiveTaskInfo
        • cost
          类型: number | null 格式: double

          任务总费用,美元

        • data
          类型: object | null

          包含你在 POST 请求中指定的相同参数

          • propertyName
            类型: object | null
        • id
          类型: string | null

          任务标识符 我们系统中 UUID 格式的唯一任务标识符

        • path
          类型: array (string | null)[] | null

          URL 路径

        • result
          类型: array (object | null)[] | null

          结果数组

          • check_url
            类型: string | null

            搜索引擎结果的直接 URL
            可用于确保我们提供了准确的结果

          • datetime
            类型: string | null

            收到结果的日期和时间
            采用 UTC 格式:“yyyy-mm-dd hh-mm-ss +00:00”
            示例:
            2019-11-15 12:57:46 +00:00

          • items
            类型: array (object | null)[] | null

            遇到的条目类型
            items 数组中出现的搜索引擎结果类型;
            可能的条目类型:hotel_search_item

            • hotel_identifier
              类型: string | null

              酒店实体在 Google 搜索中的唯一标识符
              示例:
              CgoI-KWyzenM_MV3EAE

            • is_paid
              类型: boolean | null

              表示付费酒店信息
              如果为 true,相关的 hotel_search_item 是付费广告
              如果为 false,相关的 hotel_search_item 是自然酒店信息

            • location
              类型: object | null · Response36Afe1097B20_GpsCoordinatesLocationInfo

              酒店位置的 GPS 坐标

              • latitude
                类型: number | null

                酒店在 Google 地图中的纬度坐标
                示例:
                "latitude": 51.584091

              • longitude
                类型: number | null

                酒店在 Google 地图中的经度坐标
                示例:
                "longitude": -0.31365919999999997

            • overview_images
              类型: array (string | null)[] | null

              酒店的特色图片

            • prices
              类型: object | null · Response36Afe1097B20_HotelPriceInfo

              酒店价格

              • check_in
                类型: string | null

                入住日期和时间
                UTC 格式:“yyyy-mm-dd hh-mm-ss +00:00”
                示例:
                2019-11-15 12:57:46 +00:00

              • check_out
                类型: string | null

                退房日期和时间
                UTC 格式:“yyyy-mm-dd hh-mm-ss +00:00”
                示例:
                2019-11-15 12:57:46 +00:00

              • currency
                类型: string | null

                价格货币
                默认应用 USD,除非在 POST 数组中指定

              • discount_text
                类型: string | null

                所应用折扣的说明

              • items
                类型: array (object | null)[] | null

                遇到的条目类型
                items 数组中出现的搜索引擎结果类型;
                可能的条目类型:hotel_search_item

                • currency
                  类型: string | null

                  价格货币
                  默认应用 USD,除非在 POST 数组中指定

                • domain
                  类型: string | null

                  第三方域名 带有价格信息的第三方网站页面的域名

                • free_cancellation_until
                  类型: string | null

                  可免费取消的截止日期 UTC 格式:“yyyy-mm-dd hh-mm-ss +00:00” 如果所选日期不提供免费取消,则等于 null

                • is_paid
                  类型: boolean | null

                  表示付费酒店信息
                  如果为 true,相关的 hotel_search_item 是付费广告
                  如果为 false,相关的 hotel_search_item 是自然酒店信息

                • offers
                  类型: array (object | null)[] | null

                  特色价格优惠

                  • currency
                    类型: string | null

                    价格货币
                    默认应用 USD,除非在 POST 数组中指定

                  • free_cancellation_until
                    类型: string | null

                    可免费取消的截止日期 UTC 格式:“yyyy-mm-dd hh-mm-ss +00:00” 如果所选日期不提供免费取消,则等于 null

                  • max_visitors
                    类型: integer | null

                    访客数量上限 该价格优惠适用的最大访客数量

                  • offer_images
                    类型: array (string | null)[] | null

                    价格优惠图片 价格优惠中所展示图片的 URL

                  • price
                    类型: number | null

                    每晚价格

                  • title
                    类型: string | null

                    酒店标题

                  • type
                    类型: string | null

                    元素类型

                  • url
                    类型: string | null

                    价格优惠的 URL 价格优惠所在网站页面的 URL

                • official_site
                  类型: boolean | null
                • price
                  类型: number | null

                  每晚价格

                • title
                  类型: string | null

                  酒店标题

                • type
                  类型: string | null

                  元素类型

                • url
                  类型: string | null

                  第三方页面 URL 带有价格信息的第三方网站页面的 URL

              • price
                类型: number | null

                每晚价格

              • price_without_discount
                类型: number | null 格式: int64

                未应用折扣的每晚完整价格

              • prices_by_dates
                类型: array (object | null)[] | null
                • check_in_date
                  类型: string | null
                • check_out_date
                  类型: string | null
                • currency
                  类型: string | null

                  价格货币
                  默认应用 USD,除非在 POST 数组中指定

                • price
                  类型: number | null

                  每晚价格

              • visitors
                类型: integer | null

                此价格对应的酒店访客数量

            • reviews
              类型: object | null · Response36Afe1097B20_HotelReviewInfo

              酒店评价和评分信息

              • mentions
                类型: array (object | null)[] | null

                酒店提及
                按标准划分的酒店评论相关信息

                • negative_count
                  类型: integer | null 格式: int64

                  按标准的负面评论数

                • positive_count
                  类型: integer | null 格式: int64

                  按标准的正面评论数

                • positive_score
                  类型: number | null

                  按标准的正面得分

                • title
                  类型: string | null

                  已评估标准的标题

                • total_count
                  类型: integer | null 格式: int64

                  按标准的所有评论数

                • visible_by_default
                  类型: boolean | null

                  元素默认可见
                  表示评论元素是否默认可见

              • other_sites_reviews
                类型: array (object | null)[] | null

                第三方网站上的评论
                来自第三方网站的评论

                • rating
                  类型: object | null · Response36Afe1097B20_RatingInfo

                  评论中的评分
                  第三方网站上评论中包含的评分信息

                  • rating_max
                    类型: integer | null

                    rating_type 的最大值

                  • rating_type
                    类型: string | null

                    评分类型 此处可以找到以下元素:Max5、Percents、CustomMax

                  • value
                    类型: number | null 格式: double

                    评分的值

                  • votes_count
                    类型: integer | null 格式: int64

                    反馈数量

                • review_text
                  类型: string | null

                  评论文本
                  评论的文本

                • title
                  类型: string | null

                  评论标题
                  包含评论最初出现的第三方网站名称

                • url
                  类型: string | null

                  评论 URL
                  指向评论最初出现的第三方网站的 URL

              • rating_distribution
                类型: object | null

                按投票数划分的评分分布
                1 到 5 分范围内各评分对应的投票分布

                • propertyName
                  类型: integer | null 格式: Int64
              • value
                类型: number | null

                基于客户投票的酒店总体评分

              • votes_count
                类型: integer | null 格式: int64

                客户投票数
                参与酒店评分计算的客户投票数

            • stars
              类型: integer | null

              酒店星级评分
              1 到 5 星的星级评分

            • title
              类型: string | null

              酒店标题

            • type
              类型: string | null

              元素类型

          • items_count
            类型: integer | null 格式: int64

            条目类型
            items 数组中的条目数

          • keyword
            类型: string | null

            POST 数组中收到的关键词
            返回的关键词已解码 %##(加号字符 '+' 会被解码为空格字符)

          • language_code
            类型: string | null

            POST 数组中的语言代码

          • location_code
            类型: integer | null

            POST 数组中的位置代码

        • result_count
          类型: integer | null 格式: int64

          result 数组中的元素数

        • status_code
          类型: integer | null

          任务的状态码 由 DataForSEO 生成,范围如下:10000-60000 完整响应码列表见此处

        • status_message
          类型: string | null

          任务的信息性消息 完整的一般信息性消息列表见此处

        • time
          类型: string | null

          执行时间,秒

    • tasks_count
      类型: integer | null 格式: int64

      tasks 数组中的任务数

    • tasks_error
      类型: integer | null 格式: int64

      tasks 数组中返回错误的任务数

    • time
      类型: string | null

      总执行时间,秒

    • version
      类型: string | null

      API 的当前版本

    application/json
  • 400

    无法处理该请求。请检查请求参数。

  • 401

    需要有效的 Felo API 密钥。

  • 402

    由于未满足计费要求,请求无法继续。

  • 403

    该账户无权执行此操作。

  • 429

    已达到请求或支出限额。

  • 502

    服务无法完成该请求。

  • 503

    API 或计费服务暂时不可用。

  • 504

    服务在处理请求时超时。

  • default

    错误响应;上游透传响应可能采用提供方格式

    application/json
Request Example for post/v1/beta/dataforseo/business_data/google/hotel_searches/live
curl https://openapi.felo.ai/v1/beta/dataforseo/business_data/google/hotel_searches/live \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '[
  {
    "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"
  }
]'
{
  "version": null,
  "status_code": null,
  "status_message": null,
  "time": null,
  "cost": null,
  "tasks_count": null,
  "tasks_error": null,
  "tasks": [
    {
      "id": null,
      "status_code": null,
      "status_message": null,
      "time": null,
      "cost": null,
      "result_count": null,
      "path": [
        null
      ],
      "data": null,
      "result": [
        {
          "keyword": null,
          "location_code": null,
          "language_code": null,
          "check_url": null,
          "datetime": null,
          "items_count": null,
          "items": [
            {
              "type": null,
              "hotel_identifier": null,
              "title": null,
              "stars": null,
              "is_paid": null,
              "location": "[Max Depth Exceeded]",
              "reviews": "[Max Depth Exceeded]",
              "overview_images": [
                "[Max Depth Exceeded]"
              ],
              "prices": "[Max Depth Exceeded]"
            }
          ]
        }
      ]
    }
  ]
}
Live Google Hotel Searches Tasks

需要帮助?